summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/Core/index-source.cpp
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] 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] 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] Index nested name qualifiers in a forward declaration of aAlex Lorenz2017-07-041-0/+16
| | | | | | | | class template specialization rdar://33122110 llvm-svn: 307074
* [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] 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] 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] 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] 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] 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] The relation between the declarations in template specializationsAlex Lorenz2017-04-241-0/+109
| | | | | | | | | | | | that 'override' declarations in the base template should be recorded This can be used for improved "go to definition" feature in Xcode. rdar://31604739 Differential Revision: https://reviews.llvm.org/D32020 llvm-svn: 301180
* [index] Record class template specializations using a new 'SpecializationOf'Alex Lorenz2017-04-201-0/+20
| | | | | | | | | | relationship rdar://31603531 Differential Revision: https://reviews.llvm.org/D32010 llvm-svn: 300832
* [index] For C++ constructors/destructors, add references to the parent type ↵Argyrios Kyrtzidis2017-03-171-3/+20
| | | | | | | | | where its name appears in definitions and declarations Patch by Nathan Hawes! https://reviews.llvm.org/D30730 llvm-svn: 298170
* [index] C++: Improve handling of typedefs as base names in C++ class ↵Argyrios Kyrtzidis2017-03-041-1/+14
| | | | | | | | | | | declarations Report the typedef as reference, and desugar it to report the underlying class as an implicit 'base' reference. Reporting the underlying base class for 'base' relations matches the ObjC handling and leads to a simpler model. llvm-svn: 296975
* [index] USR generation: use getTemplateArgs() instead of ↵Argyrios Kyrtzidis2017-02-151-0/+10
| | | | | | | | getTemplateInstantiationArgs() Otherwise we may end up creating a different USR for the definition of a function, vs its declaration. llvm-svn: 295191
* [index] Add 'contained-by' relation between references and their lexical ↵Argyrios Kyrtzidis2017-01-111-4/+4
| | | | | | container. llvm-svn: 291700
* [index] Introduce SymbolSubKind for reporting language-specific details.Argyrios Kyrtzidis2017-01-081-0/+11
| | | | | | Initially reports if a constructor symbol is a copy or move constructor. llvm-svn: 291409
* [index] Handle properly C++14's template variables.Argyrios Kyrtzidis2016-11-071-1/+12
| | | | | | | | | - Infer the right symbol kind. - Provide a templated USR, similar to how we handle class templates. rdar://28980398 llvm-svn: 286154
* [index] Make sure to mark class template symbols as having 'generic' sub-kind.Argyrios Kyrtzidis2016-11-071-1/+5
| | | | llvm-svn: 286153
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-021-0/+6
| | | | | | | | | | | new' function. Part of this is to allow creating a USR for the canonical decl of that which is implicit and does not have a source location. rdar://28978992 llvm-svn: 285868
* [index] Fix crash with indexing designated init expressions inside templates.Argyrios Kyrtzidis2016-08-031-0/+12
| | | | | | rdar://27452869 llvm-svn: 277570
* [index] Remove redundancy between symbol kind and languageBen Langmuir2016-03-251-1/+1
| | | | | | | | | Condense the ObjCKIND and CXXKIND options into just KIND, since the language was already specified on a per-symbol basis and this information was redundant. This only changes the internal representation; naturally the libclang interface remains the same. llvm-svn: 264423
* [index] Use ',' to separate symbol roles when printing.Argyrios Kyrtzidis2016-02-291-1/+1
| | | | llvm-svn: 262205
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-151-0/+9
printing policy. Enable it for USRs and names when indexing. Forward references can have different template argument names; including them makes USRs and names unstable, since the name depends on whether we saw a forward reference or not. llvm-svn: 260866
OpenPOWER on IntegriCloud