summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/Core
Commit message (Collapse)AuthorAgeFilesLines
* Finish building the full-expression for a static_assert expressionRichard Smith2019-09-201-2/+2
| | | | | | | | | | | | | | before evaluating it rather than afterwards. This is groundwork for C++20's P0784R7, where non-trivial destructors can be constexpr, so we need ExprWithCleanups markers in constant expressions. No significant functionality change intended (though this fixes a bug only visible through libclang / -ast-dump / tooling: we now store the converted condition on the StaticAssertDecl rather than the original). llvm-svn: 372368
* [clang][Index] Mark references from Constructors and Destructors to class as ↵Kadir Cetinkaya2019-03-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | NameReference Summary: In current indexing logic we get references to class itself when we see a constructor/destructor which is only syntactically true. Semantically this information is not correct. This patch marks that reference as NameReference to let clients deal with it. Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir Reviewed By: gribozavr, nathawes Subscribers: nathawes, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58814 llvm-svn: 355668
* [clang][Index] Fix usage of IndexImplicitInstantiationKadir Cetinkaya2019-02-181-8/+8
| | | | | | | | | | | | | | Summary: Indexing context was skipping explicit template instantiations as well. This patch makes sure it only skips implicit ones. Subscribers: arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58189 llvm-svn: 354262
* [Index] Use locations to uniquify function-scope BindingDecl USRFangrui Song2018-10-091-0/+2
| | | | | | | | | | | | | | | | | | | Summary: This makes BindingDecl's of the same name have different USRs, so that references can be correctly attributed. int a[1] = {}; { auto [x] = a; x; } { auto [x] = a; x; } Reviewers: akyrtzi, arphaman, rsmith, hokein Reviewed By: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52445 llvm-svn: 344010
* [index] Enhance indexing for module referencesArgyrios Kyrtzidis2018-09-184-3/+23
| | | | | | | * Create a USR for the occurrences of the 'module' symbol kind * Record module references for each identifier in an import declaration llvm-svn: 342484
* [index] Introduce 'ProtocolInterface' as part of SymbolPropertySetArgyrios Kyrtzidis2018-08-262-3/+3
| | | | | | | This is useful to directly infer that a method or property is from a protocol interface at the point of the symbol occurrences. llvm-svn: 340696
* [index] For an ObjC message call, also record as receivers the protocols if ↵Argyrios Kyrtzidis2018-08-171-2/+20
| | | | | | they are present in the ObjC type llvm-svn: 340109
* Try to fix build bot after r336524Eric Liu2018-07-091-1/+1
| | | | llvm-svn: 336532
* [Index] Add indexing support for MACROs.Eric Liu2018-07-091-0/+12
| | | | | | | | | | | | Reviewers: akyrtzi, arphaman, sammccall Reviewed By: sammccall Subscribers: malaperle, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D48961 llvm-svn: 336524
* [index] Fix crash when indexing a C++14 PCH/module related to ↵Argyrios Kyrtzidis2018-01-261-0/+17
| | | | | | | | | | | | | TemplateTemplateParmDecls of alias templates TemplateTemplateParmDecls of alias templates ended-up serialized as 'file-level decls' which was causing a crash while trying to index a PCH/module file that contained them. Commit makes sure TemplateTemplateParmDecls are not recorded as such kind of decls. Fixes crash of rdar://36608297 Differential Revision: https://reviews.llvm.org/D42588 llvm-svn: 323549
* [index] tag declarations should use the decl role instead of refAlex Lorenz2017-11-091-3/+3
| | | | | | | | | The 'decl' role is more canonical than the 'ref'. This helps us establish the 'specialization-of' relation just by looking at decls or defs. rdar://31884960 llvm-svn: 317832
* [index] __builtin_offset's field reference is located at the end locationAlex Lorenz2017-11-071-1/+1
| | | | | | The starting location is the location of the '.' llvm-svn: 317596
* [index] index field references in __builtin_offsetAlex Lorenz2017-11-071-0/+33
| | | | | | rdar://35109556 llvm-svn: 317593
* [index] Add indexing for unresolved-using declarationsBen Langmuir2017-08-161-0/+66
| | | | | | | | | | | In dependent contexts we end up referencing these, so make sure they have USRs, and have their declarations indexed. For the most part they behave like typedefs, but we also need to worry about having multiple using declarations with the same "name". rdar://problem/33883650 llvm-svn: 311053
* [index] Update indexing to handle CXXDeductionGuideDecls properlyArgyrios Kyrtzidis2017-08-151-0/+13
| | | | | | | | | | | CXXDeductionGuideDecls can't be referenced so there's no need to output a symbol occurrence for them. Also handle DeducedTemplateSpecializationTypeLocs in the TypeIndexer so we don't miss the symbol occurrences of the corresponding template decls. Patch by Nathan Hawes! Differential Revision: https://reviews.llvm.org/D36641 llvm-svn: 310933
* [index] Set SymbolSubKind::Accessor[GS]etter on class methodsBen Langmuir2017-07-211-2/+11
| | | | | | | | | We have the same relation between class properties and getter/setters that we have for instance properties, so set the same symbol sub-kind. rdar://problem/32376404 llvm-svn: 308800
* [Index] Prevent canonical decl becoming nullptrKrasimir Georgiev2017-07-181-0/+4
| | | | | | | | | | | | | | | | | | Summary: This patch prevents getCanonicalDecl returning nullptr in case it finds a canonical TemplateDeclaration with no attached TemplatedDecl. Found by running the indexer over a version of the standard library deep inside a template metaprogramming mess. Reviewers: klimek, vsk Reviewed By: vsk Subscribers: vsk, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D35212 llvm-svn: 308269
* [index] Objective-C method declarations and message sends withAlex Lorenz2017-07-131-0/+25
| | | | | | | | an empty first selector piece should store the location of the first ':' rdar://33188656 llvm-svn: 307901
* [index] Don't add relation to a NamedDecl with no nameBen Langmuir2017-07-121-0/+13
| | | | | | | | | | | | Unless it's one of the special cases (tag, category) that we can handle. This syncs up the check between handling a decl and handling a relation. This would cause invalid nameless decls to end up in relations despite having no name or USR. rdar://problem/32474406 llvm-svn: 307855
* [index] Index nested name qualifiers in a forward declaration of aAlex Lorenz2017-07-041-0/+16
| | | | | | | | class template specialization rdar://33122110 llvm-svn: 307074
* [index] Remove 'implicit' role for message sends in implicit ObjCAlex Lorenz2017-07-031-0/+25
| | | | | | | | property references rdar://32375673 llvm-svn: 307016
* [index] Add the "SpecializationOf" relation to the forward declarationsAlex Lorenz2017-06-221-3/+7
| | | | | | | | | | | | | | of class template specializations This commit fixes an issue where a forward declaration of a class template specialization was not related to the base template. We need to relate even forward declarations because specializations don't have to be defined. rdar://32869409 Differential Revision: https://reviews.llvm.org/D34462 llvm-svn: 305996
* [index] Nested class declarations should be annotated with theAlex Lorenz2017-06-211-0/+17
| | | | | | | | | | | | | | | | | | | "specializationOf" relation if they pseudo-override a type in the base template This commit fixes an issue where Xcode's renaming engine couldn't find the reference to the second occurrence of "InnerClass" in this example: template<typename T> struct Ts { template<typename U> struct InnerClass { }; }; template<> struct Ts<int> { template<typename U> struct InnerClass; // This occurrence wasn't renamed }; rdar://31884960 Differential Revision: https://reviews.llvm.org/D34392 llvm-svn: 305911
* [index] Record C++17 global binding declarationsAlex Lorenz2017-06-151-1/+27
| | | | | | | | The global C++17 binding declarations should be indexed as variable symbols. Differential Revision: https://reviews.llvm.org/D33920 llvm-svn: 305508
* [index] Index static_assert declarationsAlex Lorenz2017-06-151-0/+16
| | | | | | | | | | static_assert declarations have to be visited while indexing so that we can gather the references to declarations that are present in their assert expression. Differential Revision: https://reviews.llvm.org/D33913 llvm-svn: 305504
* [index] The references to explicit class properties should be recordedAlex Lorenz2017-05-241-0/+9
| | | | | | rdar://32376363 llvm-svn: 303751
* [index] The references to enum constants from member enums that areAlex Lorenz2017-05-231-0/+3
| | | | | | | | | from template instantiations should refer to the enum constant in the pattern enum in the base template rdar://32325459 llvm-svn: 303651
* [index] The references to member enums from template instantiations shouldAlex Lorenz2017-05-231-0/+8
| | | | | | | | refer to the pattern member enum in the base template rdar://32325459 llvm-svn: 303650
* [index] The references to type aliases and typedefs from templateAlex Lorenz2017-05-231-0/+10
| | | | | | | | | instantiations should refer to the pattern type aliases / typedefs in the base templates rdar://32325459 llvm-svn: 303648
* [index] The references to fields from nested records in template instantiationsAlex Lorenz2017-05-231-0/+7
| | | | | | | | should refer to the pattern fields in the nested records in the base templates rdar://32352429 llvm-svn: 303647
* [index] The references to records from template instantiations should referAlex Lorenz2017-05-231-0/+21
| | | | | | | | to the pattern records in the base templates rdar://32325459 llvm-svn: 303646
* [index] Index the default template parameter valuesAlex Lorenz2017-05-221-0/+59
| | | | | | rdar://32323724 llvm-svn: 303568
* [index] Index the deleted functionsAlex Lorenz2017-05-221-0/+8
| | | | | | rdar://32323386 llvm-svn: 303563
* [index] Visit the default argument values in function definitionsAlex Lorenz2017-05-221-1/+17
| | | | | | rdar://32323315 llvm-svn: 303559
* [index] 'using namespace' declarations in functions should recordAlex Lorenz2017-05-221-0/+11
| | | | | | | | the reference to the namespace rdar://32323190 llvm-svn: 303555
* [index] Fix forward declarations interfering with USR generation of external ↵Argyrios Kyrtzidis2017-05-201-0/+4
| | | | | | | | | source symbols Patch by Nathan Hawes. https://reviews.llvm.org/D33346 llvm-svn: 303484
* [index] Avoid one more crash caused by infinite recursion that happens whenAlex Lorenz2017-05-181-0/+17
| | | | | | | | | | looking up a dependent name in a record that derives from itself rdar://32273000 Differential Revision: https://reviews.llvm.org/D33324 llvm-svn: 303366
* [index] Record references to class receivers used in property referencesAlex Lorenz2017-05-181-0/+19
| | | | | | rdar://32250025 llvm-svn: 303343
* [index] Avoid another crash that happens when looking up a dependent nameAlex Lorenz2017-05-161-0/+10
| | | | | | | | in a record that has a base without a definition rdar://32224197 llvm-svn: 303192
* [index] References to fields from template instantiations should refer toAlex Lorenz2017-05-151-0/+39
| | | | | | | | fields in base templates rdar://32197158 llvm-svn: 303068
* [index] Visit and store information about namespace alias declarationsAlex Lorenz2017-05-151-0/+7
| | | | | | rdar://32195226 llvm-svn: 303048
* [index] Store correct location for namespace nested name qualifiersAlex Lorenz2017-05-151-0/+18
| | | | | | rdar://32195200 llvm-svn: 303046
* [index] Avoid a crash that happens when looking up a dependent nameAlex Lorenz2017-05-151-0/+9
| | | | | | | | in a record that has no definition rdar://32194921 llvm-svn: 303045
* [index] Index template specialization arguments for function templatsAlex Lorenz2017-05-121-0/+27
| | | | | | | | Also ensure that class template specialization arguments are covered rdar://31812032 llvm-svn: 302918
* [index] Index simple dependent declaration referencesAlex Lorenz2017-05-101-0/+124
| | | | | | | | | | | | This commit implements basic support for indexing of dependent declaration references. Now the indexer tries to find a suitable match in the base template for a dependent member ref/decl ref/dependent type. rdar://29158210 Differential Revision: https://reviews.llvm.org/D32972 llvm-svn: 302632
* [Index] The relation between the declarations in templateAlex Lorenz2017-05-041-27/+26
| | | | | | | | | | specializations that 'override' declarations in the base template should use the 'specializationOf' relation instead of 'specializationOf | overrideOf'. The indexer relations are meant to be orthogonal, so 'specializationOf' is better than the combined relation. llvm-svn: 302136
* [index] Mark the ObjC implicit accessor method definitions as 'dynamic' as wellArgyrios Kyrtzidis2017-04-271-12/+12
| | | | llvm-svn: 301548
* [index] Index type source info for class specializationsAlex Lorenz2017-04-251-0/+33
| | | | | | rdar://31758344 llvm-svn: 301315
* [index] Record the 'SpecializationOf' relation for function specializationsAlex Lorenz2017-04-251-0/+35
| | | | | | rdar://31603531 llvm-svn: 301310
* [index] If the 'external_source_symbol' attribute indicates 'Swift' as the ↵Argyrios Kyrtzidis2017-04-241-15/+15
| | | | | | language then report it accordingly llvm-svn: 301183
OpenPOWER on IntegriCloud