aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Index
AgeCommit message (Collapse)AuthorFilesLines
2017-07-04[index] Index nested name qualifiers in a forward declaration of aAlex Lorenz1-0/+2
class template specialization rdar://33122110 llvm-svn: 307074
2017-07-03[index] Remove 'implicit' role for message sends in implicit ObjCAlex Lorenz1-1/+25
property references rdar://32375673 llvm-svn: 307016
2017-06-22[index] Add the "SpecializationOf" relation to the forward declarationsAlex Lorenz1-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
2017-06-21[index] Nested class declarations should be annotated with theAlex Lorenz1-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
2017-06-15[index] Record C++17 global binding declarationsAlex Lorenz2-0/+10
The global C++17 binding declarations should be indexed as variable symbols. Differential Revision: https://reviews.llvm.org/D33920 llvm-svn: 305508
2017-06-15[index] Index static_assert declarationsAlex Lorenz1-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
2017-05-24[index] The references to explicit class properties should be recordedAlex Lorenz1-0/+12
rdar://32376363 llvm-svn: 303751
2017-05-23[index] The references to enum constants from member enums that areAlex Lorenz1-1/+9
from template instantiations should refer to the enum constant in the pattern enum in the base template rdar://32325459 llvm-svn: 303651
2017-05-23[index] The references to member enums from template instantiations shouldAlex Lorenz1-0/+5
refer to the pattern member enum in the base template rdar://32325459 llvm-svn: 303650
2017-05-23[index] The references to type aliases and typedefs from templateAlex Lorenz1-7/+8
instantiations should refer to the pattern type aliases / typedefs in the base templates rdar://32325459 llvm-svn: 303648
2017-05-23[index] The references to fields from nested records in template instantiationsAlex Lorenz1-6/+14
should refer to the pattern fields in the nested records in the base templates rdar://32352429 llvm-svn: 303647
2017-05-23[index] The references to records from template instantiations should referAlex Lorenz1-0/+5
to the pattern records in the base templates rdar://32325459 llvm-svn: 303646
2017-05-22[index] Index the default template parameter valuesAlex Lorenz1-0/+46
rdar://32323724 llvm-svn: 303568
2017-05-22[index] Index the deleted functionsAlex Lorenz1-3/+0
rdar://32323386 llvm-svn: 303563
2017-05-22[index] Visit the default argument values in function definitionsAlex Lorenz1-0/+11
rdar://32323315 llvm-svn: 303559
2017-05-22[index] 'using namespace' declarations in functions should recordAlex Lorenz2-2/+8
the reference to the namespace rdar://32323190 llvm-svn: 303555
2017-05-20[index] Fix forward declarations interfering with USR generation of external ↵Argyrios Kyrtzidis2-11/+2
source symbols Patch by Nathan Hawes. https://reviews.llvm.org/D33346 llvm-svn: 303484
2017-05-18[index] Record references to class receivers used in property referencesAlex Lorenz1-0/+3
rdar://32250025 llvm-svn: 303343
2017-05-15[index] References to fields from template instantiations should refer toAlex Lorenz1-0/+15
fields in base templates rdar://32197158 llvm-svn: 303068
2017-05-15[index] Visit and store information about namespace alias declarationsAlex Lorenz1-0/+8
rdar://32195226 llvm-svn: 303048
2017-05-15[index] Store correct location for namespace nested name qualifiersAlex Lorenz1-1/+1
rdar://32195200 llvm-svn: 303046
2017-05-15[index] Avoid a crash that happens when looking up a dependent nameAlex Lorenz2-0/+6
in a record that has no definition rdar://32194921 llvm-svn: 303045
2017-05-12[index] Index template specialization arguments for function templatsAlex Lorenz1-0/+22
Also ensure that class template specialization arguments are covered rdar://31812032 llvm-svn: 302918
2017-05-10[index] Index simple dependent declaration referencesAlex Lorenz2-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
2017-05-04[Index] The relation between the declarations in templateAlex Lorenz1-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
2017-04-28[index] Handle vector types in USR generatorAlex Lorenz1-1/+7
rdar://25339187 llvm-svn: 301635
2017-04-27[index] Mark the ObjC implicit accessor method definitions as 'dynamic' as wellArgyrios Kyrtzidis1-4/+4
llvm-svn: 301548
2017-04-25[index] Index type source info for class specializationsAlex Lorenz1-0/+3
rdar://31758344 llvm-svn: 301315
2017-04-25[index] Record the 'SpecializationOf' relation for function specializationsAlex Lorenz1-0/+4
rdar://31603531 llvm-svn: 301310
2017-04-24[index] If the 'external_source_symbol' attribute indicates 'Swift' as the ↵Argyrios Kyrtzidis1-0/+15
language then report it accordingly llvm-svn: 301183
2017-04-24[index] The relation between the declarations in template specializationsAlex Lorenz3-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
2017-04-21[index] Take into account the category's external_symbol attr for ↵Argyrios Kyrtzidis1-19/+45
namespacing its methods llvm-svn: 301051
2017-04-21[index] Take advantage of 'external_source_symbol' attribute for indexing ↵Argyrios Kyrtzidis5-42/+108
purposes - Ignore decls marked as 'generated_declaration' - Include the 'defined_in' in the USR for additional namespacing llvm-svn: 300949
2017-04-21[index] For 'transparent' tag typedefs, ignore their tag referenceArgyrios Kyrtzidis1-2/+3
llvm-svn: 300948
2017-04-20Delete unused IncompleteFormat variable, NFCi.Krasimir Georgiev1-3/+1
llvm-svn: 300841
2017-04-20[index] Record class template specializations using a new 'SpecializationOf'Alex Lorenz5-5/+20
relationship rdar://31603531 Differential Revision: https://reviews.llvm.org/D32010 llvm-svn: 300832
2017-03-24Fix MSVC 'not all control paths return a value' warning.Simon Pilgrim1-0/+1
llvm-svn: 298712
2017-03-23[index] When indexing system headers make sure to report important reference ↵Argyrios Kyrtzidis2-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
2017-03-21[index/AST] Determine if a typedef shares a name and spelling location with ↵Argyrios Kyrtzidis2-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
2017-03-17[index] For C++ constructors/destructors, add references to the parent type ↵Argyrios Kyrtzidis2-1/+10
where its name appears in definitions and declarations Patch by Nathan Hawes! https://reviews.llvm.org/D30730 llvm-svn: 298170
2017-03-16[index/AST] Add references for ObjC getter=/setter= property attributes and ↵Argyrios Kyrtzidis2-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
2017-03-07[index] Mark categories of test classes with the 'UnitTest' symbol property ↵Argyrios Kyrtzidis1-1/+9
as well. llvm-svn: 297133
2017-03-04[index] C++: Improve handling of typedefs as base names in C++ class ↵Argyrios Kyrtzidis1-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
2017-03-04[index] ObjC: Improve handling of typedefs as base names in ObjC interface ↵Argyrios Kyrtzidis1-8/+27
declarations - Report the typedef reference occurrence - Mark super or protocol references as 'implicit' when they come from a typedef. llvm-svn: 296974
2017-03-01[clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev1-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
2017-02-26[index] Add 'Parameter' symbol kind and 'Local' symbol property to ↵Argyrios Kyrtzidis5-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
2017-02-17[index] Improvde how we handle synthesized ObjC properties and the ↵Argyrios Kyrtzidis2-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
2017-02-16[OpenCL] Correct ndrange_t implementationAnastasia Stulova1-1/+0
Removed ndrange_t as Clang builtin type and added as a struct type in the OpenCL header. Use type name to do the Sema checking in enqueue_kernel and modify IR generation accordingly. Review: D28058 Patch by Dmitry Borisenkov! llvm-svn: 295311
2017-02-15[index] USR generation: use getTemplateArgs() instead of ↵Argyrios Kyrtzidis1-2/+2
getTemplateInstantiationArgs() Otherwise we may end up creating a different USR for the definition of a function, vs its declaration. llvm-svn: 295191
2017-02-02[index] Provide a more general index::generateUSRForMacro() that doesn't ↵Argyrios Kyrtzidis1-3/+12
depend on having a PreprocessingRecord. llvm-svn: 293904