From 4781e9a53da6f7be966e00cb3b1f50c183970a31 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Thu, 28 Dec 2017 09:42:55 -0800 Subject: [PATCH] Move tests to index_tests --- src/indexer.cc | 2 +- src/test.cc | 2 +- tests/_empty_test.cc | 10 - tests/class_forward_declaration.cc | 29 -- tests/constructors/constructor.cc | 83 ----- tests/constructors/destructor.cc | 93 ----- tests/constructors/implicit_constructor.cc | 82 ----- tests/constructors/invalid_reference.cc | 48 --- tests/constructors/make_functions.cc | 322 ------------------ tests/constructors/make_functions.h | 10 - tests/declaration_vs_definition/class.cc | 31 -- .../declaration_vs_definition/class_member.cc | 38 --- .../class_member_static.cc | 41 --- tests/declaration_vs_definition/func.cc | 45 --- .../func_associated_function_params.cc | 63 ---- tests/declaration_vs_definition/method.cc | 88 ----- tests/enums/enum_class_decl.cc | 51 --- tests/enums/enum_decl.cc | 51 --- tests/enums/enum_inherit.cc | 51 --- tests/enums/enum_usage.cc | 63 ---- tests/foobar.cc | 96 ------ tests/function_declaration.cc | 29 -- tests/function_declaration_definition.cc | 33 -- tests/function_definition.cc | 26 -- tests/inheritance/class_inherit.cc | 41 --- .../class_inherit_templated_parent.cc | 106 ------ tests/inheritance/class_multiple_inherit.cc | 71 ---- tests/inheritance/function_override.cc | 78 ----- tests/inheritance/interface_pure_virtual.cc | 46 --- tests/inheritance/multiple_base_functions.cc | 107 ------ tests/lambdas/lambda.cc | 89 ----- tests/macros/complex.cc | 75 ---- tests/macros/foo.cc | 62 ---- tests/method_declaration.cc | 50 --- tests/method_definition.cc | 50 --- tests/method_inline_declaration.cc | 43 --- tests/multi_file/funky_enum.cc | 87 ----- tests/multi_file/funky_enum.h | 6 - tests/multi_file/header.h | 18 - tests/multi_file/impl.cc | 190 ----------- tests/multi_file/simple_header.h | 3 - tests/multi_file/simple_impl.cc | 70 ---- tests/multi_file/static.cc | 84 ----- tests/multi_file/static.h | 5 - tests/namespaces/anonymous_function.cc | 31 -- tests/namespaces/function_declaration.cc | 31 -- tests/namespaces/function_definition.cc | 28 -- tests/namespaces/method_declaration.cc | 48 --- tests/namespaces/method_definition.cc | 52 --- tests/namespaces/method_inline_declaration.cc | 45 --- tests/namespaces/namespace_alias.cc | 66 ---- tests/namespaces/namespace_reference.cc | 70 ---- tests/objective-c/class.m | 154 --------- tests/operators/operator.cc | 100 ------ tests/outline/outline.cc | 81 ----- tests/outline/outline2.cc | 124 ------- tests/outline/static_function_in_type.cc | 122 ------- tests/outline/static_function_in_type.h | 9 - tests/preprocessor/include_guard.cc | 25 -- tests/preprocessor/skipped.cc | 25 -- .../func_specialized_template_param.cc | 67 ---- .../implicit_variable_instantiation.cc | 84 ----- ...ass_template_func_usage_folded_into_one.cc | 70 ---- ...ace_template_type_usage_folded_into_one.cc | 52 --- .../templates/specialized_func_definition.cc | 68 ---- ...mplate_class_func_usage_folded_into_one.cc | 67 ---- ...ass_template_func_usage_folded_into_one.cc | 68 ---- ...mplate_class_type_usage_folded_into_one.cc | 115 ------- ...emplate_class_var_usage_folded_into_one.cc | 58 ---- .../template_func_usage_folded_into_one.cc | 53 --- .../template_type_usage_folded_into_one.cc | 50 --- .../template_var_usage_folded_into_one.cc | 111 ------ tests/types/anonymous_struct.cc | 83 ----- tests/types/typedefs.cc | 45 --- tests/unions/union_decl.cc | 49 --- tests/unions/union_usage.cc | 81 ----- tests/usage/func_called_from_constructor.cc | 68 ---- .../usage/func_called_from_macro_argument.cc | 59 ---- tests/usage/func_called_from_template.cc | 68 ---- tests/usage/func_called_implicit_ctor.cc | 80 ----- tests/usage/func_usage_addr_func.cc | 70 ---- tests/usage/func_usage_addr_method.cc | 74 ---- tests/usage/func_usage_call_func.cc | 43 --- tests/usage/func_usage_call_method.cc | 75 ---- .../usage/func_usage_class_inline_var_def.cc | 56 --- tests/usage/func_usage_forward_decl_func.cc | 46 --- tests/usage/func_usage_forward_decl_method.cc | 74 ---- tests/usage/func_usage_template_func.cc | 63 ---- .../usage/type_usage_as_template_parameter.cc | 94 ----- ...ype_usage_as_template_parameter_complex.cc | 221 ------------ ...type_usage_as_template_parameter_simple.cc | 53 --- tests/usage/type_usage_declare_extern.cc | 36 -- tests/usage/type_usage_declare_field.cc | 80 ----- tests/usage/type_usage_declare_local.cc | 78 ----- tests/usage/type_usage_declare_param.cc | 75 ---- .../type_usage_declare_param_prototype.cc | 61 ---- .../usage/type_usage_declare_param_unnamed.cc | 38 --- tests/usage/type_usage_declare_qualifiers.cc | 106 ------ tests/usage/type_usage_declare_static.cc | 36 -- tests/usage/type_usage_on_return_type.cc | 155 --------- tests/usage/type_usage_typedef_and_using.cc | 152 --------- .../type_usage_typedef_and_using_template.cc | 60 ---- tests/usage/type_usage_various.cc | 74 ---- tests/usage/usage_inside_of_call.cc | 118 ------- tests/usage/usage_inside_of_call_simple.cc | 63 ---- tests/usage/var_usage_call_function.cc | 56 --- tests/usage/var_usage_class_member.cc | 121 ------- tests/usage/var_usage_class_member_static.cc | 73 ---- tests/usage/var_usage_cstyle_cast.cc | 128 ------- tests/usage/var_usage_extern.cc | 37 -- tests/usage/var_usage_func_parameter.cc | 36 -- tests/usage/var_usage_local.cc | 37 -- tests/usage/var_usage_shadowed_local.cc | 51 --- tests/usage/var_usage_shadowed_parameter.cc | 51 --- tests/usage/var_usage_static.cc | 39 --- tests/vars/class_member.cc | 38 --- tests/vars/class_static_member.cc | 41 --- tests/vars/class_static_member_decl_only.cc | 35 -- tests/vars/deduce_auto_type.cc | 64 ---- tests/vars/function_local.cc | 52 --- tests/vars/function_param.cc | 60 ---- tests/vars/function_param_unnamed.cc | 25 -- tests/vars/function_shadow_local.cc | 51 --- tests/vars/function_shadow_param.cc | 45 --- tests/vars/global_variable.cc | 20 -- tests/vars/global_variable_decl_only.cc | 19 -- tests/vars/type_instance_on_using_type.cc | 72 ---- 127 files changed, 2 insertions(+), 8225 deletions(-) delete mode 100644 tests/_empty_test.cc delete mode 100644 tests/class_forward_declaration.cc delete mode 100644 tests/constructors/constructor.cc delete mode 100644 tests/constructors/destructor.cc delete mode 100644 tests/constructors/implicit_constructor.cc delete mode 100644 tests/constructors/invalid_reference.cc delete mode 100644 tests/constructors/make_functions.cc delete mode 100644 tests/constructors/make_functions.h delete mode 100644 tests/declaration_vs_definition/class.cc delete mode 100644 tests/declaration_vs_definition/class_member.cc delete mode 100644 tests/declaration_vs_definition/class_member_static.cc delete mode 100644 tests/declaration_vs_definition/func.cc delete mode 100644 tests/declaration_vs_definition/func_associated_function_params.cc delete mode 100644 tests/declaration_vs_definition/method.cc delete mode 100644 tests/enums/enum_class_decl.cc delete mode 100644 tests/enums/enum_decl.cc delete mode 100644 tests/enums/enum_inherit.cc delete mode 100644 tests/enums/enum_usage.cc delete mode 100644 tests/foobar.cc delete mode 100644 tests/function_declaration.cc delete mode 100644 tests/function_declaration_definition.cc delete mode 100644 tests/function_definition.cc delete mode 100644 tests/inheritance/class_inherit.cc delete mode 100644 tests/inheritance/class_inherit_templated_parent.cc delete mode 100644 tests/inheritance/class_multiple_inherit.cc delete mode 100644 tests/inheritance/function_override.cc delete mode 100644 tests/inheritance/interface_pure_virtual.cc delete mode 100644 tests/inheritance/multiple_base_functions.cc delete mode 100644 tests/lambdas/lambda.cc delete mode 100644 tests/macros/complex.cc delete mode 100644 tests/macros/foo.cc delete mode 100644 tests/method_declaration.cc delete mode 100644 tests/method_definition.cc delete mode 100644 tests/method_inline_declaration.cc delete mode 100644 tests/multi_file/funky_enum.cc delete mode 100644 tests/multi_file/funky_enum.h delete mode 100644 tests/multi_file/header.h delete mode 100644 tests/multi_file/impl.cc delete mode 100644 tests/multi_file/simple_header.h delete mode 100644 tests/multi_file/simple_impl.cc delete mode 100644 tests/multi_file/static.cc delete mode 100644 tests/multi_file/static.h delete mode 100644 tests/namespaces/anonymous_function.cc delete mode 100644 tests/namespaces/function_declaration.cc delete mode 100644 tests/namespaces/function_definition.cc delete mode 100644 tests/namespaces/method_declaration.cc delete mode 100644 tests/namespaces/method_definition.cc delete mode 100644 tests/namespaces/method_inline_declaration.cc delete mode 100644 tests/namespaces/namespace_alias.cc delete mode 100644 tests/namespaces/namespace_reference.cc delete mode 100644 tests/objective-c/class.m delete mode 100644 tests/operators/operator.cc delete mode 100644 tests/outline/outline.cc delete mode 100644 tests/outline/outline2.cc delete mode 100644 tests/outline/static_function_in_type.cc delete mode 100644 tests/outline/static_function_in_type.h delete mode 100644 tests/preprocessor/include_guard.cc delete mode 100644 tests/preprocessor/skipped.cc delete mode 100644 tests/templates/func_specialized_template_param.cc delete mode 100644 tests/templates/implicit_variable_instantiation.cc delete mode 100644 tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc delete mode 100644 tests/templates/namespace_template_type_usage_folded_into_one.cc delete mode 100644 tests/templates/specialized_func_definition.cc delete mode 100644 tests/templates/template_class_func_usage_folded_into_one.cc delete mode 100644 tests/templates/template_class_template_func_usage_folded_into_one.cc delete mode 100644 tests/templates/template_class_type_usage_folded_into_one.cc delete mode 100644 tests/templates/template_class_var_usage_folded_into_one.cc delete mode 100644 tests/templates/template_func_usage_folded_into_one.cc delete mode 100644 tests/templates/template_type_usage_folded_into_one.cc delete mode 100644 tests/templates/template_var_usage_folded_into_one.cc delete mode 100644 tests/types/anonymous_struct.cc delete mode 100644 tests/types/typedefs.cc delete mode 100644 tests/unions/union_decl.cc delete mode 100644 tests/unions/union_usage.cc delete mode 100644 tests/usage/func_called_from_constructor.cc delete mode 100644 tests/usage/func_called_from_macro_argument.cc delete mode 100644 tests/usage/func_called_from_template.cc delete mode 100644 tests/usage/func_called_implicit_ctor.cc delete mode 100644 tests/usage/func_usage_addr_func.cc delete mode 100644 tests/usage/func_usage_addr_method.cc delete mode 100644 tests/usage/func_usage_call_func.cc delete mode 100644 tests/usage/func_usage_call_method.cc delete mode 100644 tests/usage/func_usage_class_inline_var_def.cc delete mode 100644 tests/usage/func_usage_forward_decl_func.cc delete mode 100644 tests/usage/func_usage_forward_decl_method.cc delete mode 100644 tests/usage/func_usage_template_func.cc delete mode 100644 tests/usage/type_usage_as_template_parameter.cc delete mode 100644 tests/usage/type_usage_as_template_parameter_complex.cc delete mode 100644 tests/usage/type_usage_as_template_parameter_simple.cc delete mode 100644 tests/usage/type_usage_declare_extern.cc delete mode 100644 tests/usage/type_usage_declare_field.cc delete mode 100644 tests/usage/type_usage_declare_local.cc delete mode 100644 tests/usage/type_usage_declare_param.cc delete mode 100644 tests/usage/type_usage_declare_param_prototype.cc delete mode 100644 tests/usage/type_usage_declare_param_unnamed.cc delete mode 100644 tests/usage/type_usage_declare_qualifiers.cc delete mode 100644 tests/usage/type_usage_declare_static.cc delete mode 100644 tests/usage/type_usage_on_return_type.cc delete mode 100644 tests/usage/type_usage_typedef_and_using.cc delete mode 100644 tests/usage/type_usage_typedef_and_using_template.cc delete mode 100644 tests/usage/type_usage_various.cc delete mode 100644 tests/usage/usage_inside_of_call.cc delete mode 100644 tests/usage/usage_inside_of_call_simple.cc delete mode 100644 tests/usage/var_usage_call_function.cc delete mode 100644 tests/usage/var_usage_class_member.cc delete mode 100644 tests/usage/var_usage_class_member_static.cc delete mode 100644 tests/usage/var_usage_cstyle_cast.cc delete mode 100644 tests/usage/var_usage_extern.cc delete mode 100644 tests/usage/var_usage_func_parameter.cc delete mode 100644 tests/usage/var_usage_local.cc delete mode 100644 tests/usage/var_usage_shadowed_local.cc delete mode 100644 tests/usage/var_usage_shadowed_parameter.cc delete mode 100644 tests/usage/var_usage_static.cc delete mode 100644 tests/vars/class_member.cc delete mode 100644 tests/vars/class_static_member.cc delete mode 100644 tests/vars/class_static_member_decl_only.cc delete mode 100644 tests/vars/deduce_auto_type.cc delete mode 100644 tests/vars/function_local.cc delete mode 100644 tests/vars/function_param.cc delete mode 100644 tests/vars/function_param_unnamed.cc delete mode 100644 tests/vars/function_shadow_local.cc delete mode 100644 tests/vars/function_shadow_param.cc delete mode 100644 tests/vars/global_variable.cc delete mode 100644 tests/vars/global_variable_decl_only.cc delete mode 100644 tests/vars/type_instance_on_using_type.cc diff --git a/src/indexer.cc b/src/indexer.cc index 59bbc7a8..d0fb18f1 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -2041,7 +2041,7 @@ void IndexInit() { } void ClangSanityCheck() { - std::vector args = {"clang", "tests/vars/class_member.cc"}; + std::vector args = {"clang", "index_tests/vars/class_member.cc"}; unsigned opts = 0; CXIndex index = clang_createIndex(0, 1); CXTranslationUnit tu; diff --git a/src/test.cc b/src/test.cc index ca30d6a7..e641e667 100644 --- a/src/test.cc +++ b/src/test.cc @@ -124,7 +124,7 @@ void RunIndexTests(const std::string& filter_path) { bool update_all = false; ClangIndex index; - for (std::string path : GetFilesInFolder("tests", true /*recursive*/, + for (std::string path : GetFilesInFolder("index_tests", true /*recursive*/, true /*add_folder_to_path*/)) { if (!RunObjectiveCIndexTests() && EndsWithAny(path, {".m", ".mm"})) { std::cout << "Skipping \"" << path << "\" since this platform does not " diff --git a/tests/_empty_test.cc b/tests/_empty_test.cc deleted file mode 100644 index 237e1553..00000000 --- a/tests/_empty_test.cc +++ /dev/null @@ -1,10 +0,0 @@ -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/class_forward_declaration.cc b/tests/class_forward_declaration.cc deleted file mode 100644 index 3c66a1f8..00000000 --- a/tests/class_forward_declaration.cc +++ /dev/null @@ -1,29 +0,0 @@ -class Foo; -class Foo; -class Foo {}; -class Foo; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "3:7-3:10", - "definition_extent": "3:1-3:13", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:7-1:10", "2:7-2:10", "3:7-3:10", "4:7-4:10"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/constructors/constructor.cc b/tests/constructors/constructor.cc deleted file mode 100644 index cee6bb7e..00000000 --- a/tests/constructors/constructor.cc +++ /dev/null @@ -1,83 +0,0 @@ -class Foo { -public: - Foo() {} -}; - -void foo() { - Foo f; - Foo* f2 = new Foo(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [0, 1], - "uses": ["1:7-1:10", "3:3-3:6", "7:3-7:6", "8:3-8:6", "8:17-8:20"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Foo::Foo()", - "declarations": [], - "definition_spelling": "3:3-3:6", - "definition_extent": "3:3-3:11", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["~1@7:7-7:8", "1@8:17-8:20"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "6:6-6:9", - "definition_extent": "6:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["~0@7:7-7:8", "0@8:17-8:20"] - }], - "vars": [{ - "id": 0, - "usr": "c:constructor.cc@56@F@foo#@f", - "short_name": "f", - "detailed_name": "Foo f", - "definition_spelling": "7:7-7:8", - "definition_extent": "7:3-7:8", - "variable_type": 0, - "cls": 1, - "uses": ["7:7-7:8"] - }, { - "id": 1, - "usr": "c:constructor.cc@66@F@foo#@f2", - "short_name": "f2", - "detailed_name": "Foo * f2", - "definition_spelling": "8:8-8:10", - "definition_extent": "8:3-8:22", - "variable_type": 0, - "cls": 1, - "uses": ["8:8-8:10"] - }] -} -*/ diff --git a/tests/constructors/destructor.cc b/tests/constructors/destructor.cc deleted file mode 100644 index 7c939d85..00000000 --- a/tests/constructors/destructor.cc +++ /dev/null @@ -1,93 +0,0 @@ -class Foo { -public: - Foo() {} - ~Foo() {}; -}; - -void foo() { - Foo f; -} - -// TODO: Support destructors (notice how the dtor has no usages listed). -// - check if variable is a pointer. if so, do *not* insert dtor -// - check if variable is normal type. if so, insert dtor -// - scan for statements that look like dtors in function def handler -// - figure out some way to support w/ unique_ptrs? -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0, 1], - "vars": [], - "instances": [0], - "uses": ["1:7-1:10", "3:3-3:6", "4:4-4:7", "8:3-8:6"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Foo::Foo()", - "declarations": [], - "definition_spelling": "3:3-3:6", - "definition_extent": "3:3-3:11", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["~2@8:7-8:8"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Foo@F@~Foo#", - "short_name": "~Foo", - "detailed_name": "void Foo::~Foo() noexcept", - "declarations": [], - "definition_spelling": "4:3-4:7", - "definition_extent": "4:3-4:12", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "7:6-7:9", - "definition_extent": "7:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["~0@8:7-8:8"] - }], - "vars": [{ - "id": 0, - "usr": "c:destructor.cc@70@F@foo#@f", - "short_name": "f", - "detailed_name": "Foo f", - "definition_spelling": "8:7-8:8", - "definition_extent": "8:3-8:8", - "variable_type": 0, - "cls": 1, - "uses": ["8:7-8:8"] - }] -} -*/ diff --git a/tests/constructors/implicit_constructor.cc b/tests/constructors/implicit_constructor.cc deleted file mode 100644 index a4daf3f6..00000000 --- a/tests/constructors/implicit_constructor.cc +++ /dev/null @@ -1,82 +0,0 @@ -struct Type { - Type() {} -}; - -void Make() { - Type foo0; - auto foo1 = Type(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Type", - "short_name": "Type", - "detailed_name": "Type", - "definition_spelling": "1:8-1:12", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [0, 1], - "uses": ["1:8-1:12", "2:3-2:7", "6:3-6:7", "7:15-7:19"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Type@F@Type#", - "short_name": "Type", - "detailed_name": "void Type::Type()", - "declarations": [], - "definition_spelling": "2:3-2:7", - "definition_extent": "2:3-2:12", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["~1@6:8-6:12", "1@7:15-7:19"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@Make#", - "short_name": "Make", - "detailed_name": "void Make()", - "declarations": [], - "definition_spelling": "5:6-5:10", - "definition_extent": "5:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["~0@6:8-6:12", "0@7:15-7:19"] - }], - "vars": [{ - "id": 0, - "usr": "c:implicit_constructor.cc@51@F@Make#@foo0", - "short_name": "foo0", - "detailed_name": "Type foo0", - "definition_spelling": "6:8-6:12", - "definition_extent": "6:3-6:12", - "variable_type": 0, - "cls": 1, - "uses": ["6:8-6:12"] - }, { - "id": 1, - "usr": "c:implicit_constructor.cc@65@F@Make#@foo1", - "short_name": "foo1", - "detailed_name": "Type foo1", - "definition_spelling": "7:8-7:12", - "definition_extent": "7:3-7:21", - "variable_type": 0, - "cls": 1, - "uses": ["7:8-7:12"] - }] -} -*/ diff --git a/tests/constructors/invalid_reference.cc b/tests/constructors/invalid_reference.cc deleted file mode 100644 index 3a8abc4a..00000000 --- a/tests/constructors/invalid_reference.cc +++ /dev/null @@ -1,48 +0,0 @@ -struct Foo {}; - -template -Foo::Foo() {} - -/* -EXTRA_FLAGS: --fms-compatibility --fdelayed-template-parsing - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-1:14", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:8-1:11", "4:6-4:9", "4:1-4:4"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@FT@>1#TFoo#v#", - "short_name": "Foo", - "detailed_name": "void Foo::Foo()", - "declarations": [], - "definition_spelling": "4:6-4:9", - "definition_extent": "4:1-4:11", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/constructors/make_functions.cc b/tests/constructors/make_functions.cc deleted file mode 100644 index 06e69bbd..00000000 --- a/tests/constructors/make_functions.cc +++ /dev/null @@ -1,322 +0,0 @@ -#include "make_functions.h" - -template -T* MakeUnique(Args&&... args) { - return nullptr; -} - -template -T* maKE_NoRefs(Args... args) { - return nullptr; -} - -void caller22() { - MakeUnique(); - MakeUnique(1); - MakeUnique(1, new Bar(), nullptr); - maKE_NoRefs(1, new Bar(), nullptr); -} - -// TODO: Eliminate the extra entries in the "types" array here. They come from -// the template function definitions. - -// Foobar is defined in a separate file to ensure that we can attribute -// MakeUnique calls across translation units. - -/* -OUTPUT: make_functions.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Bar", - "short_name": "Bar", - "detailed_name": "Bar", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-1:14", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:11", "7:17-7:20", "8:15-8:18"] - }, { - "id": 1, - "usr": "c:@S@Foobar", - "short_name": "Foobar", - "detailed_name": "Foobar", - "definition_spelling": "3:7-3:13", - "definition_extent": "3:1-9:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0, 1, 2, 3], - "vars": [], - "instances": [], - "uses": ["3:7-3:13", "5:3-5:9", "6:3-6:9", "7:3-7:9", "8:3-8:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#", - "short_name": "Foobar", - "detailed_name": "void Foobar::Foobar()", - "declarations": [], - "definition_spelling": "5:3-5:9", - "definition_extent": "5:3-5:14", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#I#", - "short_name": "Foobar", - "detailed_name": "void Foobar::Foobar(int)", - "declarations": [], - "definition_spelling": "6:3-6:9", - "definition_extent": "6:3-6:17", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#&&I#*$@S@Bar#*b#", - "short_name": "Foobar", - "detailed_name": "void Foobar::Foobar(int &&, Bar *, bool *)", - "declarations": [], - "definition_spelling": "7:3-7:9", - "definition_extent": "7:3-7:32", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#I#*$@S@Bar#*b#", - "short_name": "Foobar", - "detailed_name": "void Foobar::Foobar(int, Bar *, bool *)", - "declarations": [], - "definition_spelling": "8:3-8:9", - "definition_extent": "8:3-8:30", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -OUTPUT: make_functions.cc -{ - "includes": [{ - "line": 1, - "resolved_path": "&make_functions.h" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:make_functions.cc@41", - "short_name": "T", - "detailed_name": "T", - "definition_spelling": "3:20-3:21", - "definition_extent": "3:11-3:21", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:1-4:2"] - }, { - "id": 1, - "usr": "c:make_functions.cc@53", - "short_name": "Args", - "detailed_name": "Args", - "definition_spelling": "3:35-3:39", - "definition_extent": "3:23-3:39", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:15-4:19"] - }, { - "id": 2, - "usr": "c:make_functions.cc@139", - "short_name": "T", - "detailed_name": "T", - "definition_spelling": "8:20-8:21", - "definition_extent": "8:11-8:21", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["9:1-9:2"] - }, { - "id": 3, - "usr": "c:make_functions.cc@151", - "short_name": "Args", - "detailed_name": "Args", - "definition_spelling": "8:35-8:39", - "definition_extent": "8:23-8:39", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["9:16-9:20"] - }, { - "id": 4, - "usr": "c:@S@Foobar", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["14:14-14:20", "15:14-15:20", "16:14-16:20", "17:15-17:21"] - }, { - "id": 5, - "usr": "c:@S@Bar", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["16:29-16:32", "17:30-17:33"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@FT@>2#T#pTMakeUnique#P&&t0.1#*t0.0#", - "short_name": "MakeUnique", - "detailed_name": "T *MakeUnique(Args &&... args)", - "declarations": [], - "definition_spelling": "4:4-4:14", - "definition_extent": "4:1-6:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@14:3-14:13", "2@15:3-15:13", "2@16:3-16:13"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@FT@>2#T#pTmaKE_NoRefs#Pt0.1#*t0.0#", - "short_name": "maKE_NoRefs", - "detailed_name": "T *maKE_NoRefs(Args... args)", - "declarations": [], - "definition_spelling": "9:4-9:15", - "definition_extent": "9:1-11:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@17:3-17:14"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@caller22#", - "short_name": "caller22", - "detailed_name": "void caller22()", - "declarations": [], - "definition_spelling": "13:6-13:14", - "definition_extent": "13:1-18:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@14:3-14:13", "0@15:3-15:13", "0@16:3-16:13", "1@17:3-17:14"] - }, { - "id": 3, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["~-1@14:3-14:13"], - "callees": [] - }, { - "id": 4, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#I#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["~-1@15:3-15:13"], - "callees": [] - }, { - "id": 5, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#&&I#*$@S@Bar#*b#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["~-1@16:3-16:13"], - "callees": [] - }, { - "id": 6, - "is_operator": false, - "usr": "c:@S@Foobar@F@Foobar#I#*$@S@Bar#*b#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["~-1@17:3-17:14"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:make_functions.cc@86@FT@>2#T#pTMakeUnique#P&&t0.1#*t0.0#@args", - "short_name": "args", - "detailed_name": "Args &&... args", - "definition_spelling": "4:25-4:29", - "definition_extent": "4:15-4:29", - "cls": 1, - "uses": ["4:25-4:29"] - }, { - "id": 1, - "usr": "c:make_functions.cc@185@FT@>2#T#pTmaKE_NoRefs#Pt0.1#*t0.0#@args", - "short_name": "args", - "detailed_name": "Args... args", - "definition_spelling": "9:24-9:28", - "definition_extent": "9:16-9:28", - "cls": 1, - "uses": ["9:24-9:28"] - }] -} -*/ diff --git a/tests/constructors/make_functions.h b/tests/constructors/make_functions.h deleted file mode 100644 index f119cfb8..00000000 --- a/tests/constructors/make_functions.h +++ /dev/null @@ -1,10 +0,0 @@ -struct Bar {}; - -class Foobar { - public: - Foobar() {} - Foobar(int) {} - Foobar(int&&, Bar*, bool*) {} - Foobar(int, Bar*, bool*) {} -}; - diff --git a/tests/declaration_vs_definition/class.cc b/tests/declaration_vs_definition/class.cc deleted file mode 100644 index 2470c80d..00000000 --- a/tests/declaration_vs_definition/class.cc +++ /dev/null @@ -1,31 +0,0 @@ -class Foo; -class Foo; -class Foo {}; -class Foo; - -/* -// NOTE: Separate decl/definition are not supported for classes. See source -// for comments. -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "3:7-3:10", - "definition_extent": "3:1-3:13", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:7-1:10", "2:7-2:10", "3:7-3:10", "4:7-4:10"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/declaration_vs_definition/class_member.cc b/tests/declaration_vs_definition/class_member.cc deleted file mode 100644 index 007e38db..00000000 --- a/tests/declaration_vs_definition/class_member.cc +++ /dev/null @@ -1,38 +0,0 @@ -class Foo { - int foo; -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [], - "uses": ["1:7-1:10"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@FI@foo", - "short_name": "foo", - "detailed_name": "int Foo::foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:3-2:10", - "declaring_type": 0, - "cls": 4, - "uses": ["2:7-2:10"] - }] -} -*/ diff --git a/tests/declaration_vs_definition/class_member_static.cc b/tests/declaration_vs_definition/class_member_static.cc deleted file mode 100644 index 03d29105..00000000 --- a/tests/declaration_vs_definition/class_member_static.cc +++ /dev/null @@ -1,41 +0,0 @@ -class Foo { - static int foo; -}; - -int Foo::foo; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [], - "uses": ["1:7-1:10", "5:5-5:8"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@foo", - "short_name": "foo", - "detailed_name": "int Foo::foo", - "declaration": "2:14-2:17", - "definition_spelling": "5:10-5:13", - "definition_extent": "5:1-5:13", - "declaring_type": 0, - "cls": 4, - "uses": ["2:14-2:17", "5:10-5:13"] - }] -} -*/ diff --git a/tests/declaration_vs_definition/func.cc b/tests/declaration_vs_definition/func.cc deleted file mode 100644 index 0c9793c0..00000000 --- a/tests/declaration_vs_definition/func.cc +++ /dev/null @@ -1,45 +0,0 @@ -void foo(); -void foo(); -void foo() {} -void foo(); - -/* -// Note: we always use the latest seen ("most local") definition/declaration. -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [{ - "spelling": "1:6-1:9", - "extent": "1:1-1:11", - "content": "void foo()", - "param_spellings": [] - }, { - "spelling": "2:6-2:9", - "extent": "2:1-2:11", - "content": "void foo()", - "param_spellings": [] - }, { - "spelling": "4:6-4:9", - "extent": "4:1-4:11", - "content": "void foo()", - "param_spellings": [] - }], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-3:14", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/declaration_vs_definition/func_associated_function_params.cc b/tests/declaration_vs_definition/func_associated_function_params.cc deleted file mode 100644 index 2e4ddb20..00000000 --- a/tests/declaration_vs_definition/func_associated_function_params.cc +++ /dev/null @@ -1,63 +0,0 @@ -int foo(int, int); -int foo(int aa, - int bb); -int foo(int aaa, int bbb); -int foo(int a, int b) { return 0; } - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#I#", - "short_name": "foo", - "detailed_name": "int foo(int a, int b)", - "declarations": [{ - "spelling": "1:5-1:8", - "extent": "1:1-1:18", - "content": "int foo(int, int)", - "param_spellings": ["1:12-1:12", "1:17-1:17"] - }, { - "spelling": "2:5-2:8", - "extent": "2:1-3:16", - "content": "int foo(int aa,\n int bb)", - "param_spellings": ["2:13-2:15", "3:13-3:15"] - }, { - "spelling": "4:5-4:8", - "extent": "4:1-4:26", - "content": "int foo(int aaa, int bbb)", - "param_spellings": ["4:13-4:16", "4:22-4:25"] - }], - "definition_spelling": "5:5-5:8", - "definition_extent": "5:1-5:36", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:func_associated_function_params.cc@91@F@foo#I#I#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "5:13-5:14", - "definition_extent": "5:9-5:14", - "cls": 1, - "uses": ["5:13-5:14"] - }, { - "id": 1, - "usr": "c:func_associated_function_params.cc@98@F@foo#I#I#@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "5:20-5:21", - "definition_extent": "5:16-5:21", - "cls": 1, - "uses": ["5:20-5:21"] - }] -} -*/ diff --git a/tests/declaration_vs_definition/method.cc b/tests/declaration_vs_definition/method.cc deleted file mode 100644 index 619bc0ee..00000000 --- a/tests/declaration_vs_definition/method.cc +++ /dev/null @@ -1,88 +0,0 @@ -class Foo { - void declonly(); - virtual void purevirtual() = 0; - void def(); -}; - -void Foo::def() {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0, 1, 2], - "vars": [], - "instances": [], - "uses": ["1:7-1:10", "7:6-7:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@declonly#", - "short_name": "declonly", - "detailed_name": "void Foo::declonly()", - "declarations": [{ - "spelling": "2:8-2:16", - "extent": "2:3-2:18", - "content": "void declonly()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Foo@F@purevirtual#", - "short_name": "purevirtual", - "detailed_name": "void Foo::purevirtual()", - "declarations": [{ - "spelling": "3:16-3:27", - "extent": "3:3-3:33", - "content": "virtual void purevirtual() = 0", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@S@Foo@F@def#", - "short_name": "def", - "detailed_name": "void Foo::def()", - "declarations": [{ - "spelling": "4:8-4:11", - "extent": "4:3-4:13", - "content": "void def()", - "param_spellings": [] - }], - "definition_spelling": "7:11-7:14", - "definition_extent": "7:1-7:19", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/enums/enum_class_decl.cc b/tests/enums/enum_class_decl.cc deleted file mode 100644 index f38d91dd..00000000 --- a/tests/enums/enum_class_decl.cc +++ /dev/null @@ -1,51 +0,0 @@ -enum class Foo { - A, - B = 20 -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:12-1:15", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [], - "uses": ["1:12-1:15"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo@A", - "short_name": "A", - "detailed_name": "Foo::A", - "definition_spelling": "2:3-2:4", - "definition_extent": "2:3-2:4", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:3-2:4"] - }, { - "id": 1, - "usr": "c:@E@Foo@B", - "short_name": "B", - "detailed_name": "Foo::B", - "definition_spelling": "3:3-3:4", - "definition_extent": "3:3-3:9", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["3:3-3:4"] - }] -} -*/ diff --git a/tests/enums/enum_decl.cc b/tests/enums/enum_decl.cc deleted file mode 100644 index 707b7ca5..00000000 --- a/tests/enums/enum_decl.cc +++ /dev/null @@ -1,51 +0,0 @@ -enum Foo { - A, - B = 20 -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [], - "uses": ["1:6-1:9"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo@A", - "short_name": "A", - "detailed_name": "Foo::A", - "definition_spelling": "2:3-2:4", - "definition_extent": "2:3-2:4", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:3-2:4"] - }, { - "id": 1, - "usr": "c:@E@Foo@B", - "short_name": "B", - "detailed_name": "Foo::B", - "definition_spelling": "3:3-3:4", - "definition_extent": "3:3-3:9", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["3:3-3:4"] - }] -} -*/ diff --git a/tests/enums/enum_inherit.cc b/tests/enums/enum_inherit.cc deleted file mode 100644 index 693cb27a..00000000 --- a/tests/enums/enum_inherit.cc +++ /dev/null @@ -1,51 +0,0 @@ -enum Foo : int { - A, - B = 20 -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [], - "uses": ["1:6-1:9"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo@A", - "short_name": "A", - "detailed_name": "Foo::A", - "definition_spelling": "2:3-2:4", - "definition_extent": "2:3-2:4", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:3-2:4"] - }, { - "id": 1, - "usr": "c:@E@Foo@B", - "short_name": "B", - "detailed_name": "Foo::B", - "definition_spelling": "3:3-3:4", - "definition_extent": "3:3-3:9", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["3:3-3:4"] - }] -} -*/ diff --git a/tests/enums/enum_usage.cc b/tests/enums/enum_usage.cc deleted file mode 100644 index 442320c4..00000000 --- a/tests/enums/enum_usage.cc +++ /dev/null @@ -1,63 +0,0 @@ -enum class Foo { - A, - B = 20 -}; - -Foo x = Foo::A; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:12-1:15", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [2], - "uses": ["1:12-1:15", "6:1-6:4", "6:9-6:12"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo@A", - "short_name": "A", - "detailed_name": "Foo::A", - "definition_spelling": "2:3-2:4", - "definition_extent": "2:3-2:4", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:3-2:4", "6:14-6:15"] - }, { - "id": 1, - "usr": "c:@E@Foo@B", - "short_name": "B", - "detailed_name": "Foo::B", - "definition_spelling": "3:3-3:4", - "definition_extent": "3:3-3:9", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["3:3-3:4"] - }, { - "id": 2, - "usr": "c:@x", - "short_name": "x", - "detailed_name": "Foo x", - "definition_spelling": "6:5-6:6", - "definition_extent": "6:1-6:15", - "variable_type": 0, - "cls": 3, - "uses": ["6:5-6:6"] - }] -} -*/ diff --git a/tests/foobar.cc b/tests/foobar.cc deleted file mode 100644 index e2965b96..00000000 --- a/tests/foobar.cc +++ /dev/null @@ -1,96 +0,0 @@ -enum A {}; -enum B {}; - -template -struct Foo { - struct Inner {}; -}; - -Foo::Inner a; -Foo b; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@A", - "short_name": "A", - "detailed_name": "A", - "definition_spelling": "1:6-1:7", - "definition_extent": "1:1-1:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:6-1:7", "9:5-9:6"] - }, { - "id": 1, - "usr": "c:@E@B", - "short_name": "B", - "detailed_name": "B", - "definition_spelling": "2:6-2:7", - "definition_extent": "2:1-2:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:6-2:7", "10:5-10:6"] - }, { - "id": 2, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "5:8-5:11", - "definition_extent": "5:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": ["5:8-5:11", "9:1-9:4", "10:1-10:4"] - }, { - "id": 3, - "usr": "c:@ST>1#T@Foo@S@Inner", - "short_name": "Inner", - "detailed_name": "Foo::Inner", - "definition_spelling": "6:10-6:15", - "definition_extent": "6:3-6:18", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["6:10-6:15", "9:9-9:14"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "Foo::Inner a", - "definition_spelling": "9:15-9:16", - "definition_extent": "9:1-9:16", - "variable_type": 3, - "cls": 3, - "uses": ["9:15-9:16"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "Foo b", - "definition_spelling": "10:8-10:9", - "definition_extent": "10:1-10:9", - "variable_type": 2, - "cls": 3, - "uses": ["10:8-10:9"] - }] -} -*/ diff --git a/tests/function_declaration.cc b/tests/function_declaration.cc deleted file mode 100644 index 072aa377..00000000 --- a/tests/function_declaration.cc +++ /dev/null @@ -1,29 +0,0 @@ -void foo(int a, int b); - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#I#", - "short_name": "foo", - "detailed_name": "void foo(int a, int b)", - "declarations": [{ - "spelling": "1:6-1:9", - "extent": "1:1-1:23", - "content": "void foo(int a, int b)", - "param_spellings": ["1:14-1:15", "1:21-1:22"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/function_declaration_definition.cc b/tests/function_declaration_definition.cc deleted file mode 100644 index 89c45b64..00000000 --- a/tests/function_declaration_definition.cc +++ /dev/null @@ -1,33 +0,0 @@ -void foo(); - -void foo() {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [{ - "spelling": "1:6-1:9", - "extent": "1:1-1:11", - "content": "void foo()", - "param_spellings": [] - }], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-3:14", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/function_definition.cc b/tests/function_definition.cc deleted file mode 100644 index cc238661..00000000 --- a/tests/function_definition.cc +++ /dev/null @@ -1,26 +0,0 @@ -void foo() {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-1:14", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/inheritance/class_inherit.cc b/tests/inheritance/class_inherit.cc deleted file mode 100644 index 79d3003a..00000000 --- a/tests/inheritance/class_inherit.cc +++ /dev/null @@ -1,41 +0,0 @@ -class Parent {}; -class Derived : public Parent {}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Parent", - "short_name": "Parent", - "detailed_name": "Parent", - "definition_spelling": "1:7-1:13", - "definition_extent": "1:1-1:16", - "parents": [], - "derived": [1], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:7-1:13", "2:24-2:30"] - }, { - "id": 1, - "usr": "c:@S@Derived", - "short_name": "Derived", - "detailed_name": "Derived", - "definition_spelling": "2:7-2:14", - "definition_extent": "2:1-2:33", - "parents": [0], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:7-2:14"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/inheritance/class_inherit_templated_parent.cc b/tests/inheritance/class_inherit_templated_parent.cc deleted file mode 100644 index 97489b72..00000000 --- a/tests/inheritance/class_inherit_templated_parent.cc +++ /dev/null @@ -1,106 +0,0 @@ -template -class Base1 {}; - -template -class Base2 {}; - -template -class Derived1 : Base1 {}; - -template -class Derived2 : Base2 {}; - -class Derived : Base1<3>, Base2, Derived1<4>, Derived2 {}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#Ni@Base1", - "short_name": "Base1", - "detailed_name": "Base1", - "definition_spelling": "2:7-2:12", - "definition_extent": "2:1-2:15", - "parents": [], - "derived": [2, 5], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:7-2:12", "8:18-8:23", "13:17-13:22"] - }, { - "id": 1, - "usr": "c:@ST>1#T@Base2", - "short_name": "Base2", - "detailed_name": "Base2", - "definition_spelling": "5:7-5:12", - "definition_extent": "5:1-5:15", - "parents": [], - "derived": [3, 5], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:7-5:12", "11:18-11:23", "13:27-13:32"] - }, { - "id": 2, - "usr": "c:@ST>1#Ni@Derived1", - "short_name": "Derived1", - "detailed_name": "Derived1", - "definition_spelling": "8:7-8:15", - "definition_extent": "8:1-8:29", - "parents": [0], - "derived": [5], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["8:7-8:15", "13:43-13:51"] - }, { - "id": 3, - "usr": "c:@ST>1#T@Derived2", - "short_name": "Derived2", - "detailed_name": "Derived2", - "definition_spelling": "11:7-11:15", - "definition_extent": "11:1-11:29", - "parents": [1], - "derived": [5], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["11:7-11:15", "13:56-13:64"] - }, { - "id": 4, - "usr": "c:class_inherit_templated_parent.cc@154", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["11:24-11:25"] - }, { - "id": 5, - "usr": "c:@S@Derived", - "short_name": "Derived", - "detailed_name": "Derived", - "definition_spelling": "13:7-13:14", - "definition_extent": "13:1-13:76", - "parents": [0, 1, 2, 3], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["13:7-13:14", "13:33-13:40", "13:65-13:72"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/inheritance/class_multiple_inherit.cc b/tests/inheritance/class_multiple_inherit.cc deleted file mode 100644 index b017c1a6..00000000 --- a/tests/inheritance/class_multiple_inherit.cc +++ /dev/null @@ -1,71 +0,0 @@ -class Root {}; -class MiddleA : public Root {}; -class MiddleB : public Root {}; -class Derived : public MiddleA, public MiddleB {}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Root", - "short_name": "Root", - "detailed_name": "Root", - "definition_spelling": "1:7-1:11", - "definition_extent": "1:1-1:14", - "parents": [], - "derived": [1, 2], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:7-1:11", "2:24-2:28", "3:24-3:28"] - }, { - "id": 1, - "usr": "c:@S@MiddleA", - "short_name": "MiddleA", - "detailed_name": "MiddleA", - "definition_spelling": "2:7-2:14", - "definition_extent": "2:1-2:31", - "parents": [0], - "derived": [3], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:7-2:14", "4:24-4:31"] - }, { - "id": 2, - "usr": "c:@S@MiddleB", - "short_name": "MiddleB", - "detailed_name": "MiddleB", - "definition_spelling": "3:7-3:14", - "definition_extent": "3:1-3:31", - "parents": [0], - "derived": [3], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["3:7-3:14", "4:40-4:47"] - }, { - "id": 3, - "usr": "c:@S@Derived", - "short_name": "Derived", - "detailed_name": "Derived", - "definition_spelling": "4:7-4:14", - "definition_extent": "4:1-4:50", - "parents": [1, 2], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:7-4:14"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/inheritance/function_override.cc b/tests/inheritance/function_override.cc deleted file mode 100644 index 935ec4a1..00000000 --- a/tests/inheritance/function_override.cc +++ /dev/null @@ -1,78 +0,0 @@ -class Root { - virtual void foo(); -}; -class Derived : public Root { - void foo() override {} -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Root", - "short_name": "Root", - "detailed_name": "Root", - "definition_spelling": "1:7-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [1], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:7-1:11", "4:24-4:28"] - }, { - "id": 1, - "usr": "c:@S@Derived", - "short_name": "Derived", - "detailed_name": "Derived", - "definition_spelling": "4:7-4:14", - "definition_extent": "4:1-6:2", - "parents": [0], - "derived": [], - "types": [], - "funcs": [1], - "vars": [], - "instances": [], - "uses": ["4:7-4:14"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Root@F@foo#", - "short_name": "foo", - "detailed_name": "void Root::foo()", - "declarations": [{ - "spelling": "2:16-2:19", - "extent": "2:3-2:21", - "content": "virtual void foo()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [1], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Derived@F@foo#", - "short_name": "foo", - "detailed_name": "void Derived::foo()", - "declarations": [], - "definition_spelling": "5:8-5:11", - "definition_extent": "5:3-5:25", - "declaring_type": 1, - "base": [0], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/inheritance/interface_pure_virtual.cc b/tests/inheritance/interface_pure_virtual.cc deleted file mode 100644 index 7abff382..00000000 --- a/tests/inheritance/interface_pure_virtual.cc +++ /dev/null @@ -1,46 +0,0 @@ -class IFoo { - virtual void foo() = 0; -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@IFoo", - "short_name": "IFoo", - "detailed_name": "IFoo", - "definition_spelling": "1:7-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:7-1:11"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@IFoo@F@foo#", - "short_name": "foo", - "detailed_name": "void IFoo::foo()", - "declarations": [{ - "spelling": "2:16-2:19", - "extent": "2:3-2:25", - "content": "virtual void foo() = 0", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/inheritance/multiple_base_functions.cc b/tests/inheritance/multiple_base_functions.cc deleted file mode 100644 index 351cfd1e..00000000 --- a/tests/inheritance/multiple_base_functions.cc +++ /dev/null @@ -1,107 +0,0 @@ -struct Base0 { - virtual ~Base0() { } -}; -struct Base1 { - virtual ~Base1() { } -}; -struct Derived : Base0, Base1 { - ~Derived() override { } -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Base0", - "short_name": "Base0", - "detailed_name": "Base0", - "definition_spelling": "1:8-1:13", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [2], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:8-1:13", "2:12-2:17", "7:18-7:23"] - }, { - "id": 1, - "usr": "c:@S@Base1", - "short_name": "Base1", - "detailed_name": "Base1", - "definition_spelling": "4:8-4:13", - "definition_extent": "4:1-6:2", - "parents": [], - "derived": [2], - "types": [], - "funcs": [1], - "vars": [], - "instances": [], - "uses": ["4:8-4:13", "5:12-5:17", "7:25-7:30"] - }, { - "id": 2, - "usr": "c:@S@Derived", - "short_name": "Derived", - "detailed_name": "Derived", - "definition_spelling": "7:8-7:15", - "definition_extent": "7:1-9:2", - "parents": [0, 1], - "derived": [], - "types": [], - "funcs": [2], - "vars": [], - "instances": [], - "uses": ["7:8-7:15", "8:4-8:11"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Base0@F@~Base0#", - "short_name": "~Base0", - "detailed_name": "void Base0::~Base0() noexcept", - "declarations": [], - "definition_spelling": "2:11-2:17", - "definition_extent": "2:3-2:23", - "declaring_type": 0, - "base": [], - "derived": [2], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Base1@F@~Base1#", - "short_name": "~Base1", - "detailed_name": "void Base1::~Base1() noexcept", - "declarations": [], - "definition_spelling": "5:11-5:17", - "definition_extent": "5:3-5:23", - "declaring_type": 1, - "base": [], - "derived": [2], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@S@Derived@F@~Derived#", - "short_name": "~Derived", - "detailed_name": "void Derived::~Derived() noexcept", - "declarations": [], - "definition_spelling": "8:3-8:11", - "definition_extent": "8:3-8:26", - "declaring_type": 2, - "base": [0, 1], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ \ No newline at end of file diff --git a/tests/lambdas/lambda.cc b/tests/lambdas/lambda.cc deleted file mode 100644 index fd686e79..00000000 --- a/tests/lambdas/lambda.cc +++ /dev/null @@ -1,89 +0,0 @@ -void foo() { - int x; - - auto dosomething = [&x](int y) { - ++x; - ++y; - }; - - dosomething(1); - dosomething(1); - dosomething(1); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:lambda.cc@47@F@foo#@Sa", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": [] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-12:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@9:14-9:15", "1@10:14-10:15", "1@11:14-11:15"] - }, { - "id": 1, - "is_operator": false, - "usr": "c:lambda.cc@57@F@foo#@Sa@F@operator()#I#1", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["0@9:14-9:15", "0@10:14-10:15", "0@11:14-11:15"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:lambda.cc@16@F@foo#@x", - "short_name": "x", - "detailed_name": "int x", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:8", - "cls": 1, - "uses": ["2:7-2:8", "5:7-5:8", "4:24-4:25"] - }, { - "id": 1, - "usr": "c:lambda.cc@28@F@foo#@dosomething", - "short_name": "dosomething", - "detailed_name": "lambda dosomething", - "definition_spelling": "4:8-4:19", - "definition_extent": "4:3-7:4", - "variable_type": 0, - "cls": 1, - "uses": ["4:8-4:19", "9:3-9:14", "10:3-10:14", "11:3-11:14"] - }, { - "id": 2, - "usr": "c:lambda.cc@52@F@foo#@Sa@F@operator()#I#1@y", - "short_name": "y", - "detailed_name": "int y", - "definition_spelling": "4:31-4:32", - "definition_extent": "4:27-4:32", - "cls": 4, - "uses": ["4:31-4:32", "6:7-6:8"] - }] -} -*/ diff --git a/tests/macros/complex.cc b/tests/macros/complex.cc deleted file mode 100644 index d782f62c..00000000 --- a/tests/macros/complex.cc +++ /dev/null @@ -1,75 +0,0 @@ -#define FOO(aaa, bbb) \ - int a();\ - int a() { return aaa + bbb; } - - -int make1() { - return 3; -} -const int make2 = 5; - - -FOO(make1(), make2); - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@make1#", - "short_name": "make1", - "detailed_name": "int make1()", - "declarations": [], - "definition_spelling": "6:5-6:10", - "definition_extent": "6:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["1@12:5-12:10"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@a#", - "short_name": "a", - "detailed_name": "int a()", - "declarations": [{ - "spelling": "12:1-12:20", - "extent": "12:1-12:20", - "content": "int a();\n int a() { return aaa + bbb; }\n\n\n int make1() {\n return 3;\n }\n const int make2 = 5;\n\n\n FOO(make1(), make2)", - "param_spellings": [] - }], - "definition_spelling": "12:1-12:20", - "definition_extent": "12:1-12:20", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@12:5-12:10"] - }], - "vars": [{ - "id": 0, - "usr": "c:complex.cc@make2", - "short_name": "make2", - "detailed_name": "const int make2", - "definition_spelling": "9:11-9:16", - "definition_extent": "9:1-9:20", - "cls": 3, - "uses": ["9:11-9:16", "12:14-12:19"] - }, { - "id": 1, - "usr": "c:complex.cc@8@macro@FOO", - "short_name": "FOO", - "detailed_name": "FOO", - "hover": "#define FOO(aaa, bbb)\n int a();\n int a() { return aaa + bbb; }", - "definition_spelling": "1:9-1:12", - "definition_extent": "1:9-3:32", - "cls": 2, - "uses": ["1:9-1:12", "12:1-12:4"] - }] -} -*/ \ No newline at end of file diff --git a/tests/macros/foo.cc b/tests/macros/foo.cc deleted file mode 100644 index 31d399b9..00000000 --- a/tests/macros/foo.cc +++ /dev/null @@ -1,62 +0,0 @@ -#define A 5 -#define DISALLOW(type) type(type&&) = delete; - -struct Foo { - DISALLOW(Foo); -}; - -int x = A; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "4:8-4:11", - "definition_extent": "4:1-6:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:8-4:11"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@x", - "short_name": "x", - "detailed_name": "int x", - "definition_spelling": "8:5-8:6", - "definition_extent": "8:1-8:10", - "cls": 3, - "uses": ["8:5-8:6"] - }, { - "id": 1, - "usr": "c:foo.cc@8@macro@A", - "short_name": "A", - "detailed_name": "A", - "hover": "#define A 5", - "definition_spelling": "1:9-1:10", - "definition_extent": "1:9-1:12", - "cls": 2, - "uses": ["1:9-1:10", "8:9-8:10"] - }, { - "id": 2, - "usr": "c:foo.cc@21@macro@DISALLOW", - "short_name": "DISALLOW", - "detailed_name": "DISALLOW", - "hover": "#define DISALLOW(type) type(type&&) = delete;", - "definition_spelling": "2:9-2:17", - "definition_extent": "2:9-2:46", - "cls": 2, - "uses": ["2:9-2:17", "5:3-5:11"] - }] -} -*/ diff --git a/tests/method_declaration.cc b/tests/method_declaration.cc deleted file mode 100644 index 84aabd1c..00000000 --- a/tests/method_declaration.cc +++ /dev/null @@ -1,50 +0,0 @@ -class Foo { - void foo(); -}; - -/* -// NOTE: Lack of declaring_type in functions and funcs in Foo is okay, because -// those are processed when we find the definition for Foo::foo. Pure -// virtuals are treated specially and get added to the type immediately. - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:7-1:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void Foo::foo()", - "declarations": [{ - "spelling": "2:8-2:11", - "extent": "2:3-2:13", - "content": "void foo()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/method_definition.cc b/tests/method_definition.cc deleted file mode 100644 index 61a49e17..00000000 --- a/tests/method_definition.cc +++ /dev/null @@ -1,50 +0,0 @@ -class Foo { - void foo() const; -}; - -void Foo::foo() const {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:7-1:10", "5:6-5:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@foo#1", - "short_name": "foo", - "detailed_name": "void Foo::foo() const", - "declarations": [{ - "spelling": "2:8-2:11", - "extent": "2:3-2:19", - "content": "void foo() const", - "param_spellings": [] - }], - "definition_spelling": "5:11-5:14", - "definition_extent": "5:1-5:25", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/method_inline_declaration.cc b/tests/method_inline_declaration.cc deleted file mode 100644 index 55ca1de1..00000000 --- a/tests/method_inline_declaration.cc +++ /dev/null @@ -1,43 +0,0 @@ -class Foo { - void foo() {} -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:7-1:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void Foo::foo()", - "declarations": [], - "definition_spelling": "2:8-2:11", - "definition_extent": "2:3-2:16", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/multi_file/funky_enum.cc b/tests/multi_file/funky_enum.cc deleted file mode 100644 index e436456f..00000000 --- a/tests/multi_file/funky_enum.cc +++ /dev/null @@ -1,87 +0,0 @@ -enum Foo { -#include "funky_enum.h" -}; - -/* -// TODO: In the future try to have better support for types defined across -// multiple files. - -OUTPUT: funky_enum.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1, 2], - "instances": [], - "uses": [] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo@A", - "short_name": "A", - "detailed_name": "Foo::A", - "definition_spelling": "4:1-4:2", - "definition_extent": "4:1-4:2", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["4:1-4:2"] - }, { - "id": 1, - "usr": "c:@E@Foo@B", - "short_name": "B", - "detailed_name": "Foo::B", - "definition_spelling": "5:1-5:2", - "definition_extent": "5:1-5:2", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["5:1-5:2"] - }, { - "id": 2, - "usr": "c:@E@Foo@C", - "short_name": "C", - "detailed_name": "Foo::C", - "definition_spelling": "6:1-6:2", - "definition_extent": "6:1-6:2", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["6:1-6:2"] - }] -} -OUTPUT: funky_enum.cc -{ - "includes": [{ - "line": 2, - "resolved_path": "&funky_enum.h" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:6-1:9"] - }], - "funcs": [], - "vars": [] -} -*/ \ No newline at end of file diff --git a/tests/multi_file/funky_enum.h b/tests/multi_file/funky_enum.h deleted file mode 100644 index b11cc441..00000000 --- a/tests/multi_file/funky_enum.h +++ /dev/null @@ -1,6 +0,0 @@ -// This file cannot be built directory. It is included in an enum definition of -// another file. - -A, -B, -C \ No newline at end of file diff --git a/tests/multi_file/header.h b/tests/multi_file/header.h deleted file mode 100644 index 717ef821..00000000 --- a/tests/multi_file/header.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -struct Base {}; - -struct SameFileDerived : Base {}; - -using Foo0 = SameFileDerived; - -template -void Foo1() {} - -template -struct Foo2 {}; - -enum Foo3 { A, B, C }; - -int Foo4; -static int Foo5; \ No newline at end of file diff --git a/tests/multi_file/impl.cc b/tests/multi_file/impl.cc deleted file mode 100644 index 581e3fea..00000000 --- a/tests/multi_file/impl.cc +++ /dev/null @@ -1,190 +0,0 @@ -#include "header.h" - -void Impl() { - Foo1(); -} - -/* -OUTPUT: header.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Base", - "short_name": "Base", - "detailed_name": "Base", - "definition_spelling": "3:8-3:12", - "definition_extent": "3:1-3:15", - "parents": [], - "derived": [1], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["3:8-3:12", "5:26-5:30"] - }, { - "id": 1, - "usr": "c:@S@SameFileDerived", - "short_name": "SameFileDerived", - "detailed_name": "SameFileDerived", - "definition_spelling": "5:8-5:23", - "definition_extent": "5:1-5:33", - "parents": [0], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:8-5:23", "7:14-7:29"] - }, { - "id": 2, - "usr": "c:@Foo0", - "short_name": "Foo0", - "detailed_name": "Foo0", - "hover": "using Foo0 = SameFileDerived", - "definition_spelling": "7:7-7:11", - "definition_extent": "7:1-7:29", - "alias_of": 1, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["7:7-7:11"] - }, { - "id": 3, - "usr": "c:@ST>1#T@Foo2", - "short_name": "Foo2", - "detailed_name": "Foo2", - "definition_spelling": "13:8-13:12", - "definition_extent": "13:1-13:15", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["13:8-13:12"] - }, { - "id": 4, - "usr": "c:@E@Foo3", - "short_name": "Foo3", - "detailed_name": "Foo3", - "definition_spelling": "15:6-15:10", - "definition_extent": "15:1-15:22", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1, 2], - "instances": [], - "uses": ["15:6-15:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@FT@>1#TFoo1#v#", - "short_name": "Foo1", - "detailed_name": "void Foo1()", - "declarations": [], - "definition_spelling": "10:6-10:10", - "definition_extent": "10:1-10:15", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@E@Foo3@A", - "short_name": "A", - "detailed_name": "Foo3::A", - "definition_spelling": "15:13-15:14", - "definition_extent": "15:13-15:14", - "variable_type": 4, - "declaring_type": 4, - "cls": 4, - "uses": ["15:13-15:14"] - }, { - "id": 1, - "usr": "c:@E@Foo3@B", - "short_name": "B", - "detailed_name": "Foo3::B", - "definition_spelling": "15:16-15:17", - "definition_extent": "15:16-15:17", - "variable_type": 4, - "declaring_type": 4, - "cls": 4, - "uses": ["15:16-15:17"] - }, { - "id": 2, - "usr": "c:@E@Foo3@C", - "short_name": "C", - "detailed_name": "Foo3::C", - "definition_spelling": "15:19-15:20", - "definition_extent": "15:19-15:20", - "variable_type": 4, - "declaring_type": 4, - "cls": 4, - "uses": ["15:19-15:20"] - }, { - "id": 3, - "usr": "c:@Foo4", - "short_name": "Foo4", - "detailed_name": "int Foo4", - "definition_spelling": "17:5-17:9", - "definition_extent": "17:1-17:9", - "cls": 3, - "uses": ["17:5-17:9"] - }, { - "id": 4, - "usr": "c:header.h@Foo5", - "short_name": "Foo5", - "detailed_name": "int Foo5", - "definition_spelling": "18:12-18:16", - "definition_extent": "18:1-18:16", - "cls": 3, - "uses": ["18:12-18:16"] - }] -} -OUTPUT: impl.cc -{ - "includes": [{ - "line": 1, - "resolved_path": "&header.h" - }], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@Impl#", - "short_name": "Impl", - "detailed_name": "void Impl()", - "declarations": [], - "definition_spelling": "3:6-3:10", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@4:3-4:7"] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@FT@>1#TFoo1#v#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["0@4:3-4:7"], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/multi_file/simple_header.h b/tests/multi_file/simple_header.h deleted file mode 100644 index 3bdf008a..00000000 --- a/tests/multi_file/simple_header.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void header(); \ No newline at end of file diff --git a/tests/multi_file/simple_impl.cc b/tests/multi_file/simple_impl.cc deleted file mode 100644 index 52027153..00000000 --- a/tests/multi_file/simple_impl.cc +++ /dev/null @@ -1,70 +0,0 @@ -#include "simple_header.h" - -void impl() { - header(); -} - -/* -OUTPUT: simple_header.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@header#", - "short_name": "header", - "detailed_name": "void header()", - "declarations": [{ - "spelling": "3:6-3:12", - "extent": "3:1-3:14", - "content": "void header()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -OUTPUT: simple_impl.cc -{ - "includes": [{ - "line": 1, - "resolved_path": "&simple_header.h" - }], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@impl#", - "short_name": "impl", - "detailed_name": "void impl()", - "declarations": [], - "definition_spelling": "3:6-3:10", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@4:3-4:9"] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@header#", - "short_name": "", - "detailed_name": "", - "declarations": [], - "base": [], - "derived": [], - "locals": [], - "callers": ["0@4:3-4:9"], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/multi_file/static.cc b/tests/multi_file/static.cc deleted file mode 100644 index f34eee00..00000000 --- a/tests/multi_file/static.cc +++ /dev/null @@ -1,84 +0,0 @@ -#include "static.h" - -void Buffer::CreateSharedBuffer() {} - -/* -OUTPUT: static.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Buffer", - "short_name": "Buffer", - "detailed_name": "Buffer", - "definition_spelling": "3:8-3:14", - "definition_extent": "3:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["3:8-3:14"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Buffer@F@CreateSharedBuffer#S", - "short_name": "CreateSharedBuffer", - "detailed_name": "void Buffer::CreateSharedBuffer()", - "declarations": [{ - "spelling": "4:15-4:33", - "extent": "4:3-4:35", - "content": "static void CreateSharedBuffer()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -OUTPUT: static.cc -{ - "includes": [{ - "line": 1, - "resolved_path": "&static.h" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Buffer", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["3:6-3:12"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Buffer@F@CreateSharedBuffer#S", - "short_name": "CreateSharedBuffer", - "detailed_name": "void Buffer::CreateSharedBuffer()", - "declarations": [], - "definition_spelling": "3:14-3:32", - "definition_extent": "3:1-3:37", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ \ No newline at end of file diff --git a/tests/multi_file/static.h b/tests/multi_file/static.h deleted file mode 100644 index 4204f785..00000000 --- a/tests/multi_file/static.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -struct Buffer { - static void CreateSharedBuffer(); -}; diff --git a/tests/namespaces/anonymous_function.cc b/tests/namespaces/anonymous_function.cc deleted file mode 100644 index e3607f53..00000000 --- a/tests/namespaces/anonymous_function.cc +++ /dev/null @@ -1,31 +0,0 @@ -namespace { -void foo(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:anonymous_function.cc@aN@F@foo#", - "short_name": "foo", - "detailed_name": "void (anon)::foo()", - "declarations": [{ - "spelling": "2:6-2:9", - "extent": "2:1-2:11", - "content": "void foo()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/function_declaration.cc b/tests/namespaces/function_declaration.cc deleted file mode 100644 index b168b017..00000000 --- a/tests/namespaces/function_declaration.cc +++ /dev/null @@ -1,31 +0,0 @@ -namespace hello { -void foo(int a, int b); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@hello@F@foo#I#I#", - "short_name": "foo", - "detailed_name": "void hello::foo(int a, int b)", - "declarations": [{ - "spelling": "2:6-2:9", - "extent": "2:1-2:23", - "content": "void foo(int a, int b)", - "param_spellings": ["2:14-2:15", "2:21-2:22"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/function_definition.cc b/tests/namespaces/function_definition.cc deleted file mode 100644 index 84ee3087..00000000 --- a/tests/namespaces/function_definition.cc +++ /dev/null @@ -1,28 +0,0 @@ -namespace hello { -void foo() {} -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@hello@F@foo#", - "short_name": "foo", - "detailed_name": "void hello::foo()", - "declarations": [], - "definition_spelling": "2:6-2:9", - "definition_extent": "2:1-2:14", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/method_declaration.cc b/tests/namespaces/method_declaration.cc deleted file mode 100644 index eb7b6469..00000000 --- a/tests/namespaces/method_declaration.cc +++ /dev/null @@ -1,48 +0,0 @@ -namespace hello { -class Foo { - void foo(); -}; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@hello@S@Foo", - "short_name": "Foo", - "detailed_name": "hello::Foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:7-2:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@hello@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void hello::Foo::foo()", - "declarations": [{ - "spelling": "3:8-3:11", - "extent": "3:3-3:13", - "content": "void foo()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/method_definition.cc b/tests/namespaces/method_definition.cc deleted file mode 100644 index 3255d8e4..00000000 --- a/tests/namespaces/method_definition.cc +++ /dev/null @@ -1,52 +0,0 @@ -namespace hello { -class Foo { - void foo(); -}; - -void Foo::foo() {} -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@hello@S@Foo", - "short_name": "Foo", - "detailed_name": "hello::Foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:7-2:10", "6:6-6:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@hello@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void hello::Foo::foo()", - "declarations": [{ - "spelling": "3:8-3:11", - "extent": "3:3-3:13", - "content": "void foo()", - "param_spellings": [] - }], - "definition_spelling": "6:11-6:14", - "definition_extent": "6:1-6:19", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/method_inline_declaration.cc b/tests/namespaces/method_inline_declaration.cc deleted file mode 100644 index b78c561e..00000000 --- a/tests/namespaces/method_inline_declaration.cc +++ /dev/null @@ -1,45 +0,0 @@ -namespace hello { -class Foo { - void foo() {} -}; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@hello@S@Foo", - "short_name": "Foo", - "detailed_name": "hello::Foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:7-2:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@hello@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void hello::Foo::foo()", - "declarations": [], - "definition_spelling": "3:8-3:11", - "definition_extent": "3:3-3:16", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/namespaces/namespace_alias.cc b/tests/namespaces/namespace_alias.cc deleted file mode 100644 index 3e216d30..00000000 --- a/tests/namespaces/namespace_alias.cc +++ /dev/null @@ -1,66 +0,0 @@ -namespace foo { - namespace bar { - namespace baz { - int qux = 42; - } - } -} - -namespace fbz = foo::bar::baz; - -void func() { - int a = foo::bar::baz::qux; - int b = fbz::qux; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@func#", - "short_name": "func", - "detailed_name": "void func()", - "declarations": [], - "definition_spelling": "11:6-11:10", - "definition_extent": "11:1-14:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@N@foo@N@bar@N@baz@qux", - "short_name": "qux", - "detailed_name": "int foo::bar::baz::qux", - "definition_spelling": "4:18-4:21", - "definition_extent": "4:14-4:26", - "cls": 3, - "uses": ["4:18-4:21", "12:26-12:29", "13:16-13:19"] - }, { - "id": 1, - "usr": "c:namespace_alias.cc@167@F@func#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "12:7-12:8", - "definition_extent": "12:3-12:29", - "cls": 1, - "uses": ["12:7-12:8"] - }, { - "id": 2, - "usr": "c:namespace_alias.cc@198@F@func#@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "13:7-13:8", - "definition_extent": "13:3-13:19", - "cls": 1, - "uses": ["13:7-13:8"] - }] -} -*/ diff --git a/tests/namespaces/namespace_reference.cc b/tests/namespaces/namespace_reference.cc deleted file mode 100644 index 1e78a438..00000000 --- a/tests/namespaces/namespace_reference.cc +++ /dev/null @@ -1,70 +0,0 @@ -namespace ns { - int Foo; - void Accept(int a) {} -} - -void Runner() { - ns::Accept(ns::Foo); - using namespace ns; - Accept(Foo); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@ns@F@Accept#I#", - "short_name": "Accept", - "detailed_name": "void ns::Accept(int a)", - "declarations": [], - "definition_spelling": "3:8-3:14", - "definition_extent": "3:3-3:24", - "base": [], - "derived": [], - "locals": [], - "callers": ["1@7:7-7:13", "1@9:3-9:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@Runner#", - "short_name": "Runner", - "detailed_name": "void Runner()", - "declarations": [], - "definition_spelling": "6:6-6:12", - "definition_extent": "6:1-10:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@7:7-7:13", "0@9:3-9:9"] - }], - "vars": [{ - "id": 0, - "usr": "c:@N@ns@Foo", - "short_name": "Foo", - "detailed_name": "int ns::Foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:3-2:10", - "cls": 3, - "uses": ["2:7-2:10", "7:18-7:21", "9:10-9:13"] - }, { - "id": 1, - "usr": "c:namespace_reference.cc@42@N@ns@F@Accept#I#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "3:19-3:20", - "definition_extent": "3:15-3:20", - "cls": 1, - "uses": ["3:19-3:20"] - }] -} -*/ - - - diff --git a/tests/objective-c/class.m b/tests/objective-c/class.m deleted file mode 100644 index 78cbe94b..00000000 --- a/tests/objective-c/class.m +++ /dev/null @@ -1,154 +0,0 @@ -@interface AClass - + (void)test; - - (void)anInstanceMethod; - @property (nonatomic) int aProp; -@end - -@implementation AClass -+ (void)test {} -- (void)anInstanceMethod {} -@end - -int main(void) -{ - AClass *instance = [AClass init]; - [instance anInstanceMethod]; - instance.aProp = 12; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:objc(cs)AClass", - "short_name": "AClass", - "detailed_name": "AClass", - "definition_spelling": "7:17-7:23", - "definition_extent": "7:1-10:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:12-1:18", "7:17-7:23", "14:3-14:9", "14:23-14:29"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:objc(cs)AClass(cm)test", - "short_name": "test", - "detailed_name": " AClass::test", - "declarations": [{ - "spelling": "2:11-2:15", - "extent": "2:3-2:16", - "content": "+ (void)test;", - "param_spellings": [] - }], - "definition_spelling": "8:9-8:13", - "definition_extent": "8:1-8:16", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:objc(cs)AClass(im)anInstanceMethod", - "short_name": "anInstanceMethod", - "detailed_name": " AClass::anInstanceMethod", - "declarations": [{ - "spelling": "3:11-3:27", - "extent": "3:3-3:28", - "content": "- (void)anInstanceMethod;", - "param_spellings": [] - }], - "definition_spelling": "9:9-9:25", - "definition_extent": "9:1-9:28", - "base": [], - "derived": [], - "locals": [], - "callers": ["4@15:13-15:29"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:objc(cs)AClass(im)aProp", - "short_name": "aProp", - "detailed_name": " AClass::aProp", - "declarations": [{ - "spelling": "0:0-0:0", - "extent": "4:29-4:34", - "content": "aProp", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": false, - "usr": "c:objc(cs)AClass(im)setAProp:", - "short_name": "setAProp:", - "detailed_name": " AClass::setAProp:", - "declarations": [{ - "spelling": "0:0-0:0", - "extent": "4:29-4:34", - "content": "aProp", - "param_spellings": ["4:29-4:34"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["4@0:0-0:0"], - "callees": [] - }, { - "id": 4, - "is_operator": false, - "usr": "c:@F@main#", - "short_name": "main", - "detailed_name": "int main()", - "declarations": [], - "definition_spelling": "12:5-12:9", - "definition_extent": "12:1-17:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@15:13-15:29", "3@0:0-0:0"] - }], - "vars": [{ - "id": 0, - "usr": "c:objc(cs)AClass(py)aProp", - "short_name": "aProp", - "detailed_name": "int AClass::aProp", - "declaration": "4:29-4:34", - "cls": 1, - "uses": ["4:29-4:34", "16:12-16:17"] - }, { - "id": 1, - "usr": "c:objc(cs)AClass@_aProp", - "short_name": "_aProp", - "detailed_name": "int AClass::_aProp", - "definition_spelling": "4:29-4:34", - "definition_extent": "4:29-4:34", - "cls": 1, - "uses": ["4:29-4:34"] - }, { - "id": 2, - "usr": "c:class.m@208@F@main#@instance", - "short_name": "instance", - "detailed_name": "AClass * instance", - "definition_spelling": "14:11-14:19", - "definition_extent": "14:3-14:35", - "cls": 1, - "uses": ["14:11-14:19", "15:4-15:12", "16:3-16:11"] - }] -} -*/ diff --git a/tests/operators/operator.cc b/tests/operators/operator.cc deleted file mode 100644 index f91f75d5..00000000 --- a/tests/operators/operator.cc +++ /dev/null @@ -1,100 +0,0 @@ -class Foo { - void operator()(int) { } - void operator()(bool); - int operator()(int a, int b); -}; - -Foo &operator += (const Foo&, const int&); - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0, 1, 2], - "vars": [], - "instances": [], - "uses": ["1:7-1:10", "7:1-7:4", "7:25-7:28"] - }], - "funcs": [{ - "id": 0, - "is_operator": true, - "usr": "c:@S@Foo@F@operator()#I#", - "short_name": "operator()", - "detailed_name": "void Foo::operator()(int)", - "declarations": [], - "definition_spelling": "2:8-2:18", - "definition_extent": "2:3-2:27", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": true, - "usr": "c:@S@Foo@F@operator()#b#", - "short_name": "operator()", - "detailed_name": "void Foo::operator()(bool)", - "declarations": [{ - "spelling": "3:8-3:18", - "extent": "3:3-3:24", - "content": "void operator()(bool)", - "param_spellings": ["3:23-3:23"] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": true, - "usr": "c:@S@Foo@F@operator()#I#I#", - "short_name": "operator()", - "detailed_name": "int Foo::operator()(int a, int b)", - "declarations": [{ - "spelling": "4:7-4:17", - "extent": "4:3-4:31", - "content": "int operator()(int a, int b)", - "param_spellings": ["4:22-4:23", "4:29-4:30"] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": true, - "usr": "c:@F@operator+=#&1$@S@Foo#&1I#", - "short_name": "operator+=", - "detailed_name": "Foo &operator+=(const Foo &, const int &)", - "declarations": [{ - "spelling": "7:6-7:17", - "extent": "7:1-7:42", - "content": "Foo &operator += (const Foo&, const int&)", - "param_spellings": ["7:29-7:29", "7:41-7:41"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/outline/outline.cc b/tests/outline/outline.cc deleted file mode 100644 index 9b0b058d..00000000 --- a/tests/outline/outline.cc +++ /dev/null @@ -1,81 +0,0 @@ -#include - -struct MergeableUpdate { - int a; - int b; - std::vector to_add; -}; - -/* -TEXT_REPLACE: -c:@N@std@ST>2#T#T@vector <===> c:@N@std@N@__1@ST>2#T#T@vector - -OUTPUT: -{ - "includes": [{ - "line": 1, - "resolved_path": "&vector" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@MergeableUpdate", - "short_name": "MergeableUpdate", - "detailed_name": "MergeableUpdate", - "definition_spelling": "3:8-3:23", - "definition_extent": "3:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1, 2], - "instances": [], - "uses": ["3:8-3:23"] - }, { - "id": 1, - "usr": "c:@N@std@N@__1@ST>2#T#T@vector", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [2], - "uses": ["6:8-6:14"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@MergeableUpdate@FI@a", - "short_name": "a", - "detailed_name": "int MergeableUpdate::a", - "definition_spelling": "4:7-4:8", - "definition_extent": "4:3-4:8", - "declaring_type": 0, - "cls": 4, - "uses": ["4:7-4:8"] - }, { - "id": 1, - "usr": "c:@S@MergeableUpdate@FI@b", - "short_name": "b", - "detailed_name": "int MergeableUpdate::b", - "definition_spelling": "5:7-5:8", - "definition_extent": "5:3-5:8", - "declaring_type": 0, - "cls": 4, - "uses": ["5:7-5:8"] - }, { - "id": 2, - "usr": "c:@S@MergeableUpdate@FI@to_add", - "short_name": "to_add", - "detailed_name": "std::vector MergeableUpdate::to_add", - "definition_spelling": "6:20-6:26", - "definition_extent": "6:3-6:26", - "variable_type": 1, - "declaring_type": 0, - "cls": 4, - "uses": ["6:20-6:26"] - }] -} -*/ diff --git a/tests/outline/outline2.cc b/tests/outline/outline2.cc deleted file mode 100644 index d6710e55..00000000 --- a/tests/outline/outline2.cc +++ /dev/null @@ -1,124 +0,0 @@ -#pragma once - -#include -#include - -struct CompilationEntry { - std::string directory; - std::string filename; - std::vector args; -}; - -std::vector LoadCompilationEntriesFromDirectory(const std::string& project_directory); - -/* -TEXT_REPLACE: -c:@N@std@T@string <===> c:@N@std@N@__1@T@string -c:@N@std@N@__cxx11@T@string <===> c:@N@std@N@__1@T@string -c:@N@std@ST>2#T#T@vector <===> c:@N@std@N@__1@ST>2#T#T@vector -c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@N@__1@S@basic_string>#C#$@N@std@N@__1@S@char_traits>#C#$@N@std@N@__1@S@allocator>#C# <===> c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C# -c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@N@__cxx11@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C# <===> c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C# - -OUTPUT: -{ - "includes": [{ - "line": 3, - "resolved_path": "&string" - }, { - "line": 4, - "resolved_path": "&vector" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@CompilationEntry", - "short_name": "CompilationEntry", - "detailed_name": "CompilationEntry", - "definition_spelling": "6:8-6:24", - "definition_extent": "6:1-10:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1, 2], - "instances": [], - "uses": ["6:8-6:24", "12:13-12:29"] - }, { - "id": 1, - "usr": "c:@N@std@N@__1@T@string", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["7:8-7:14", "8:8-8:14", "9:20-9:26", "12:78-12:84"] - }, { - "id": 2, - "usr": "c:@N@std@N@__1@ST>2#T#T@vector", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [2], - "uses": ["9:8-9:14", "12:6-12:12"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@LoadCompilationEntriesFromDirectory#&1$@N@std@S@basic_string>#C#$@N@std@S@char_traits>#C#$@N@std@S@allocator>#C#", - "short_name": "LoadCompilationEntriesFromDirectory", - "detailed_name": "std::vector LoadCompilationEntriesFromDirectory(const std::string &project_directory)", - "declarations": [{ - "spelling": "12:31-12:66", - "extent": "12:1-12:104", - "content": "std::vector LoadCompilationEntriesFromDirectory(const std::string& project_directory)", - "param_spellings": ["12:86-12:103"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@S@CompilationEntry@FI@directory", - "short_name": "directory", - "detailed_name": "std::string CompilationEntry::directory", - "definition_spelling": "7:15-7:24", - "definition_extent": "7:3-7:24", - "variable_type": 1, - "declaring_type": 0, - "cls": 4, - "uses": ["7:15-7:24"] - }, { - "id": 1, - "usr": "c:@S@CompilationEntry@FI@filename", - "short_name": "filename", - "detailed_name": "std::string CompilationEntry::filename", - "definition_spelling": "8:15-8:23", - "definition_extent": "8:3-8:23", - "variable_type": 1, - "declaring_type": 0, - "cls": 4, - "uses": ["8:15-8:23"] - }, { - "id": 2, - "usr": "c:@S@CompilationEntry@FI@args", - "short_name": "args", - "detailed_name": "std::vector CompilationEntry::args", - "definition_spelling": "9:28-9:32", - "definition_extent": "9:3-9:32", - "variable_type": 2, - "declaring_type": 0, - "cls": 4, - "uses": ["9:28-9:32"] - }] -} -*/ \ No newline at end of file diff --git a/tests/outline/static_function_in_type.cc b/tests/outline/static_function_in_type.cc deleted file mode 100644 index b047ca96..00000000 --- a/tests/outline/static_function_in_type.cc +++ /dev/null @@ -1,122 +0,0 @@ -#include "static_function_in_type.h" - -namespace ns { -// static -void Foo::Register(Manager* m) { -} -} - -/* -OUTPUT: static_function_in_type.h -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@ns@S@Manager", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["3:7-3:14", "6:24-6:31"] - }, { - "id": 1, - "usr": "c:@N@ns@S@Foo", - "short_name": "Foo", - "detailed_name": "ns::Foo", - "definition_spelling": "5:8-5:11", - "definition_extent": "5:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["5:8-5:11"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S", - "short_name": "Register", - "detailed_name": "void ns::Foo::Register(ns::Manager *)", - "declarations": [{ - "spelling": "6:15-6:23", - "extent": "6:3-6:33", - "content": "static void Register(Manager*)", - "param_spellings": ["6:32-6:32"] - }], - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -OUTPUT: static_function_in_type.cc -{ - "includes": [{ - "line": 1, - "resolved_path": "&static_function_in_type.h" - }], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@ns@S@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["5:6-5:9"] - }, { - "id": 1, - "usr": "c:@N@ns@S@Manager", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["5:20-5:27"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S", - "short_name": "Register", - "detailed_name": "void ns::Foo::Register(ns::Manager *m)", - "declarations": [], - "definition_spelling": "5:11-5:19", - "definition_extent": "5:1-6:2", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:static_function_in_type.cc@86@N@ns@S@Foo@F@Register#*$@N@ns@S@Manager#S@m", - "short_name": "m", - "detailed_name": "ns::Manager * m", - "definition_spelling": "5:29-5:30", - "definition_extent": "5:20-5:30", - "variable_type": 1, - "cls": 1, - "uses": ["5:29-5:30"] - }] -} -*/ \ No newline at end of file diff --git a/tests/outline/static_function_in_type.h b/tests/outline/static_function_in_type.h deleted file mode 100644 index 013aa70e..00000000 --- a/tests/outline/static_function_in_type.h +++ /dev/null @@ -1,9 +0,0 @@ -namespace ns { - -class Manager; - -struct Foo { - static void Register(Manager*); -}; - -} // namespace ns \ No newline at end of file diff --git a/tests/preprocessor/include_guard.cc b/tests/preprocessor/include_guard.cc deleted file mode 100644 index b59c241e..00000000 --- a/tests/preprocessor/include_guard.cc +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef FOO -#define FOO - -#endif - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:include_guard.cc@21@macro@FOO", - "short_name": "FOO", - "detailed_name": "FOO", - "hover": "#define FOO", - "definition_spelling": "2:9-2:12", - "definition_extent": "2:9-2:12", - "cls": 2, - "uses": ["2:9-2:12"] - }] -} -*/ diff --git a/tests/preprocessor/skipped.cc b/tests/preprocessor/skipped.cc deleted file mode 100644 index 41cb3c34..00000000 --- a/tests/preprocessor/skipped.cc +++ /dev/null @@ -1,25 +0,0 @@ - -#ifdef FOOBAR -void hello(); -#endif - -#if false - - - -#endif - -#if defined(OS_FOO) - -#endif - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": ["2:1-4:7", "6:1-10:7", "12:1-14:7"], - "types": [], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/templates/func_specialized_template_param.cc b/tests/templates/func_specialized_template_param.cc deleted file mode 100644 index 0e38b8d6..00000000 --- a/tests/templates/func_specialized_template_param.cc +++ /dev/null @@ -1,67 +0,0 @@ -template -class Template {}; - -struct Foo { - void Bar(Template&); -}; - -void Foo::Bar(Template&) {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Template", - "short_name": "Template", - "detailed_name": "Template", - "definition_spelling": "2:7-2:15", - "definition_extent": "2:1-2:18", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:7-2:15", "5:12-5:20", "8:15-8:23"] - }, { - "id": 1, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "4:8-4:11", - "definition_extent": "4:1-6:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["4:8-4:11", "8:6-8:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@Bar#&$@S@Template>#d#", - "short_name": "Bar", - "detailed_name": "void Foo::Bar(Template &)", - "declarations": [{ - "spelling": "5:8-5:11", - "extent": "5:3-5:30", - "content": "void Bar(Template&)", - "param_spellings": ["5:29-5:29"] - }], - "definition_spelling": "8:11-8:14", - "definition_extent": "8:1-8:36", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/templates/implicit_variable_instantiation.cc b/tests/templates/implicit_variable_instantiation.cc deleted file mode 100644 index 744eb3d6..00000000 --- a/tests/templates/implicit_variable_instantiation.cc +++ /dev/null @@ -1,84 +0,0 @@ -namespace ns { - enum VarType {}; - - template - struct Holder { - static constexpr VarType static_var = (VarType)0x0; - }; - - template - const typename VarType Holder<_>::static_var; - - - int Foo = Holder::static_var; - int Foo2 = Holder::static_var; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@ns@E@VarType", - "short_name": "VarType", - "detailed_name": "ns::VarType", - "definition_spelling": "2:8-2:15", - "definition_extent": "2:3-2:18", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["2:8-2:15", "6:22-6:29", "6:44-6:51", "10:18-10:25"] - }, { - "id": 1, - "usr": "c:@N@ns@ST>1#T@Holder", - "short_name": "Holder", - "detailed_name": "ns::Holder", - "definition_spelling": "5:10-5:16", - "definition_extent": "5:3-7:4", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [], - "uses": ["5:10-5:16", "10:26-10:32", "13:13-13:19", "14:14-14:20"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@N@ns@ST>1#T@Holder@static_var", - "short_name": "static_var", - "detailed_name": "const ns::VarType ns::Holder::static_var", - "declaration": "6:30-6:40", - "definition_spelling": "10:37-10:47", - "definition_extent": "9:3-10:47", - "variable_type": 0, - "declaring_type": 1, - "cls": 4, - "uses": ["6:30-6:40", "10:37-10:47", "13:26-13:36", "14:27-14:37"] - }, { - "id": 1, - "usr": "c:@N@ns@Foo", - "short_name": "Foo", - "detailed_name": "int ns::Foo", - "definition_spelling": "13:7-13:10", - "definition_extent": "13:3-13:36", - "cls": 3, - "uses": ["13:7-13:10"] - }, { - "id": 2, - "usr": "c:@N@ns@Foo2", - "short_name": "Foo2", - "detailed_name": "int ns::Foo2", - "definition_spelling": "14:7-14:11", - "definition_extent": "14:3-14:37", - "cls": 3, - "uses": ["14:7-14:11"] - }] -} -*/ diff --git a/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc b/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc deleted file mode 100644 index 79fddb4d..00000000 --- a/tests/templates/namespace_template_class_template_func_usage_folded_into_one.cc +++ /dev/null @@ -1,70 +0,0 @@ -namespace ns { - template - struct Foo { - template - static int foo() { - return 3; - } - }; - - int a = Foo::foo(); - int b = Foo::foo(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@ns@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "ns::Foo", - "definition_spelling": "3:10-3:13", - "definition_extent": "3:3-8:4", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["3:10-3:13", "10:11-10:14", "11:11-11:14"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@N@ns@ST>1#T@Foo@FT@>1#Tfoo#I#S", - "short_name": "foo", - "detailed_name": "int ns::Foo::foo()", - "declarations": [], - "definition_spelling": "5:16-5:19", - "definition_extent": "5:5-7:6", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["-1@10:21-10:24", "-1@11:22-11:25"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@N@ns@a", - "short_name": "a", - "detailed_name": "int ns::a", - "definition_spelling": "10:7-10:8", - "definition_extent": "10:3-10:33", - "cls": 3, - "uses": ["10:7-10:8"] - }, { - "id": 1, - "usr": "c:@N@ns@b", - "short_name": "b", - "detailed_name": "int ns::b", - "definition_spelling": "11:7-11:8", - "definition_extent": "11:3-11:35", - "cls": 3, - "uses": ["11:7-11:8"] - }] -} -*/ diff --git a/tests/templates/namespace_template_type_usage_folded_into_one.cc b/tests/templates/namespace_template_type_usage_folded_into_one.cc deleted file mode 100644 index 480774b4..00000000 --- a/tests/templates/namespace_template_type_usage_folded_into_one.cc +++ /dev/null @@ -1,52 +0,0 @@ -namespace ns { - template - class Foo {}; - - Foo a; - Foo b; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@N@ns@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "ns::Foo", - "definition_spelling": "3:9-3:12", - "definition_extent": "3:3-3:15", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["3:9-3:12", "5:3-5:6", "6:3-6:6"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@N@ns@a", - "short_name": "a", - "detailed_name": "Foo ns::a", - "definition_spelling": "5:12-5:13", - "definition_extent": "5:3-5:13", - "variable_type": 0, - "cls": 3, - "uses": ["5:12-5:13"] - }, { - "id": 1, - "usr": "c:@N@ns@b", - "short_name": "b", - "detailed_name": "Foo ns::b", - "definition_spelling": "6:13-6:14", - "definition_extent": "6:3-6:14", - "variable_type": 0, - "cls": 3, - "uses": ["6:13-6:14"] - }] -} -*/ diff --git a/tests/templates/specialized_func_definition.cc b/tests/templates/specialized_func_definition.cc deleted file mode 100644 index a645b3c7..00000000 --- a/tests/templates/specialized_func_definition.cc +++ /dev/null @@ -1,68 +0,0 @@ -template -class Template { - void Foo(); -}; - -template -void Template::Foo() {} - -template<> -void Template::Foo() {} - - -/* -// TODO: usage information on Template is bad. -// TODO: Foo() should have multiple definitions. - -EXTRA_FLAGS: --fms-compatibility --fdelayed-template-parsing - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Template", - "short_name": "Template", - "detailed_name": "Template", - "definition_spelling": "2:7-2:15", - "definition_extent": "2:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:7-2:15", "7:6-7:14", "10:6-10:14"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@ST>1#T@Template@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Template::Foo()", - "declarations": [{ - "spelling": "3:8-3:11", - "extent": "3:3-3:13", - "content": "void Foo()", - "param_spellings": [] - }, { - "spelling": "10:22-10:25", - "extent": "9:1-10:30", - "content": "template<>\n void Template::Foo() {}", - "param_spellings": [] - }], - "definition_spelling": "7:19-7:22", - "definition_extent": "6:1-7:24", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/templates/template_class_func_usage_folded_into_one.cc b/tests/templates/template_class_func_usage_folded_into_one.cc deleted file mode 100644 index 97abddf1..00000000 --- a/tests/templates/template_class_func_usage_folded_into_one.cc +++ /dev/null @@ -1,67 +0,0 @@ -template -struct Foo { - static int foo() { - return 3; - } -}; - -int a = Foo::foo(); -int b = Foo::foo(); - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "2:8-2:11", - "definition_extent": "2:1-6:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:8-2:11", "8:9-8:12", "9:9-9:12"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@ST>1#T@Foo@F@foo#S", - "short_name": "foo", - "detailed_name": "int Foo::foo()", - "declarations": [], - "definition_spelling": "3:14-3:17", - "definition_extent": "3:3-5:4", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["-1@8:19-8:22", "-1@9:20-9:23"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "8:5-8:6", - "definition_extent": "8:1-8:24", - "cls": 3, - "uses": ["8:5-8:6"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "9:5-9:6", - "definition_extent": "9:1-9:25", - "cls": 3, - "uses": ["9:5-9:6"] - }] -} -*/ diff --git a/tests/templates/template_class_template_func_usage_folded_into_one.cc b/tests/templates/template_class_template_func_usage_folded_into_one.cc deleted file mode 100644 index 546011d3..00000000 --- a/tests/templates/template_class_template_func_usage_folded_into_one.cc +++ /dev/null @@ -1,68 +0,0 @@ -template -struct Foo { - template - static int foo() { - return 3; - } -}; - -int a = Foo::foo(); -int b = Foo::foo(); - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "2:8-2:11", - "definition_extent": "2:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["2:8-2:11", "9:9-9:12", "10:9-10:12"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@ST>1#T@Foo@FT@>1#Tfoo#I#S", - "short_name": "foo", - "detailed_name": "int Foo::foo()", - "declarations": [], - "definition_spelling": "4:14-4:17", - "definition_extent": "4:3-6:4", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["-1@9:19-9:22", "-1@10:20-10:23"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "9:5-9:6", - "definition_extent": "9:1-9:31", - "cls": 3, - "uses": ["9:5-9:6"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "10:5-10:6", - "definition_extent": "10:1-10:33", - "cls": 3, - "uses": ["10:5-10:6"] - }] -} -*/ diff --git a/tests/templates/template_class_type_usage_folded_into_one.cc b/tests/templates/template_class_type_usage_folded_into_one.cc deleted file mode 100644 index c142fd94..00000000 --- a/tests/templates/template_class_type_usage_folded_into_one.cc +++ /dev/null @@ -1,115 +0,0 @@ -enum A {}; -enum B {}; - -template -struct Foo { - struct Inner {}; -}; - -Foo::Inner a; -Foo::Inner b; - -#if false -EnumDecl A -EnumDecl B -ClassTemplate Foo - TemplateTypeParameter T - StructDecl Inner -VarDecl a - TemplateRef Foo - TypeRef enum A - TypeRef struct Foo::Inner - CallExpr Inner -VarDecl b - TemplateRef Foo - TypeRef enum B - TypeRef struct Foo::Inner - CallExpr Inner -#endif - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": ["12:1-28:7"], - "types": [{ - "id": 0, - "usr": "c:@E@A", - "short_name": "A", - "detailed_name": "A", - "definition_spelling": "1:6-1:7", - "definition_extent": "1:1-1:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:6-1:7", "9:5-9:6"] - }, { - "id": 1, - "usr": "c:@E@B", - "short_name": "B", - "detailed_name": "B", - "definition_spelling": "2:6-2:7", - "definition_extent": "2:1-2:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:6-2:7", "10:5-10:6"] - }, { - "id": 2, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "5:8-5:11", - "definition_extent": "5:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:8-5:11", "9:1-9:4", "10:1-10:4"] - }, { - "id": 3, - "usr": "c:@ST>1#T@Foo@S@Inner", - "short_name": "Inner", - "detailed_name": "Foo::Inner", - "definition_spelling": "6:10-6:15", - "definition_extent": "6:3-6:18", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["6:10-6:15", "9:9-9:14", "10:9-10:14"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "Foo::Inner a", - "definition_spelling": "9:15-9:16", - "definition_extent": "9:1-9:16", - "variable_type": 3, - "cls": 3, - "uses": ["9:15-9:16"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "Foo::Inner b", - "definition_spelling": "10:15-10:16", - "definition_extent": "10:1-10:16", - "variable_type": 3, - "cls": 3, - "uses": ["10:15-10:16"] - }] -} -*/ diff --git a/tests/templates/template_class_var_usage_folded_into_one.cc b/tests/templates/template_class_var_usage_folded_into_one.cc deleted file mode 100644 index 44a2126c..00000000 --- a/tests/templates/template_class_var_usage_folded_into_one.cc +++ /dev/null @@ -1,58 +0,0 @@ -template -struct Foo { - static constexpr int var = 3; -}; - -int a = Foo::var; -int b = Foo::var; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "2:8-2:11", - "definition_extent": "2:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:8-2:11", "6:9-6:12", "7:9-7:12"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo@var", - "short_name": "var", - "detailed_name": "const int Foo::var", - "declaration": "3:24-3:27", - "cls": 4, - "uses": ["3:24-3:27", "6:19-6:22", "7:20-7:23"] - }, { - "id": 1, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "6:5-6:6", - "definition_extent": "6:1-6:22", - "cls": 3, - "uses": ["6:5-6:6"] - }, { - "id": 2, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "7:5-7:6", - "definition_extent": "7:1-7:23", - "cls": 3, - "uses": ["7:5-7:6"] - }] -} -*/ diff --git a/tests/templates/template_func_usage_folded_into_one.cc b/tests/templates/template_func_usage_folded_into_one.cc deleted file mode 100644 index d8d6322a..00000000 --- a/tests/templates/template_func_usage_folded_into_one.cc +++ /dev/null @@ -1,53 +0,0 @@ -template -static int foo() { - return 3; -} - -int a = foo(); -int b = foo(); - -// TODO: put template foo inside a namespace -// TODO: put template foo inside a template class inside a namespace - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:template_func_usage_folded_into_one.cc@FT@>1#Tfoo#I#", - "short_name": "foo", - "detailed_name": "int foo()", - "declarations": [], - "definition_spelling": "2:12-2:15", - "definition_extent": "2:1-4:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["-1@6:9-6:12", "-1@7:9-7:12"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "6:5-6:6", - "definition_extent": "6:1-6:19", - "cls": 3, - "uses": ["6:5-6:6"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "int b", - "definition_spelling": "7:5-7:6", - "definition_extent": "7:1-7:20", - "cls": 3, - "uses": ["7:5-7:6"] - }] -} -*/ diff --git a/tests/templates/template_type_usage_folded_into_one.cc b/tests/templates/template_type_usage_folded_into_one.cc deleted file mode 100644 index a2b93b41..00000000 --- a/tests/templates/template_type_usage_folded_into_one.cc +++ /dev/null @@ -1,50 +0,0 @@ -template -class Foo {}; - -Foo a; -Foo b; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "2:7-2:10", - "definition_extent": "2:1-2:13", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["2:7-2:10", "4:1-4:4", "5:1-5:4"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "Foo a", - "definition_spelling": "4:10-4:11", - "definition_extent": "4:1-4:11", - "variable_type": 0, - "cls": 3, - "uses": ["4:10-4:11"] - }, { - "id": 1, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "Foo b", - "definition_spelling": "5:11-5:12", - "definition_extent": "5:1-5:12", - "variable_type": 0, - "cls": 3, - "uses": ["5:11-5:12"] - }] -} -*/ diff --git a/tests/templates/template_var_usage_folded_into_one.cc b/tests/templates/template_var_usage_folded_into_one.cc deleted file mode 100644 index 603909ed..00000000 --- a/tests/templates/template_var_usage_folded_into_one.cc +++ /dev/null @@ -1,111 +0,0 @@ -enum A {}; -enum B {}; - -template -T var = T(); - -A a = var; -B b = var; - -// NOTE: libclang before 4.0 doesn't expose template usage on |var|. - -#if false -EnumDecl A -EnumDecl B -UnexposedDecl var -VarDecl a - UnexposedExpr var - UnexposedExpr var - DeclRefExpr var - TypeRef enum A -UnexposedDecl var -VarDecl b - UnexposedExpr var - UnexposedExpr var - DeclRefExpr var - TypeRef enum B -UnexposedDecl var -#endif - -/* -EXTRA_FLAGS: --std=c++14 - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": ["12:1-28:7"], - "types": [{ - "id": 0, - "usr": "c:@E@A", - "short_name": "A", - "detailed_name": "A", - "definition_spelling": "1:6-1:7", - "definition_extent": "1:1-1:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": ["1:6-1:7", "7:1-7:2", "7:11-7:12"] - }, { - "id": 1, - "usr": "c:@E@B", - "short_name": "B", - "detailed_name": "B", - "definition_spelling": "2:6-2:7", - "definition_extent": "2:1-2:10", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [2], - "uses": ["2:6-2:7", "8:1-8:2", "8:11-8:12"] - }, { - "id": 2, - "usr": "c:template_var_usage_folded_into_one.cc@35", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:1-5:2", "5:9-5:10"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@VT>1#T@var", - "short_name": "var", - "detailed_name": "T var", - "definition_spelling": "5:3-5:6", - "definition_extent": "5:1-5:12", - "cls": 3, - "uses": ["5:3-5:6", "7:7-7:10", "8:7-8:10"] - }, { - "id": 1, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "A a", - "definition_spelling": "7:3-7:4", - "definition_extent": "7:1-7:13", - "variable_type": 0, - "cls": 3, - "uses": ["7:3-7:4"] - }, { - "id": 2, - "usr": "c:@b", - "short_name": "b", - "detailed_name": "B b", - "definition_spelling": "8:3-8:4", - "definition_extent": "8:1-8:13", - "variable_type": 1, - "cls": 3, - "uses": ["8:3-8:4"] - }] -} -*/ diff --git a/tests/types/anonymous_struct.cc b/tests/types/anonymous_struct.cc deleted file mode 100644 index f21b100d..00000000 --- a/tests/types/anonymous_struct.cc +++ /dev/null @@ -1,83 +0,0 @@ -union vector3 { - struct { float x, y, z; }; - float v[3]; -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@U@vector3", - "short_name": "vector3", - "detailed_name": "vector3", - "definition_spelling": "1:7-1:14", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [3], - "instances": [], - "uses": ["1:7-1:14"] - }, { - "id": 1, - "usr": "c:@U@vector3@Sa", - "short_name": "", - "detailed_name": "vector3::", - "definition_spelling": "2:3-2:9", - "definition_extent": "2:3-2:28", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1, 2], - "instances": [], - "uses": ["2:3-2:9"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@U@vector3@Sa@FI@x", - "short_name": "x", - "detailed_name": "float vector3::(anon struct)::x", - "definition_spelling": "2:18-2:19", - "definition_extent": "2:12-2:19", - "declaring_type": 1, - "cls": 4, - "uses": ["2:18-2:19"] - }, { - "id": 1, - "usr": "c:@U@vector3@Sa@FI@y", - "short_name": "y", - "detailed_name": "float vector3::(anon struct)::y", - "definition_spelling": "2:21-2:22", - "definition_extent": "2:12-2:22", - "declaring_type": 1, - "cls": 4, - "uses": ["2:21-2:22"] - }, { - "id": 2, - "usr": "c:@U@vector3@Sa@FI@z", - "short_name": "z", - "detailed_name": "float vector3::(anon struct)::z", - "definition_spelling": "2:24-2:25", - "definition_extent": "2:12-2:25", - "declaring_type": 1, - "cls": 4, - "uses": ["2:24-2:25"] - }, { - "id": 3, - "usr": "c:@U@vector3@FI@v", - "short_name": "v", - "detailed_name": "float [3] vector3::v", - "definition_spelling": "3:9-3:10", - "definition_extent": "3:3-3:13", - "declaring_type": 0, - "cls": 4, - "uses": ["3:9-3:10"] - }] -} -*/ diff --git a/tests/types/typedefs.cc b/tests/types/typedefs.cc deleted file mode 100644 index 70750c88..00000000 --- a/tests/types/typedefs.cc +++ /dev/null @@ -1,45 +0,0 @@ -typedef int (func)(const int *a, const int *b); -static func g; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:typedefs.cc@T@func", - "short_name": "func", - "detailed_name": "func", - "hover": "typedef int (func)(const int *a, const int *b)", - "definition_spelling": "1:14-1:18", - "definition_extent": "1:1-1:47", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:14-1:18", "2:8-2:12"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:typedefs.cc@F@g#*1I#S0_#", - "short_name": "g", - "detailed_name": "func g", - "declarations": [{ - "spelling": "2:13-2:14", - "extent": "2:1-2:14", - "content": "static func g", - "param_spellings": ["2:13-2:13", "2:13-2:13"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ \ No newline at end of file diff --git a/tests/unions/union_decl.cc b/tests/unions/union_decl.cc deleted file mode 100644 index d8fc668b..00000000 --- a/tests/unions/union_decl.cc +++ /dev/null @@ -1,49 +0,0 @@ -union Foo { - int a; - bool b; -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@U@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [], - "uses": ["1:7-1:10"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@U@Foo@FI@a", - "short_name": "a", - "detailed_name": "int Foo::a", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:8", - "declaring_type": 0, - "cls": 4, - "uses": ["2:7-2:8"] - }, { - "id": 1, - "usr": "c:@U@Foo@FI@b", - "short_name": "b", - "detailed_name": "bool Foo::b", - "definition_spelling": "3:8-3:9", - "definition_extent": "3:3-3:9", - "declaring_type": 0, - "cls": 4, - "uses": ["3:8-3:9"] - }] -} -*/ diff --git a/tests/unions/union_usage.cc b/tests/unions/union_usage.cc deleted file mode 100644 index 8c15f7a6..00000000 --- a/tests/unions/union_usage.cc +++ /dev/null @@ -1,81 +0,0 @@ -union Foo { - int a : 5; - bool b : 3; -}; - -Foo f; - -void act(Foo*) { - f.a = 3; -} - -/* -// TODO: instantiations on Foo should include parameter? - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@U@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-4:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [2], - "uses": ["1:7-1:10", "6:1-6:4", "8:10-8:13"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@act#*$@U@Foo#", - "short_name": "act", - "detailed_name": "void act(Foo *)", - "declarations": [], - "definition_spelling": "8:6-8:9", - "definition_extent": "8:1-10:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@U@Foo@FI@a", - "short_name": "a", - "detailed_name": "int Foo::a", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:12", - "declaring_type": 0, - "cls": 4, - "uses": ["2:7-2:8", "9:5-9:6"] - }, { - "id": 1, - "usr": "c:@U@Foo@FI@b", - "short_name": "b", - "detailed_name": "bool Foo::b", - "definition_spelling": "3:8-3:9", - "definition_extent": "3:3-3:13", - "declaring_type": 0, - "cls": 4, - "uses": ["3:8-3:9"] - }, { - "id": 2, - "usr": "c:@f", - "short_name": "f", - "detailed_name": "Foo f", - "definition_spelling": "6:5-6:6", - "definition_extent": "6:1-6:6", - "variable_type": 0, - "cls": 3, - "uses": ["6:5-6:6", "9:3-9:4"] - }] -} -*/ diff --git a/tests/usage/func_called_from_constructor.cc b/tests/usage/func_called_from_constructor.cc deleted file mode 100644 index 71f21002..00000000 --- a/tests/usage/func_called_from_constructor.cc +++ /dev/null @@ -1,68 +0,0 @@ -void called() {} - -struct Foo { - Foo(); -}; - -Foo::Foo() { - called(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "3:8-3:11", - "definition_extent": "3:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [1], - "vars": [], - "instances": [], - "uses": ["3:8-3:11", "4:3-4:6", "7:6-7:9", "7:1-7:4"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#", - "short_name": "called", - "detailed_name": "void called()", - "declarations": [], - "definition_spelling": "1:6-1:12", - "definition_extent": "1:1-1:17", - "base": [], - "derived": [], - "locals": [], - "callers": ["1@8:3-8:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Foo@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Foo::Foo()", - "declarations": [{ - "spelling": "4:3-4:6", - "extent": "4:3-4:8", - "content": "Foo()", - "param_spellings": [] - }], - "definition_spelling": "7:6-7:9", - "definition_extent": "7:1-9:2", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@8:3-8:9"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/func_called_from_macro_argument.cc b/tests/usage/func_called_from_macro_argument.cc deleted file mode 100644 index 185ec5da..00000000 --- a/tests/usage/func_called_from_macro_argument.cc +++ /dev/null @@ -1,59 +0,0 @@ -#define MACRO_CALL(e) e - -bool called(bool a, bool b); - -void caller() { - MACRO_CALL(called(true, true)); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#b#b#", - "short_name": "called", - "detailed_name": "bool called(bool a, bool b)", - "declarations": [{ - "spelling": "3:6-3:12", - "extent": "3:1-3:28", - "content": "bool called(bool a, bool b)", - "param_spellings": ["3:18-3:19", "3:26-3:27"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["1@6:14-6:20"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@caller#", - "short_name": "caller", - "detailed_name": "void caller()", - "declarations": [], - "definition_spelling": "5:6-5:12", - "definition_extent": "5:1-7:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@6:14-6:20"] - }], - "vars": [{ - "id": 0, - "usr": "c:func_called_from_macro_argument.cc@8@macro@MACRO_CALL", - "short_name": "MACRO_CALL", - "detailed_name": "MACRO_CALL", - "hover": "#define MACRO_CALL(e) e", - "definition_spelling": "1:9-1:19", - "definition_extent": "1:9-1:24", - "cls": 2, - "uses": ["1:9-1:19", "6:3-6:13"] - }] -} -*/ \ No newline at end of file diff --git a/tests/usage/func_called_from_template.cc b/tests/usage/func_called_from_template.cc deleted file mode 100644 index c8b35c0b..00000000 --- a/tests/usage/func_called_from_template.cc +++ /dev/null @@ -1,68 +0,0 @@ -void called(); - -template -void caller() { - called(); -} - -void foo() { - caller(); -} - -/* -// NOTE: without caller() instantation caller() is never visited so -// called() is never referenced. -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#", - "short_name": "called", - "detailed_name": "void called()", - "declarations": [{ - "spelling": "1:6-1:12", - "extent": "1:1-1:14", - "content": "void called()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["1@5:3-5:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@FT@>1#Tcaller#v#", - "short_name": "caller", - "detailed_name": "void caller()", - "declarations": [], - "definition_spelling": "4:6-4:12", - "definition_extent": "4:1-6:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@9:3-9:9"], - "callees": ["0@5:3-5:9"] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "8:6-8:9", - "definition_extent": "8:1-10:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@9:3-9:9"] - }], - "vars": [] -} -*/ \ No newline at end of file diff --git a/tests/usage/func_called_implicit_ctor.cc b/tests/usage/func_called_implicit_ctor.cc deleted file mode 100644 index 1e860f51..00000000 --- a/tests/usage/func_called_implicit_ctor.cc +++ /dev/null @@ -1,80 +0,0 @@ -struct Wrapper { - Wrapper(int i); -}; - -int called() { return 1; } - -Wrapper caller() { - return called(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Wrapper", - "short_name": "Wrapper", - "detailed_name": "Wrapper", - "definition_spelling": "1:8-1:15", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:8-1:15", "2:3-2:10", "7:1-7:8"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Wrapper@F@Wrapper#I#", - "short_name": "Wrapper", - "detailed_name": "void Wrapper::Wrapper(int i)", - "declarations": [{ - "spelling": "2:3-2:10", - "extent": "2:3-2:17", - "content": "Wrapper(int i)", - "param_spellings": ["2:15-2:16"] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["~2@8:10-8:16"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@called#", - "short_name": "called", - "detailed_name": "int called()", - "declarations": [], - "definition_spelling": "5:5-5:11", - "definition_extent": "5:1-5:27", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@8:10-8:16"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@caller#", - "short_name": "caller", - "detailed_name": "Wrapper caller()", - "declarations": [], - "definition_spelling": "7:9-7:15", - "definition_extent": "7:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["~0@8:10-8:16", "1@8:10-8:16"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/func_usage_addr_func.cc b/tests/usage/func_usage_addr_func.cc deleted file mode 100644 index ad60ac27..00000000 --- a/tests/usage/func_usage_addr_func.cc +++ /dev/null @@ -1,70 +0,0 @@ -void consume(void (*)()) {} - -void used() {} - -void user() { - void (*x)() = &used; - consume(&used); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@consume#*Fv#", - "short_name": "consume", - "detailed_name": "void consume(void (*)())", - "declarations": [], - "definition_spelling": "1:6-1:13", - "definition_extent": "1:1-1:28", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@7:3-7:10"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@used#", - "short_name": "used", - "detailed_name": "void used()", - "declarations": [], - "definition_spelling": "3:6-3:10", - "definition_extent": "3:1-3:15", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@6:18-6:22", "2@7:12-7:16"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@user#", - "short_name": "user", - "detailed_name": "void user()", - "declarations": [], - "definition_spelling": "5:6-5:10", - "definition_extent": "5:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["1@6:18-6:22", "0@7:3-7:10", "1@7:12-7:16"] - }], - "vars": [{ - "id": 0, - "usr": "c:func_usage_addr_func.cc@66@F@user#@x", - "short_name": "x", - "detailed_name": "void (*)() x", - "definition_spelling": "6:10-6:11", - "definition_extent": "6:3-6:22", - "cls": 1, - "uses": ["6:10-6:11"] - }] -} -*/ diff --git a/tests/usage/func_usage_addr_method.cc b/tests/usage/func_usage_addr_method.cc deleted file mode 100644 index dc2b7c72..00000000 --- a/tests/usage/func_usage_addr_method.cc +++ /dev/null @@ -1,74 +0,0 @@ -struct Foo { - void Used(); -}; - -void user() { - auto x = &Foo::Used; -} - - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [], - "uses": ["1:8-1:11", "6:13-6:16"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@Used#", - "short_name": "Used", - "detailed_name": "void Foo::Used()", - "declarations": [{ - "spelling": "2:8-2:12", - "extent": "2:3-2:14", - "content": "void Used()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["1@6:18-6:22"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@user#", - "short_name": "user", - "detailed_name": "void user()", - "declarations": [], - "definition_spelling": "5:6-5:10", - "definition_extent": "5:1-7:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@6:18-6:22"] - }], - "vars": [{ - "id": 0, - "usr": "c:func_usage_addr_method.cc@53@F@user#@x", - "short_name": "x", - "detailed_name": "void (Foo::*)() x", - "definition_spelling": "6:8-6:9", - "definition_extent": "6:3-6:22", - "cls": 1, - "uses": ["6:8-6:9"] - }] -} -*/ diff --git a/tests/usage/func_usage_call_func.cc b/tests/usage/func_usage_call_func.cc deleted file mode 100644 index af16de6f..00000000 --- a/tests/usage/func_usage_call_func.cc +++ /dev/null @@ -1,43 +0,0 @@ -void called() {} -void caller() { - called(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#", - "short_name": "called", - "detailed_name": "void called()", - "declarations": [], - "definition_spelling": "1:6-1:12", - "definition_extent": "1:1-1:17", - "base": [], - "derived": [], - "locals": [], - "callers": ["1@3:3-3:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@caller#", - "short_name": "caller", - "detailed_name": "void caller()", - "declarations": [], - "definition_spelling": "2:6-2:12", - "definition_extent": "2:1-4:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@3:3-3:9"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/func_usage_call_method.cc b/tests/usage/func_usage_call_method.cc deleted file mode 100644 index 8c913203..00000000 --- a/tests/usage/func_usage_call_method.cc +++ /dev/null @@ -1,75 +0,0 @@ -struct Foo { - void Used(); -}; - -void user() { - Foo* f = nullptr; - f->Used(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [0], - "uses": ["1:8-1:11", "6:3-6:6"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@Used#", - "short_name": "Used", - "detailed_name": "void Foo::Used()", - "declarations": [{ - "spelling": "2:8-2:12", - "extent": "2:3-2:14", - "content": "void Used()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["1@7:6-7:10"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@user#", - "short_name": "user", - "detailed_name": "void user()", - "declarations": [], - "definition_spelling": "5:6-5:10", - "definition_extent": "5:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@7:6-7:10"] - }], - "vars": [{ - "id": 0, - "usr": "c:func_usage_call_method.cc@53@F@user#@f", - "short_name": "f", - "detailed_name": "Foo * f", - "definition_spelling": "6:8-6:9", - "definition_extent": "6:3-6:19", - "variable_type": 0, - "cls": 1, - "uses": ["6:8-6:9", "7:3-7:4"] - }] -} -*/ diff --git a/tests/usage/func_usage_class_inline_var_def.cc b/tests/usage/func_usage_class_inline_var_def.cc deleted file mode 100644 index 3be4aa9b..00000000 --- a/tests/usage/func_usage_class_inline_var_def.cc +++ /dev/null @@ -1,56 +0,0 @@ -static int helper() { - return 5; -} - -class Foo { - int x = helper(); -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "5:7-5:10", - "definition_extent": "5:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [], - "uses": ["5:7-5:10"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:func_usage_class_inline_var_def.cc@F@helper#", - "short_name": "helper", - "detailed_name": "int helper()", - "declarations": [], - "definition_spelling": "1:12-1:18", - "definition_extent": "1:1-3:2", - "base": [], - "derived": [], - "locals": [], - "callers": ["-1@6:11-6:17"], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@FI@x", - "short_name": "x", - "detailed_name": "int Foo::x", - "definition_spelling": "6:7-6:8", - "definition_extent": "6:3-6:19", - "declaring_type": 0, - "cls": 4, - "uses": ["6:7-6:8"] - }] -} -*/ diff --git a/tests/usage/func_usage_forward_decl_func.cc b/tests/usage/func_usage_forward_decl_func.cc deleted file mode 100644 index aa887e24..00000000 --- a/tests/usage/func_usage_forward_decl_func.cc +++ /dev/null @@ -1,46 +0,0 @@ -void foo(); - -void usage() { - foo(); -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [{ - "spelling": "1:6-1:9", - "extent": "1:1-1:11", - "content": "void foo()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["1@4:3-4:6"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@usage#", - "short_name": "usage", - "detailed_name": "void usage()", - "declarations": [], - "definition_spelling": "3:6-3:11", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@4:3-4:6"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/func_usage_forward_decl_method.cc b/tests/usage/func_usage_forward_decl_method.cc deleted file mode 100644 index 1b24c1eb..00000000 --- a/tests/usage/func_usage_forward_decl_method.cc +++ /dev/null @@ -1,74 +0,0 @@ -struct Foo { - void foo(); -}; - -void usage() { - Foo* f = nullptr; - f->foo(); -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [0], - "uses": ["1:8-1:11", "6:3-6:6"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "void Foo::foo()", - "declarations": [{ - "spelling": "2:8-2:11", - "extent": "2:3-2:13", - "content": "void foo()", - "param_spellings": [] - }], - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": ["1@7:6-7:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@usage#", - "short_name": "usage", - "detailed_name": "void usage()", - "declarations": [], - "definition_spelling": "5:6-5:11", - "definition_extent": "5:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@7:6-7:9"] - }], - "vars": [{ - "id": 0, - "usr": "c:func_usage_forward_decl_method.cc@53@F@usage#@f", - "short_name": "f", - "detailed_name": "Foo * f", - "definition_spelling": "6:8-6:9", - "definition_extent": "6:3-6:19", - "variable_type": 0, - "cls": 1, - "uses": ["6:8-6:9", "7:3-7:4"] - }] -} -*/ diff --git a/tests/usage/func_usage_template_func.cc b/tests/usage/func_usage_template_func.cc deleted file mode 100644 index 0875d15a..00000000 --- a/tests/usage/func_usage_template_func.cc +++ /dev/null @@ -1,63 +0,0 @@ -template -void accept(T); - -void foo() { - accept(1); - accept(true); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:func_usage_template_func.cc@9", - "short_name": "T", - "detailed_name": "T", - "definition_spelling": "1:19-1:20", - "definition_extent": "1:10-1:20", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:13-2:14"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@FT@>1#Taccept#t0.0#v#", - "short_name": "accept", - "detailed_name": "void accept(T)", - "declarations": [{ - "spelling": "2:6-2:12", - "extent": "2:1-2:15", - "content": "void accept(T)", - "param_spellings": ["2:14-2:14"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["1@5:3-5:9", "1@6:3-6:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "4:6-4:9", - "definition_extent": "4:1-7:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@5:3-5:9", "0@6:3-6:9"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/type_usage_as_template_parameter.cc b/tests/usage/type_usage_as_template_parameter.cc deleted file mode 100644 index 36acfe7b..00000000 --- a/tests/usage/type_usage_as_template_parameter.cc +++ /dev/null @@ -1,94 +0,0 @@ -template -class unique_ptr {}; - -struct S {}; - -static unique_ptr f0; -static unique_ptr f1; - -unique_ptr* return_type() { - unique_ptr* local; - return nullptr; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@unique_ptr", - "short_name": "unique_ptr", - "detailed_name": "unique_ptr", - "definition_spelling": "2:7-2:17", - "definition_extent": "2:1-2:20", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1, 2], - "uses": ["2:7-2:17", "6:8-6:18", "7:8-7:18", "9:1-9:11", "10:3-10:13"] - }, { - "id": 1, - "usr": "c:@S@S", - "short_name": "S", - "detailed_name": "S", - "definition_spelling": "4:8-4:9", - "definition_extent": "4:1-4:12", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:8-4:9", "7:19-7:20", "9:12-9:13", "10:14-10:15"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@return_type#", - "short_name": "return_type", - "detailed_name": "unique_ptr *return_type()", - "declarations": [], - "definition_spelling": "9:16-9:27", - "definition_extent": "9:1-12:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_as_template_parameter.cc@f0", - "short_name": "f0", - "detailed_name": "unique_ptr f0", - "definition_spelling": "6:25-6:27", - "definition_extent": "6:1-6:27", - "variable_type": 0, - "cls": 3, - "uses": ["6:25-6:27"] - }, { - "id": 1, - "usr": "c:type_usage_as_template_parameter.cc@f1", - "short_name": "f1", - "detailed_name": "unique_ptr f1", - "definition_spelling": "7:22-7:24", - "definition_extent": "7:1-7:24", - "variable_type": 0, - "cls": 3, - "uses": ["7:22-7:24"] - }, { - "id": 2, - "usr": "c:type_usage_as_template_parameter.cc@153@F@return_type#@local", - "short_name": "local", - "detailed_name": "unique_ptr * local", - "definition_spelling": "10:18-10:23", - "definition_extent": "10:3-10:23", - "variable_type": 0, - "cls": 1, - "uses": ["10:18-10:23"] - }] -} -*/ diff --git a/tests/usage/type_usage_as_template_parameter_complex.cc b/tests/usage/type_usage_as_template_parameter_complex.cc deleted file mode 100644 index 64f22bc5..00000000 --- a/tests/usage/type_usage_as_template_parameter_complex.cc +++ /dev/null @@ -1,221 +0,0 @@ -template -class unique_ptr; - -struct S1; -struct S2; - -#if false -VarDecl f - TemplateRef unique_ptr - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 - TypeRef struct S2 -#endif -extern unique_ptr, S2> f; - -#if false -FunctionDecl as_return_type - TemplateRef unique_ptr - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 - TypeRef struct S2 - ParmDecl - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 - CompoundStmt - ReturnStmt - UnexposedExpr - CXXNullPtrLiteralExpr -#endif -unique_ptr, S2>* as_return_type(unique_ptr*) { return nullptr; } - -#if false -FunctionDecl no_return_type - ParmDecl - CompoundStmt -#endif -void no_return_type(int) {} - -#if false -FunctionDecl empty - CompoundStmt - DeclStmt - VarDecl local - TemplateRef unique_ptr - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 - TypeRef struct S2 -#endif -void empty() { - unique_ptr, S2>* local; -} - -#if false -ClassDecl Foo - CXXMethod foo - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 -#endif -class Foo { - unique_ptr* foo(); -}; - -#if false -CXXMethod foo - TemplateRef unique_ptr - TypeRef struct S1 - TypeRef struct S2 - TypeRef class Foo - CompoundStmt - ReturnStmt - UnexposedExpr - CXXNullPtrLiteralExpr -#endif -unique_ptr* Foo::foo() { return nullptr; } - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": ["7:1-14:7", "17:1-32:7", "35:1-39:7", "42:1-52:7", "57:1-63:7", "68:1-78:7"], - "types": [{ - "id": 0, - "usr": "c:@ST>2#T#T@unique_ptr", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["2:7-2:17", "15:8-15:18", "15:19-15:29", "33:1-33:11", "33:12-33:22", "33:52-33:62", "54:3-54:13", "54:14-54:24", "65:3-65:13", "79:1-79:11"] - }, { - "id": 1, - "usr": "c:@S@S1", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:8-4:10", "15:30-15:32", "33:23-33:25", "33:63-33:65", "54:25-54:27", "65:14-65:16", "79:12-79:14"] - }, { - "id": 2, - "usr": "c:@S@S2", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:8-5:10", "15:34-15:36", "15:39-15:41", "33:27-33:29", "33:32-33:34", "33:67-33:69", "54:29-54:31", "54:34-54:36", "65:18-65:20", "79:16-79:18"] - }, { - "id": 3, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "64:7-64:10", - "definition_extent": "64:1-66:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [3], - "vars": [], - "instances": [], - "uses": ["64:7-64:10", "79:21-79:24"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@as_return_type#*$@S@unique_ptr>#$@S@S1#$@S@S2#", - "short_name": "as_return_type", - "detailed_name": "unique_ptr, S2> *as_return_type(unique_ptr *)", - "declarations": [], - "definition_spelling": "33:37-33:51", - "definition_extent": "33:1-33:92", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@no_return_type#I#", - "short_name": "no_return_type", - "detailed_name": "void no_return_type(int)", - "declarations": [], - "definition_spelling": "40:6-40:20", - "definition_extent": "40:1-40:28", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@empty#", - "short_name": "empty", - "detailed_name": "void empty()", - "declarations": [], - "definition_spelling": "53:6-53:11", - "definition_extent": "53:1-55:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": false, - "usr": "c:@S@Foo@F@foo#", - "short_name": "foo", - "detailed_name": "unique_ptr *Foo::foo()", - "declarations": [{ - "spelling": "65:23-65:26", - "extent": "65:3-65:28", - "content": "unique_ptr* foo()", - "param_spellings": [] - }], - "definition_spelling": "79:26-79:29", - "definition_extent": "79:1-79:51", - "declaring_type": 3, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@f", - "short_name": "f", - "detailed_name": "unique_ptr, S2> f", - "declaration": "15:43-15:44", - "variable_type": 0, - "cls": 3, - "uses": ["15:43-15:44"] - }, { - "id": 1, - "usr": "c:type_usage_as_template_parameter_complex.cc@1062@F@empty#@local", - "short_name": "local", - "detailed_name": "unique_ptr, S2> * local", - "definition_spelling": "54:39-54:44", - "definition_extent": "54:3-54:44", - "variable_type": 0, - "cls": 1, - "uses": ["54:39-54:44"] - }] -} -*/ diff --git a/tests/usage/type_usage_as_template_parameter_simple.cc b/tests/usage/type_usage_as_template_parameter_simple.cc deleted file mode 100644 index 5dfa93b6..00000000 --- a/tests/usage/type_usage_as_template_parameter_simple.cc +++ /dev/null @@ -1,53 +0,0 @@ -template -class unique_ptr {}; - -struct S; - -static unique_ptr foo; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@unique_ptr", - "short_name": "unique_ptr", - "detailed_name": "unique_ptr", - "definition_spelling": "2:7-2:17", - "definition_extent": "2:1-2:20", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["2:7-2:17", "6:8-6:18"] - }, { - "id": 1, - "usr": "c:@S@S", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:8-4:9", "6:19-6:20"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:type_usage_as_template_parameter_simple.cc@foo", - "short_name": "foo", - "detailed_name": "unique_ptr foo", - "definition_spelling": "6:22-6:25", - "definition_extent": "6:1-6:25", - "variable_type": 0, - "cls": 3, - "uses": ["6:22-6:25"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_extern.cc b/tests/usage/type_usage_declare_extern.cc deleted file mode 100644 index fe37f414..00000000 --- a/tests/usage/type_usage_declare_extern.cc +++ /dev/null @@ -1,36 +0,0 @@ -struct T {}; - -extern T t; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@T", - "short_name": "T", - "detailed_name": "T", - "definition_spelling": "1:8-1:9", - "definition_extent": "1:1-1:12", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:9", "3:8-3:9"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@t", - "short_name": "t", - "detailed_name": "T t", - "declaration": "3:10-3:11", - "variable_type": 0, - "cls": 3, - "uses": ["3:10-3:11"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_field.cc b/tests/usage/type_usage_declare_field.cc deleted file mode 100644 index 2ec0e228..00000000 --- a/tests/usage/type_usage_declare_field.cc +++ /dev/null @@ -1,80 +0,0 @@ -struct ForwardType; -struct ImplementedType {}; - -struct Foo { - ForwardType* a; - ImplementedType b; -}; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@ForwardType", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:19", "5:3-5:14"] - }, { - "id": 1, - "usr": "c:@S@ImplementedType", - "short_name": "ImplementedType", - "detailed_name": "ImplementedType", - "definition_spelling": "2:8-2:23", - "definition_extent": "2:1-2:26", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": ["2:8-2:23", "6:3-6:18"] - }, { - "id": 2, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "4:8-4:11", - "definition_extent": "4:1-7:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [], - "uses": ["4:8-4:11"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@FI@a", - "short_name": "a", - "detailed_name": "ForwardType * Foo::a", - "definition_spelling": "5:16-5:17", - "definition_extent": "5:3-5:17", - "variable_type": 0, - "declaring_type": 2, - "cls": 4, - "uses": ["5:16-5:17"] - }, { - "id": 1, - "usr": "c:@S@Foo@FI@b", - "short_name": "b", - "detailed_name": "ImplementedType Foo::b", - "definition_spelling": "6:19-6:20", - "definition_extent": "6:3-6:20", - "variable_type": 1, - "declaring_type": 2, - "cls": 4, - "uses": ["6:19-6:20"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_local.cc b/tests/usage/type_usage_declare_local.cc deleted file mode 100644 index 2207d338..00000000 --- a/tests/usage/type_usage_declare_local.cc +++ /dev/null @@ -1,78 +0,0 @@ -struct ForwardType; -struct ImplementedType {}; - -void Foo() { - ForwardType* a; - ImplementedType b; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@ForwardType", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:19", "5:3-5:14"] - }, { - "id": 1, - "usr": "c:@S@ImplementedType", - "short_name": "ImplementedType", - "detailed_name": "ImplementedType", - "definition_spelling": "2:8-2:23", - "definition_extent": "2:1-2:26", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": ["2:8-2:23", "6:3-6:18"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Foo()", - "declarations": [], - "definition_spelling": "4:6-4:9", - "definition_extent": "4:1-7:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_declare_local.cc@67@F@Foo#@a", - "short_name": "a", - "detailed_name": "ForwardType * a", - "definition_spelling": "5:16-5:17", - "definition_extent": "5:3-5:17", - "variable_type": 0, - "cls": 1, - "uses": ["5:16-5:17"] - }, { - "id": 1, - "usr": "c:type_usage_declare_local.cc@86@F@Foo#@b", - "short_name": "b", - "detailed_name": "ImplementedType b", - "definition_spelling": "6:19-6:20", - "definition_extent": "6:3-6:20", - "variable_type": 1, - "cls": 1, - "uses": ["6:19-6:20"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_param.cc b/tests/usage/type_usage_declare_param.cc deleted file mode 100644 index 3239fe75..00000000 --- a/tests/usage/type_usage_declare_param.cc +++ /dev/null @@ -1,75 +0,0 @@ -struct ForwardType; -struct ImplementedType {}; - -void foo(ForwardType* f, ImplementedType a) {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@ForwardType", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:19", "4:10-4:21"] - }, { - "id": 1, - "usr": "c:@S@ImplementedType", - "short_name": "ImplementedType", - "detailed_name": "ImplementedType", - "definition_spelling": "2:8-2:23", - "definition_extent": "2:1-2:26", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [1], - "uses": ["2:8-2:23", "4:26-4:41"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#*$@S@ForwardType#$@S@ImplementedType#", - "short_name": "foo", - "detailed_name": "void foo(ForwardType *f, ImplementedType a)", - "declarations": [], - "definition_spelling": "4:6-4:9", - "definition_extent": "4:1-4:47", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_declare_param.cc@60@F@foo#*$@S@ForwardType#$@S@ImplementedType#@f", - "short_name": "f", - "detailed_name": "ForwardType * f", - "definition_spelling": "4:23-4:24", - "definition_extent": "4:10-4:24", - "variable_type": 0, - "cls": 1, - "uses": ["4:23-4:24"] - }, { - "id": 1, - "usr": "c:type_usage_declare_param.cc@76@F@foo#*$@S@ForwardType#$@S@ImplementedType#@a", - "short_name": "a", - "detailed_name": "ImplementedType a", - "definition_spelling": "4:42-4:43", - "definition_extent": "4:26-4:43", - "variable_type": 1, - "cls": 1, - "uses": ["4:42-4:43"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_param_prototype.cc b/tests/usage/type_usage_declare_param_prototype.cc deleted file mode 100644 index a43b3577..00000000 --- a/tests/usage/type_usage_declare_param_prototype.cc +++ /dev/null @@ -1,61 +0,0 @@ -struct Foo; - -void foo(Foo* f, Foo*); -void foo(Foo* f, Foo*) {} - -/* -// TODO: No interesting usage on prototype. But maybe that's ok! -// TODO: We should have the same variable declared for both prototype and -// declaration. So it should have a usage marker on both. Then we could -// rename parameters! - -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:11", "3:10-3:13", "3:18-3:21", "4:10-4:13", "4:18-4:21"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#*$@S@Foo#S0_#", - "short_name": "foo", - "detailed_name": "void foo(Foo *f, Foo *)", - "declarations": [{ - "spelling": "3:6-3:9", - "extent": "3:1-3:23", - "content": "void foo(Foo* f, Foo*)", - "param_spellings": ["3:15-3:16", "3:22-3:22"] - }], - "definition_spelling": "4:6-4:9", - "definition_extent": "4:1-4:26", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_declare_param_prototype.cc@49@F@foo#*$@S@Foo#S0_#@f", - "short_name": "f", - "detailed_name": "Foo * f", - "definition_spelling": "4:15-4:16", - "definition_extent": "4:10-4:16", - "variable_type": 0, - "cls": 1, - "uses": ["4:15-4:16"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_param_unnamed.cc b/tests/usage/type_usage_declare_param_unnamed.cc deleted file mode 100644 index b77318ff..00000000 --- a/tests/usage/type_usage_declare_param_unnamed.cc +++ /dev/null @@ -1,38 +0,0 @@ -struct ForwardType; -void foo(ForwardType*) {} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@ForwardType", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:19", "2:10-2:21"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#*$@S@ForwardType#", - "short_name": "foo", - "detailed_name": "void foo(ForwardType *)", - "declarations": [], - "definition_spelling": "2:6-2:9", - "definition_extent": "2:1-2:26", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/usage/type_usage_declare_qualifiers.cc b/tests/usage/type_usage_declare_qualifiers.cc deleted file mode 100644 index 0fe022cf..00000000 --- a/tests/usage/type_usage_declare_qualifiers.cc +++ /dev/null @@ -1,106 +0,0 @@ -struct Type {}; - -void foo(Type& a0, const Type& a1) { - Type a2; - Type* a3; - const Type* a4; - const Type* const a5 = nullptr; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Type", - "short_name": "Type", - "detailed_name": "Type", - "definition_spelling": "1:8-1:12", - "definition_extent": "1:1-1:15", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1, 2, 3, 4, 5], - "uses": ["1:8-1:12", "3:10-3:14", "3:26-3:30", "4:3-4:7", "5:3-5:7", "6:9-6:13", "7:9-7:13"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#&$@S@Type#&1S1_#", - "short_name": "foo", - "detailed_name": "void foo(Type &a0, const Type &a1)", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_declare_qualifiers.cc@28@F@foo#&$@S@Type#&1S1_#@a0", - "short_name": "a0", - "detailed_name": "Type & a0", - "definition_spelling": "3:16-3:18", - "definition_extent": "3:10-3:18", - "variable_type": 0, - "cls": 1, - "uses": ["3:16-3:18"] - }, { - "id": 1, - "usr": "c:type_usage_declare_qualifiers.cc@38@F@foo#&$@S@Type#&1S1_#@a1", - "short_name": "a1", - "detailed_name": "const Type & a1", - "definition_spelling": "3:32-3:34", - "definition_extent": "3:20-3:34", - "variable_type": 0, - "cls": 1, - "uses": ["3:32-3:34"] - }, { - "id": 2, - "usr": "c:type_usage_declare_qualifiers.cc@59@F@foo#&$@S@Type#&1S1_#@a2", - "short_name": "a2", - "detailed_name": "Type a2", - "definition_spelling": "4:8-4:10", - "definition_extent": "4:3-4:10", - "variable_type": 0, - "cls": 1, - "uses": ["4:8-4:10"] - }, { - "id": 3, - "usr": "c:type_usage_declare_qualifiers.cc@71@F@foo#&$@S@Type#&1S1_#@a3", - "short_name": "a3", - "detailed_name": "Type * a3", - "definition_spelling": "5:9-5:11", - "definition_extent": "5:3-5:11", - "variable_type": 0, - "cls": 1, - "uses": ["5:9-5:11"] - }, { - "id": 4, - "usr": "c:type_usage_declare_qualifiers.cc@84@F@foo#&$@S@Type#&1S1_#@a4", - "short_name": "a4", - "detailed_name": "const Type * a4", - "definition_spelling": "6:15-6:17", - "definition_extent": "6:3-6:17", - "variable_type": 0, - "cls": 1, - "uses": ["6:15-6:17"] - }, { - "id": 5, - "usr": "c:type_usage_declare_qualifiers.cc@103@F@foo#&$@S@Type#&1S1_#@a5", - "short_name": "a5", - "detailed_name": "const Type *const a5", - "definition_spelling": "7:21-7:23", - "definition_extent": "7:3-7:33", - "variable_type": 0, - "cls": 1, - "uses": ["7:21-7:23"] - }] -} -*/ diff --git a/tests/usage/type_usage_declare_static.cc b/tests/usage/type_usage_declare_static.cc deleted file mode 100644 index dc9a3ff1..00000000 --- a/tests/usage/type_usage_declare_static.cc +++ /dev/null @@ -1,36 +0,0 @@ -struct Type {}; -static Type t; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Type", - "short_name": "Type", - "detailed_name": "Type", - "definition_spelling": "1:8-1:12", - "definition_extent": "1:1-1:15", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:12", "2:8-2:12"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:type_usage_declare_static.cc@t", - "short_name": "t", - "detailed_name": "Type t", - "definition_spelling": "2:13-2:14", - "definition_extent": "2:1-2:14", - "variable_type": 0, - "cls": 3, - "uses": ["2:13-2:14"] - }] -} -*/ diff --git a/tests/usage/type_usage_on_return_type.cc b/tests/usage/type_usage_on_return_type.cc deleted file mode 100644 index 7d1d24f6..00000000 --- a/tests/usage/type_usage_on_return_type.cc +++ /dev/null @@ -1,155 +0,0 @@ -struct Type; - -Type* foo(); -Type* foo(); -Type* foo() {} - -class Foo { - Type* Get(int); - void Empty(); -}; - -Type* Foo::Get(int) {} -void Foo::Empty() {} - -extern const Type& external(); - -static Type* bar(); -static Type* bar() {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Type", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:12", "3:1-3:5", "4:1-4:5", "5:1-5:5", "8:3-8:7", "12:1-12:5", "15:14-15:18", "17:8-17:12", "18:8-18:12"] - }, { - "id": 1, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "7:7-7:10", - "definition_extent": "7:1-10:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [1, 2], - "vars": [], - "instances": [], - "uses": ["7:7-7:10", "12:7-12:10", "13:6-13:9"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "Type *foo()", - "declarations": [{ - "spelling": "3:7-3:10", - "extent": "3:1-3:12", - "content": "Type* foo()", - "param_spellings": [] - }, { - "spelling": "4:7-4:10", - "extent": "4:1-4:12", - "content": "Type* foo()", - "param_spellings": [] - }], - "definition_spelling": "5:7-5:10", - "definition_extent": "5:1-5:15", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@S@Foo@F@Get#I#", - "short_name": "Get", - "detailed_name": "Type *Foo::Get(int)", - "declarations": [{ - "spelling": "8:9-8:12", - "extent": "8:3-8:17", - "content": "Type* Get(int)", - "param_spellings": ["8:16-8:16"] - }], - "definition_spelling": "12:12-12:15", - "definition_extent": "12:1-12:23", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@S@Foo@F@Empty#", - "short_name": "Empty", - "detailed_name": "void Foo::Empty()", - "declarations": [{ - "spelling": "9:8-9:13", - "extent": "9:3-9:15", - "content": "void Empty()", - "param_spellings": [] - }], - "definition_spelling": "13:11-13:16", - "definition_extent": "13:1-13:21", - "declaring_type": 1, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": false, - "usr": "c:@F@external#", - "short_name": "external", - "detailed_name": "const Type &external()", - "declarations": [{ - "spelling": "15:20-15:28", - "extent": "15:1-15:30", - "content": "extern const Type& external()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 4, - "is_operator": false, - "usr": "c:type_usage_on_return_type.cc@F@bar#", - "short_name": "bar", - "detailed_name": "Type *bar()", - "declarations": [{ - "spelling": "17:14-17:17", - "extent": "17:1-17:19", - "content": "static Type* bar()", - "param_spellings": [] - }], - "definition_spelling": "18:14-18:17", - "definition_extent": "18:1-18:22", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/usage/type_usage_typedef_and_using.cc b/tests/usage/type_usage_typedef_and_using.cc deleted file mode 100644 index cd313309..00000000 --- a/tests/usage/type_usage_typedef_and_using.cc +++ /dev/null @@ -1,152 +0,0 @@ -struct Foo; -using Foo1 = Foo*; -typedef Foo Foo2; -using Foo3 = Foo1; -using Foo4 = int; - -void accept(Foo*) {} -void accept1(Foo1*) {} -void accept2(Foo2*) {} -void accept3(Foo3*) {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:11", "2:14-2:17", "3:9-3:12", "7:13-7:16"] - }, { - "id": 1, - "usr": "c:@Foo1", - "short_name": "Foo1", - "detailed_name": "Foo1", - "hover": "using Foo1 = Foo*", - "definition_spelling": "2:7-2:11", - "definition_extent": "2:1-2:18", - "alias_of": 0, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:7-2:11", "4:14-4:18", "8:14-8:18"] - }, { - "id": 2, - "usr": "c:type_usage_typedef_and_using.cc@T@Foo2", - "short_name": "Foo2", - "detailed_name": "Foo2", - "hover": "typedef Foo Foo2", - "definition_spelling": "3:13-3:17", - "definition_extent": "3:1-3:17", - "alias_of": 0, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["3:13-3:17", "9:14-9:18"] - }, { - "id": 3, - "usr": "c:@Foo3", - "short_name": "Foo3", - "detailed_name": "Foo3", - "hover": "using Foo3 = Foo1", - "definition_spelling": "4:7-4:11", - "definition_extent": "4:1-4:18", - "alias_of": 1, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:7-4:11", "10:14-10:18"] - }, { - "id": 4, - "usr": "c:@Foo4", - "short_name": "Foo4", - "detailed_name": "Foo4", - "hover": "using Foo4 = int", - "definition_spelling": "5:7-5:11", - "definition_extent": "5:1-5:17", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:7-5:11"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@accept#*$@S@Foo#", - "short_name": "accept", - "detailed_name": "void accept(Foo *)", - "declarations": [], - "definition_spelling": "7:6-7:12", - "definition_extent": "7:1-7:21", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@accept1#**$@S@Foo#", - "short_name": "accept1", - "detailed_name": "void accept1(Foo1 *)", - "declarations": [], - "definition_spelling": "8:6-8:13", - "definition_extent": "8:1-8:23", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@accept2#*$@S@Foo#", - "short_name": "accept2", - "detailed_name": "void accept2(Foo2 *)", - "declarations": [], - "definition_spelling": "9:6-9:13", - "definition_extent": "9:1-9:23", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }, { - "id": 3, - "is_operator": false, - "usr": "c:@F@accept3#**$@S@Foo#", - "short_name": "accept3", - "detailed_name": "void accept3(Foo3 *)", - "declarations": [], - "definition_spelling": "10:6-10:13", - "definition_extent": "10:1-10:23", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/usage/type_usage_typedef_and_using_template.cc b/tests/usage/type_usage_typedef_and_using_template.cc deleted file mode 100644 index be3f5227..00000000 --- a/tests/usage/type_usage_typedef_and_using_template.cc +++ /dev/null @@ -1,60 +0,0 @@ -template -struct Foo; - -using Foo1 = Foo; -typedef Foo Foo2; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@ST>1#T@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["2:8-2:11", "4:14-4:17", "5:9-5:12"] - }, { - "id": 1, - "usr": "c:@Foo1", - "short_name": "Foo1", - "detailed_name": "Foo1", - "hover": "using Foo1 = Foo", - "definition_spelling": "4:7-4:11", - "definition_extent": "4:1-4:22", - "alias_of": 0, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["4:7-4:11", "5:13-5:17"] - }, { - "id": 2, - "usr": "c:type_usage_typedef_and_using_template.cc@T@Foo2", - "short_name": "Foo2", - "detailed_name": "Foo2", - "hover": "typedef Foo Foo2", - "definition_spelling": "5:19-5:23", - "definition_extent": "5:1-5:23", - "alias_of": 0, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["5:19-5:23"] - }], - "funcs": [], - "vars": [] -} -*/ diff --git a/tests/usage/type_usage_various.cc b/tests/usage/type_usage_various.cc deleted file mode 100644 index e433dd58..00000000 --- a/tests/usage/type_usage_various.cc +++ /dev/null @@ -1,74 +0,0 @@ -class Foo { - Foo* make(); -}; - -Foo* Foo::make() { - Foo f; - return nullptr; -} - -extern Foo foo; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [0], - "vars": [], - "instances": [0, 1], - "uses": ["1:7-1:10", "2:3-2:6", "5:1-5:4", "5:6-5:9", "6:3-6:6", "10:8-10:11"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@S@Foo@F@make#", - "short_name": "make", - "detailed_name": "Foo *Foo::make()", - "declarations": [{ - "spelling": "2:8-2:12", - "extent": "2:3-2:14", - "content": "Foo* make()", - "param_spellings": [] - }], - "definition_spelling": "5:11-5:15", - "definition_extent": "5:1-8:2", - "declaring_type": 0, - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_usage_various.cc@57@S@Foo@F@make#@f", - "short_name": "f", - "detailed_name": "Foo f", - "definition_spelling": "6:7-6:8", - "definition_extent": "6:3-6:8", - "variable_type": 0, - "cls": 1, - "uses": ["6:7-6:8"] - }, { - "id": 1, - "usr": "c:@foo", - "short_name": "foo", - "detailed_name": "Foo foo", - "declaration": "10:12-10:15", - "variable_type": 0, - "cls": 3, - "uses": ["10:12-10:15"] - }] -} -*/ diff --git a/tests/usage/usage_inside_of_call.cc b/tests/usage/usage_inside_of_call.cc deleted file mode 100644 index 81925e78..00000000 --- a/tests/usage/usage_inside_of_call.cc +++ /dev/null @@ -1,118 +0,0 @@ -void called(int a); - -int gen(); - -struct Foo { - static int static_var; - int field_var; -}; - -int Foo::static_var = 0; - -void foo() { - int a = 5; - called(a + gen() + Foo().field_var + Foo::static_var); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "5:8-5:11", - "definition_extent": "5:1-8:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [1, 0], - "instances": [], - "uses": ["5:8-5:11", "10:5-10:8", "14:22-14:25", "14:40-14:43"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#I#", - "short_name": "called", - "detailed_name": "void called(int a)", - "declarations": [{ - "spelling": "1:6-1:12", - "extent": "1:1-1:19", - "content": "void called(int a)", - "param_spellings": ["1:17-1:18"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["2@14:3-14:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@gen#", - "short_name": "gen", - "detailed_name": "int gen()", - "declarations": [{ - "spelling": "3:5-3:8", - "extent": "3:1-3:10", - "content": "int gen()", - "param_spellings": [] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["2@14:14-14:17"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "12:6-12:9", - "definition_extent": "12:1-15:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@14:3-14:9", "1@14:14-14:17"] - }], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@static_var", - "short_name": "static_var", - "detailed_name": "int Foo::static_var", - "declaration": "6:14-6:24", - "definition_spelling": "10:10-10:20", - "definition_extent": "10:1-10:24", - "declaring_type": 0, - "cls": 4, - "uses": ["6:14-6:24", "10:10-10:20", "14:45-14:55"] - }, { - "id": 1, - "usr": "c:@S@Foo@FI@field_var", - "short_name": "field_var", - "detailed_name": "int Foo::field_var", - "definition_spelling": "7:7-7:16", - "definition_extent": "7:3-7:16", - "declaring_type": 0, - "cls": 4, - "uses": ["7:7-7:16", "14:28-14:37"] - }, { - "id": 2, - "usr": "c:usage_inside_of_call.cc@145@F@foo#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "13:7-13:8", - "definition_extent": "13:3-13:12", - "cls": 1, - "uses": ["13:7-13:8", "14:10-14:11"] - }] -} -*/ diff --git a/tests/usage/usage_inside_of_call_simple.cc b/tests/usage/usage_inside_of_call_simple.cc deleted file mode 100644 index 2044a6c2..00000000 --- a/tests/usage/usage_inside_of_call_simple.cc +++ /dev/null @@ -1,63 +0,0 @@ -void called(int a); - -int gen() { return 1; } - -void foo() { - called(gen() * gen()); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#I#", - "short_name": "called", - "detailed_name": "void called(int a)", - "declarations": [{ - "spelling": "1:6-1:12", - "extent": "1:1-1:19", - "content": "void called(int a)", - "param_spellings": ["1:17-1:18"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["2@6:3-6:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@gen#", - "short_name": "gen", - "detailed_name": "int gen()", - "declarations": [], - "definition_spelling": "3:5-3:8", - "definition_extent": "3:1-3:24", - "base": [], - "derived": [], - "locals": [], - "callers": ["2@6:10-6:13", "2@6:18-6:21"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "5:6-5:9", - "definition_extent": "5:1-7:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@6:3-6:9", "1@6:10-6:13", "1@6:18-6:21"] - }], - "vars": [] -} -*/ diff --git a/tests/usage/var_usage_call_function.cc b/tests/usage/var_usage_call_function.cc deleted file mode 100644 index 7a56d54b..00000000 --- a/tests/usage/var_usage_call_function.cc +++ /dev/null @@ -1,56 +0,0 @@ -void called() {} - -void caller() { - auto x = &called; - x(); - - called(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@called#", - "short_name": "called", - "detailed_name": "void called()", - "declarations": [], - "definition_spelling": "1:6-1:12", - "definition_extent": "1:1-1:17", - "base": [], - "derived": [], - "locals": [], - "callers": ["1@4:13-4:19", "1@7:3-7:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@caller#", - "short_name": "caller", - "detailed_name": "void caller()", - "declarations": [], - "definition_spelling": "3:6-3:12", - "definition_extent": "3:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@4:13-4:19", "0@7:3-7:9"] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_call_function.cc@39@F@caller#@x", - "short_name": "x", - "detailed_name": "void (*)() x", - "definition_spelling": "4:8-4:9", - "definition_extent": "4:3-4:19", - "cls": 1, - "uses": ["4:8-4:9", "5:3-5:4"] - }] -} -*/ diff --git a/tests/usage/var_usage_class_member.cc b/tests/usage/var_usage_class_member.cc deleted file mode 100644 index b385d195..00000000 --- a/tests/usage/var_usage_class_member.cc +++ /dev/null @@ -1,121 +0,0 @@ -class Foo { -public: - int x; - int y; -}; - -void accept(int); -void accept(int*); - -void foo() { - Foo f; - f.x = 3; - f.x += 5; - accept(f.x); - accept(f.x + 20); - accept(&f.x); - accept(f.y); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0, 1], - "instances": [2], - "uses": ["1:7-1:10", "11:3-11:6"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@accept#I#", - "short_name": "accept", - "detailed_name": "void accept(int)", - "declarations": [{ - "spelling": "7:6-7:12", - "extent": "7:1-7:17", - "content": "void accept(int)", - "param_spellings": ["7:16-7:16"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["2@14:3-14:9", "2@15:3-15:9", "2@17:3-17:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@accept#*I#", - "short_name": "accept", - "detailed_name": "void accept(int *)", - "declarations": [{ - "spelling": "8:6-8:12", - "extent": "8:1-8:18", - "content": "void accept(int*)", - "param_spellings": ["8:17-8:17"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["2@16:3-16:9"], - "callees": [] - }, { - "id": 2, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "10:6-10:9", - "definition_extent": "10:1-18:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@14:3-14:9", "0@15:3-15:9", "1@16:3-16:9", "0@17:3-17:9"] - }], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@FI@x", - "short_name": "x", - "detailed_name": "int Foo::x", - "definition_spelling": "3:7-3:8", - "definition_extent": "3:3-3:8", - "declaring_type": 0, - "cls": 4, - "uses": ["3:7-3:8", "12:5-12:6", "13:5-13:6", "14:12-14:13", "15:12-15:13", "16:13-16:14"] - }, { - "id": 1, - "usr": "c:@S@Foo@FI@y", - "short_name": "y", - "detailed_name": "int Foo::y", - "definition_spelling": "4:7-4:8", - "definition_extent": "4:3-4:8", - "declaring_type": 0, - "cls": 4, - "uses": ["4:7-4:8", "17:12-17:13"] - }, { - "id": 2, - "usr": "c:var_usage_class_member.cc@105@F@foo#@f", - "short_name": "f", - "detailed_name": "Foo f", - "definition_spelling": "11:7-11:8", - "definition_extent": "11:3-11:8", - "variable_type": 0, - "cls": 1, - "uses": ["11:7-11:8", "12:3-12:4", "13:3-13:4", "14:10-14:11", "15:10-15:11", "16:11-16:12", "17:10-17:11"] - }] -} -*/ diff --git a/tests/usage/var_usage_class_member_static.cc b/tests/usage/var_usage_class_member_static.cc deleted file mode 100644 index b8d0b7b1..00000000 --- a/tests/usage/var_usage_class_member_static.cc +++ /dev/null @@ -1,73 +0,0 @@ -struct Foo { - static int x; -}; - -void accept(int); - -void foo() { - accept(Foo::x); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:8-1:11", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:11", "8:10-8:13"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@accept#I#", - "short_name": "accept", - "detailed_name": "void accept(int)", - "declarations": [{ - "spelling": "5:6-5:12", - "extent": "5:1-5:17", - "content": "void accept(int)", - "param_spellings": ["5:16-5:16"] - }], - "base": [], - "derived": [], - "locals": [], - "callers": ["1@8:3-8:9"], - "callees": [] - }, { - "id": 1, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "7:6-7:9", - "definition_extent": "7:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": ["0@8:3-8:9"] - }], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@x", - "short_name": "x", - "detailed_name": "int Foo::x", - "declaration": "2:14-2:15", - "cls": 4, - "uses": ["2:14-2:15", "8:15-8:16"] - }] -} -*/ diff --git a/tests/usage/var_usage_cstyle_cast.cc b/tests/usage/var_usage_cstyle_cast.cc deleted file mode 100644 index 706e36c8..00000000 --- a/tests/usage/var_usage_cstyle_cast.cc +++ /dev/null @@ -1,128 +0,0 @@ -enum VarType {}; - -struct Holder { - static constexpr VarType static_var = (VarType)0x0; -}; - -const VarType Holder::static_var; - - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@E@VarType", - "short_name": "VarType", - "detailed_name": "VarType", - "definition_spelling": "1:6-1:13", - "definition_extent": "1:1-1:16", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:6-1:13", "4:20-4:27", "4:42-4:49", "7:7-7:14"] - }, { - "id": 1, - "usr": "c:@S@Holder", - "short_name": "Holder", - "detailed_name": "Holder", - "definition_spelling": "3:8-3:14", - "definition_extent": "3:1-5:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [], - "uses": ["3:8-3:14", "7:15-7:21"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Holder@static_var", - "short_name": "static_var", - "detailed_name": "const VarType Holder::static_var", - "declaration": "4:28-4:38", - "definition_spelling": "7:23-7:33", - "definition_extent": "7:1-7:33", - "variable_type": 0, - "declaring_type": 1, - "cls": 4, - "uses": ["4:28-4:38", "7:23-7:33"] - }] -} -*/ - - - - - - - - - - - - - - - - - - - - - - - - - -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include diff --git a/tests/usage/var_usage_extern.cc b/tests/usage/var_usage_extern.cc deleted file mode 100644 index 7693e8f2..00000000 --- a/tests/usage/var_usage_extern.cc +++ /dev/null @@ -1,37 +0,0 @@ -extern int a; - -void foo() { - a = 5; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:@a", - "short_name": "a", - "detailed_name": "int a", - "declaration": "1:12-1:13", - "cls": 3, - "uses": ["1:12-1:13", "4:3-4:4"] - }] -} -*/ diff --git a/tests/usage/var_usage_func_parameter.cc b/tests/usage/var_usage_func_parameter.cc deleted file mode 100644 index 9ed35601..00000000 --- a/tests/usage/var_usage_func_parameter.cc +++ /dev/null @@ -1,36 +0,0 @@ -void foo(int a) { - a += 10; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#", - "short_name": "foo", - "detailed_name": "void foo(int a)", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-3:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_func_parameter.cc@9@F@foo#I#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "1:14-1:15", - "definition_extent": "1:10-1:15", - "cls": 1, - "uses": ["1:14-1:15", "2:3-2:4"] - }] -} -*/ diff --git a/tests/usage/var_usage_local.cc b/tests/usage/var_usage_local.cc deleted file mode 100644 index 677c02c9..00000000 --- a/tests/usage/var_usage_local.cc +++ /dev/null @@ -1,37 +0,0 @@ -void foo() { - int x; - x = 3; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-4:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_local.cc@16@F@foo#@x", - "short_name": "x", - "detailed_name": "int x", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:8", - "cls": 1, - "uses": ["2:7-2:8", "3:3-3:4"] - }] -} -*/ diff --git a/tests/usage/var_usage_shadowed_local.cc b/tests/usage/var_usage_shadowed_local.cc deleted file mode 100644 index fd42f212..00000000 --- a/tests/usage/var_usage_shadowed_local.cc +++ /dev/null @@ -1,51 +0,0 @@ -void foo() { - int a; - a = 1; - { - int a; - a = 2; - } - a = 3; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_shadowed_local.cc@16@F@foo#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:8", - "cls": 1, - "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] - }, { - "id": 1, - "usr": "c:var_usage_shadowed_local.cc@43@F@foo#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "5:9-5:10", - "definition_extent": "5:5-5:10", - "cls": 1, - "uses": ["5:9-5:10", "6:5-6:6"] - }] -} -*/ diff --git a/tests/usage/var_usage_shadowed_parameter.cc b/tests/usage/var_usage_shadowed_parameter.cc deleted file mode 100644 index bc4e938d..00000000 --- a/tests/usage/var_usage_shadowed_parameter.cc +++ /dev/null @@ -1,51 +0,0 @@ -void foo(int a) { - a = 1; - { - int a; - a = 2; - } - a = 3; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#", - "short_name": "foo", - "detailed_name": "void foo(int a)", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-8:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_shadowed_parameter.cc@9@F@foo#I#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "1:14-1:15", - "definition_extent": "1:10-1:15", - "cls": 1, - "uses": ["1:14-1:15", "2:3-2:4", "7:3-7:4"] - }, { - "id": 1, - "usr": "c:var_usage_shadowed_parameter.cc@38@F@foo#I#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "4:9-4:10", - "definition_extent": "4:5-4:10", - "cls": 1, - "uses": ["4:9-4:10", "5:5-5:6"] - }] -} -*/ diff --git a/tests/usage/var_usage_static.cc b/tests/usage/var_usage_static.cc deleted file mode 100644 index f2115ba7..00000000 --- a/tests/usage/var_usage_static.cc +++ /dev/null @@ -1,39 +0,0 @@ -static int a; - -void foo() { - a = 3; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:var_usage_static.cc@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "1:12-1:13", - "definition_extent": "1:1-1:13", - "cls": 3, - "uses": ["1:12-1:13", "4:3-4:4"] - }] -} -*/ diff --git a/tests/vars/class_member.cc b/tests/vars/class_member.cc deleted file mode 100644 index 41eff031..00000000 --- a/tests/vars/class_member.cc +++ /dev/null @@ -1,38 +0,0 @@ -class Foo { - Foo* member; -}; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [0], - "uses": ["1:7-1:10", "2:3-2:6"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@FI@member", - "short_name": "member", - "detailed_name": "Foo * Foo::member", - "definition_spelling": "2:8-2:14", - "definition_extent": "2:3-2:14", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:8-2:14"] - }] -} -*/ diff --git a/tests/vars/class_static_member.cc b/tests/vars/class_static_member.cc deleted file mode 100644 index 03529e1e..00000000 --- a/tests/vars/class_static_member.cc +++ /dev/null @@ -1,41 +0,0 @@ -class Foo { - static Foo* member; -}; -Foo* Foo::member = nullptr; - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [0], - "instances": [0], - "uses": ["1:7-1:10", "2:10-2:13", "4:1-4:4", "4:6-4:9"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@member", - "short_name": "member", - "detailed_name": "Foo * Foo::member", - "declaration": "2:15-2:21", - "definition_spelling": "4:11-4:17", - "definition_extent": "4:1-4:27", - "variable_type": 0, - "declaring_type": 0, - "cls": 4, - "uses": ["2:15-2:21", "4:11-4:17"] - }] -} -*/ diff --git a/tests/vars/class_static_member_decl_only.cc b/tests/vars/class_static_member_decl_only.cc deleted file mode 100644 index 37d1d99c..00000000 --- a/tests/vars/class_static_member_decl_only.cc +++ /dev/null @@ -1,35 +0,0 @@ -class Foo { - static int member; -}; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-3:2", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:7-1:10"] - }], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@S@Foo@member", - "short_name": "member", - "detailed_name": "int Foo::member", - "declaration": "2:14-2:20", - "cls": 4, - "uses": ["2:14-2:20"] - }] -} -*/ diff --git a/tests/vars/deduce_auto_type.cc b/tests/vars/deduce_auto_type.cc deleted file mode 100644 index 3ae379ba..00000000 --- a/tests/vars/deduce_auto_type.cc +++ /dev/null @@ -1,64 +0,0 @@ -class Foo {}; -void f() { - auto x = new Foo(); - auto* y = new Foo(); -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "Foo", - "detailed_name": "Foo", - "definition_spelling": "1:7-1:10", - "definition_extent": "1:1-1:13", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["1:7-1:10", "3:16-3:19", "4:17-4:20"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@f#", - "short_name": "f", - "detailed_name": "void f()", - "declarations": [], - "definition_spelling": "2:6-2:7", - "definition_extent": "2:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:deduce_auto_type.cc@29@F@f#@x", - "short_name": "x", - "detailed_name": "Foo * x", - "definition_spelling": "3:8-3:9", - "definition_extent": "3:3-3:21", - "variable_type": 0, - "cls": 1, - "uses": ["3:8-3:9"] - }, { - "id": 1, - "usr": "c:deduce_auto_type.cc@52@F@f#@y", - "short_name": "y", - "detailed_name": "Foo * y", - "definition_spelling": "4:9-4:10", - "definition_extent": "4:3-4:22", - "variable_type": 0, - "cls": 1, - "uses": ["4:9-4:10"] - }] -} -*/ diff --git a/tests/vars/function_local.cc b/tests/vars/function_local.cc deleted file mode 100644 index df90fc32..00000000 --- a/tests/vars/function_local.cc +++ /dev/null @@ -1,52 +0,0 @@ -struct Foo; - -void foo() { - Foo* a; -} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["1:8-1:11", "4:3-4:6"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:function_local.cc@31@F@foo#@a", - "short_name": "a", - "detailed_name": "Foo * a", - "definition_spelling": "4:8-4:9", - "definition_extent": "4:3-4:9", - "variable_type": 0, - "cls": 1, - "uses": ["4:8-4:9"] - }] -} -*/ diff --git a/tests/vars/function_param.cc b/tests/vars/function_param.cc deleted file mode 100644 index 6462097a..00000000 --- a/tests/vars/function_param.cc +++ /dev/null @@ -1,60 +0,0 @@ -struct Foo; - -void foo(Foo* p0, Foo* p1) {} - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@Foo", - "short_name": "", - "detailed_name": "", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0, 1], - "uses": ["1:8-1:11", "3:10-3:13", "3:19-3:22"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#*$@S@Foo#S0_#", - "short_name": "foo", - "detailed_name": "void foo(Foo *p0, Foo *p1)", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-3:30", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:function_param.cc@24@F@foo#*$@S@Foo#S0_#@p0", - "short_name": "p0", - "detailed_name": "Foo * p0", - "definition_spelling": "3:15-3:17", - "definition_extent": "3:10-3:17", - "variable_type": 0, - "cls": 1, - "uses": ["3:15-3:17"] - }, { - "id": 1, - "usr": "c:function_param.cc@33@F@foo#*$@S@Foo#S0_#@p1", - "short_name": "p1", - "detailed_name": "Foo * p1", - "definition_spelling": "3:24-3:26", - "definition_extent": "3:19-3:26", - "variable_type": 0, - "cls": 1, - "uses": ["3:24-3:26"] - }] -} -*/ diff --git a/tests/vars/function_param_unnamed.cc b/tests/vars/function_param_unnamed.cc deleted file mode 100644 index 53f2b9e5..00000000 --- a/tests/vars/function_param_unnamed.cc +++ /dev/null @@ -1,25 +0,0 @@ -void foo(int, int) {} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#I#", - "short_name": "foo", - "detailed_name": "void foo(int, int)", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-1:22", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [] -} -*/ diff --git a/tests/vars/function_shadow_local.cc b/tests/vars/function_shadow_local.cc deleted file mode 100644 index d0ecdf75..00000000 --- a/tests/vars/function_shadow_local.cc +++ /dev/null @@ -1,51 +0,0 @@ -void foo() { - int a; - a = 1; - { - int a; - a = 2; - } - a = 3; -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#", - "short_name": "foo", - "detailed_name": "void foo()", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-9:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:function_shadow_local.cc@16@F@foo#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:3-2:8", - "cls": 1, - "uses": ["2:7-2:8", "3:3-3:4", "8:3-8:4"] - }, { - "id": 1, - "usr": "c:function_shadow_local.cc@43@F@foo#@a", - "short_name": "a", - "detailed_name": "int a", - "definition_spelling": "5:9-5:10", - "definition_extent": "5:5-5:10", - "cls": 1, - "uses": ["5:9-5:10", "6:5-6:6"] - }] -} -*/ diff --git a/tests/vars/function_shadow_param.cc b/tests/vars/function_shadow_param.cc deleted file mode 100644 index 5f7f36b5..00000000 --- a/tests/vars/function_shadow_param.cc +++ /dev/null @@ -1,45 +0,0 @@ -void foo(int p) { - { int p = 0; } -} -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@foo#I#", - "short_name": "foo", - "detailed_name": "void foo(int p)", - "declarations": [], - "definition_spelling": "1:6-1:9", - "definition_extent": "1:1-3:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:function_shadow_param.cc@9@F@foo#I#@p", - "short_name": "p", - "detailed_name": "int p", - "definition_spelling": "1:14-1:15", - "definition_extent": "1:10-1:15", - "cls": 1, - "uses": ["1:14-1:15"] - }, { - "id": 1, - "usr": "c:function_shadow_param.cc@23@F@foo#I#@p", - "short_name": "p", - "detailed_name": "int p", - "definition_spelling": "2:9-2:10", - "definition_extent": "2:5-2:14", - "cls": 1, - "uses": ["2:9-2:10"] - }] -} -*/ diff --git a/tests/vars/global_variable.cc b/tests/vars/global_variable.cc deleted file mode 100644 index e2948bef..00000000 --- a/tests/vars/global_variable.cc +++ /dev/null @@ -1,20 +0,0 @@ -static int global = 0; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:global_variable.cc@global", - "short_name": "global", - "detailed_name": "int global", - "definition_spelling": "1:12-1:18", - "definition_extent": "1:1-1:22", - "cls": 3, - "uses": ["1:12-1:18"] - }] -} -*/ diff --git a/tests/vars/global_variable_decl_only.cc b/tests/vars/global_variable_decl_only.cc deleted file mode 100644 index 4d74d23b..00000000 --- a/tests/vars/global_variable_decl_only.cc +++ /dev/null @@ -1,19 +0,0 @@ -extern int global; -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [], - "funcs": [], - "vars": [{ - "id": 0, - "usr": "c:@global", - "short_name": "global", - "detailed_name": "int global", - "declaration": "1:12-1:18", - "cls": 3, - "uses": ["1:12-1:18"] - }] -} -*/ diff --git a/tests/vars/type_instance_on_using_type.cc b/tests/vars/type_instance_on_using_type.cc deleted file mode 100644 index 20c5555a..00000000 --- a/tests/vars/type_instance_on_using_type.cc +++ /dev/null @@ -1,72 +0,0 @@ -struct S {}; -using F = S; -void Foo() { - F a; -} - -// TODO: Should we also add a usage to |S|? - -/* -OUTPUT: -{ - "includes": [], - "skipped_by_preprocessor": [], - "types": [{ - "id": 0, - "usr": "c:@S@S", - "short_name": "S", - "detailed_name": "S", - "definition_spelling": "1:8-1:9", - "definition_extent": "1:1-1:12", - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [], - "uses": ["1:8-1:9", "2:11-2:12"] - }, { - "id": 1, - "usr": "c:@F", - "short_name": "F", - "detailed_name": "F", - "hover": "using F = S", - "definition_spelling": "2:7-2:8", - "definition_extent": "2:1-2:12", - "alias_of": 0, - "parents": [], - "derived": [], - "types": [], - "funcs": [], - "vars": [], - "instances": [0], - "uses": ["2:7-2:8", "4:3-4:4"] - }], - "funcs": [{ - "id": 0, - "is_operator": false, - "usr": "c:@F@Foo#", - "short_name": "Foo", - "detailed_name": "void Foo()", - "declarations": [], - "definition_spelling": "3:6-3:9", - "definition_extent": "3:1-5:2", - "base": [], - "derived": [], - "locals": [], - "callers": [], - "callees": [] - }], - "vars": [{ - "id": 0, - "usr": "c:type_instance_on_using_type.cc@44@F@Foo#@a", - "short_name": "a", - "detailed_name": "F a", - "definition_spelling": "4:5-4:6", - "definition_extent": "4:3-4:6", - "variable_type": 1, - "cls": 1, - "uses": ["4:5-4:6"] - }] -} -*/