summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
Commit message (Collapse)AuthorAgeFilesLines
* [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.Ilya Biryukov2017-07-141-0/+12
| | | | | | | | | | | | | | | | Summary: We need it in clangd for refactoring that replaces ASTUnit with manual AST management. Reviewers: akyrtzi, benlangmuir, arphaman, klimek Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D35405 llvm-svn: 308016
* [index] Don't add relation to a NamedDecl with no nameBen Langmuir2017-07-121-5/+9
| | | | | | | | | | | | 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
* [modules ts] Basic for module linkage.Richard Smith2017-07-071-1/+3
| | | | | | | | | | In addition to the formal linkage rules, the Modules TS includes cases where internal-linkage symbols within a module interface unit can be referenced from outside the module via exported inline functions / templates. We give such declarations "module-internal linkage", which is formally internal linkage, but results in an externally-visible symbol. llvm-svn: 307434
* [index] Index nested name qualifiers in a forward declaration of aAlex Lorenz2017-07-041-0/+2
| | | | | | | | class template specialization rdar://33122110 llvm-svn: 307074
* [index] Remove 'implicit' role for message sends in implicit ObjCAlex Lorenz2017-07-031-1/+25
| | | | | | | | property references rdar://32375673 llvm-svn: 307016
* [index] Add the "SpecializationOf" relation to the forward declarationsAlex Lorenz2017-06-221-12/+10
| | | | | | | | | | | | | | 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-1/+3
| | | | | | | | | | | | | | | | | | | "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-152-0/+10
| | | | | | | | 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/+7
| | | | | | | | | | 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/+12
| | | | | | rdar://32376363 llvm-svn: 303751
* [index] The references to enum constants from member enums that areAlex Lorenz2017-05-231-1/+9
| | | | | | | | | 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/+5
| | | | | | | | 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-7/+8
| | | | | | | | | 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-6/+14
| | | | | | | | 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/+5
| | | | | | | | to the pattern records in the base templates rdar://32325459 llvm-svn: 303646
* [index] Index the default template parameter valuesAlex Lorenz2017-05-221-0/+46
| | | | | | rdar://32323724 llvm-svn: 303568
* [index] Index the deleted functionsAlex Lorenz2017-05-221-3/+0
| | | | | | rdar://32323386 llvm-svn: 303563
* [index] Visit the default argument values in function definitionsAlex Lorenz2017-05-221-0/+11
| | | | | | rdar://32323315 llvm-svn: 303559
* [index] 'using namespace' declarations in functions should recordAlex Lorenz2017-05-222-2/+8
| | | | | | | | the reference to the namespace rdar://32323190 llvm-svn: 303555
* [index] Fix forward declarations interfering with USR generation of external ↵Argyrios Kyrtzidis2017-05-202-11/+2
| | | | | | | | | source symbols Patch by Nathan Hawes. https://reviews.llvm.org/D33346 llvm-svn: 303484
* [index] Record references to class receivers used in property referencesAlex Lorenz2017-05-181-0/+3
| | | | | | rdar://32250025 llvm-svn: 303343
* [index] References to fields from template instantiations should refer toAlex Lorenz2017-05-151-0/+15
| | | | | | | | fields in base templates rdar://32197158 llvm-svn: 303068
* [index] Visit and store information about namespace alias declarationsAlex Lorenz2017-05-151-0/+8
| | | | | | rdar://32195226 llvm-svn: 303048
* [index] Store correct location for namespace nested name qualifiersAlex Lorenz2017-05-151-1/+1
| | | | | | rdar://32195200 llvm-svn: 303046
* [index] Avoid a crash that happens when looking up a dependent nameAlex Lorenz2017-05-152-0/+6
| | | | | | | | in a record that has no definition rdar://32194921 llvm-svn: 303045
* [index] Index template specialization arguments for function templatsAlex Lorenz2017-05-121-0/+22
| | | | | | | | Also ensure that class template specialization arguments are covered rdar://31812032 llvm-svn: 302918
* [index] Index simple dependent declaration referencesAlex Lorenz2017-05-102-0/+69
| | | | | | | | | | | | 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-3/+1
| | | | | | | | | | 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] Handle vector types in USR generatorAlex Lorenz2017-04-281-1/+7
| | | | | | rdar://25339187 llvm-svn: 301635
* [index] Mark the ObjC implicit accessor method definitions as 'dynamic' as wellArgyrios Kyrtzidis2017-04-271-4/+4
| | | | llvm-svn: 301548
* [index] Index type source info for class specializationsAlex Lorenz2017-04-251-0/+3
| | | | | | rdar://31758344 llvm-svn: 301315
* [index] Record the 'SpecializationOf' relation for function specializationsAlex Lorenz2017-04-251-0/+4
| | | | | | rdar://31603531 llvm-svn: 301310
* [index] If the 'external_source_symbol' attribute indicates 'Swift' as the ↵Argyrios Kyrtzidis2017-04-241-0/+15
| | | | | | language then report it accordingly llvm-svn: 301183
* [index] The relation between the declarations in template specializationsAlex Lorenz2017-04-243-4/+66
| | | | | | | | | | | | 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] Take into account the category's external_symbol attr for ↵Argyrios Kyrtzidis2017-04-211-19/+45
| | | | | | namespacing its methods llvm-svn: 301051
* [index] Take advantage of 'external_source_symbol' attribute for indexing ↵Argyrios Kyrtzidis2017-04-215-42/+108
| | | | | | | | | purposes - Ignore decls marked as 'generated_declaration' - Include the 'defined_in' in the USR for additional namespacing llvm-svn: 300949
* [index] For 'transparent' tag typedefs, ignore their tag referenceArgyrios Kyrtzidis2017-04-211-2/+3
| | | | llvm-svn: 300948
* Delete unused IncompleteFormat variable, NFCi.Krasimir Georgiev2017-04-201-3/+1
| | | | llvm-svn: 300841
* [index] Record class template specializations using a new 'SpecializationOf'Alex Lorenz2017-04-205-5/+20
| | | | | | | | | | relationship rdar://31603531 Differential Revision: https://reviews.llvm.org/D32010 llvm-svn: 300832
* Fix MSVC 'not all control paths return a value' warning.Simon Pilgrim2017-03-241-0/+1
| | | | llvm-svn: 298712
* [index] When indexing system headers make sure to report important reference ↵Argyrios Kyrtzidis2017-03-232-4/+58
| | | | | | | | | | relations Even if we exclude plain reference occurrences, we should include relation-based references, like the 'base' one. rdar://31010737 llvm-svn: 298622
* [index/AST] Determine if a typedef shares a name and spelling location with ↵Argyrios Kyrtzidis2017-03-212-5/+12
| | | | | | | | | | its underlying tag type In such a case, as when using the NS_ENUM macro, for indexing purposes treat the typedef as 'transparent', meaning we treat its references as symbols of the underlying tag symbol. Also provide a libclang API to check for such typedefs. llvm-svn: 298392
* [index] For C++ constructors/destructors, add references to the parent type ↵Argyrios Kyrtzidis2017-03-172-1/+10
| | | | | | | | | where its name appears in definitions and declarations Patch by Nathan Hawes! https://reviews.llvm.org/D30730 llvm-svn: 298170
* [index/AST] Add references for ObjC getter=/setter= property attributes and ↵Argyrios Kyrtzidis2017-03-162-5/+32
| | | | | | | | | | | related property getter/setter role fixes This enhances the AST to keep track of locations of the names in those ObjC property attributes, and reports them for indexing. Patch by Nathan Hawes! https://reviews.llvm.org/D30907 llvm-svn: 297972
* [index] Mark categories of test classes with the 'UnitTest' symbol property ↵Argyrios Kyrtzidis2017-03-071-1/+9
| | | | | | as well. llvm-svn: 297133
* [index] C++: Improve handling of typedefs as base names in C++ class ↵Argyrios Kyrtzidis2017-03-041-6/+18
| | | | | | | | | | | 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] ObjC: Improve handling of typedefs as base names in ObjC interface ↵Argyrios Kyrtzidis2017-03-041-8/+27
| | | | | | | | | declarations - Report the typedef reference occurrence - Mark super or protocol references as 'implicit' when they come from a typedef. llvm-svn: 296974
* [clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev2017-03-011-2/+4
| | | | | | | | | | | | | | | | Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 llvm-svn: 296632
* [index] Add 'Parameter' symbol kind and 'Local' symbol property to ↵Argyrios Kyrtzidis2017-02-265-35/+47
| | | | | | | | | | | | distinguish function-local symbols Parameters have a 'child' relation to their function/method. Also add an option '-include-locals' to 'c-index-test core' to enable indexing of function-local symbols. Original patch from Nathan Hawes with some changes by me. https://reviews.llvm.org/D30304 llvm-svn: 296282
* [index] Improvde how we handle synthesized ObjC properties and the ↵Argyrios Kyrtzidis2017-02-172-35/+65
| | | | | | | | | | | | associated ivars. Related synthesized properties with the ivar they use with the 'accessor' relation, and make sure we mark them 'implicit' when appropriate. Patch by Nathan Hawes! https://reviews.llvm.org/D30012 llvm-svn: 295416
OpenPOWER on IntegriCloud