summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [OpenCL] Correct ndrange_t implementationAnastasia Stulova2017-02-161-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
* [index] USR generation: use getTemplateArgs() instead of ↵Argyrios Kyrtzidis2017-02-151-2/+2
| | | | | | | | getTemplateInstantiationArgs() Otherwise we may end up creating a different USR for the definition of a function, vs its declaration. llvm-svn: 295191
* [index] Provide a more general index::generateUSRForMacro() that doesn't ↵Argyrios Kyrtzidis2017-02-021-3/+12
| | | | | | depend on having a PreprocessingRecord. llvm-svn: 293904
* [index] CMake: add missing reference to clangSerialization library.Argyrios Kyrtzidis2017-01-301-0/+1
| | | | llvm-svn: 293463
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-0/+17
| | | | | | | | their input files. This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. llvm-svn: 293461
* [index] When indexing an ObjC method declaration use its base name for the ↵Argyrios Kyrtzidis2017-01-261-1/+7
| | | | | | | | | location. Instead of using the location of the beginning '-'/'+'. This is consistent with location used for function decls and ObjC method calls where we use the base name as the location as well. llvm-svn: 293134
* [index] Introduce symbol subkinds to mark an accessor getter or setter.Argyrios Kyrtzidis2017-01-111-2/+12
| | | | llvm-svn: 291707
* [index] Ignore invalid ObjC categories.Argyrios Kyrtzidis2017-01-111-5/+6
| | | | | | We currently are unable to get a USR for those and it doesn't seem useful to try to index them. llvm-svn: 291705
* [index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction and ↵Argyrios Kyrtzidis2017-01-115-15/+40
| | | | | | properties with IBOutletCollection. llvm-svn: 291703
* [index] Add 'contained-by' relation between references and their lexical ↵Argyrios Kyrtzidis2017-01-112-2/+9
| | | | | | container. llvm-svn: 291700
* [index] Introduce SymbolSubKind for reporting language-specific details.Argyrios Kyrtzidis2017-01-081-1/+17
| | | | | | Initially reports if a constructor symbol is a copy or move constructor. llvm-svn: 291409
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-111-50/+50
| | | | | | This better reflects what it represents. llvm-svn: 286680
* [index] Add SymbolSubKind for the GKInspectable annotation.Argyrios Kyrtzidis2016-11-101-0/+6
| | | | llvm-svn: 286518
* Remove FormatContext from libClang as it is now unused.Daniel Jasper2016-11-081-24/+5
| | | | llvm-svn: 286279
* Revert "Remove now unnecessary FormatRewriterContext."Daniel Jasper2016-11-081-0/+2
| | | | | | | This reverts commit r286262. I accidentally committed it without all of the changes. llvm-svn: 286264
* Remove now unnecessary FormatRewriterContext.Daniel Jasper2016-11-081-2/+0
| | | | llvm-svn: 286262
* [clang-format] Remove (SourceManager, FileID) variantsDaniel Jasper2016-11-081-13/+13
| | | | | | | | | | | | | In Format, remove the reformat() and clean() functions taking a SourceManager and a FileID. Keep the versions taking StringRef Code. - there was duplicated functionality - the FileID versions were harder to use - the clean() version is dead code anyways Patch by Krasimir Georgiev. Thank you. llvm-svn: 286243
* [index] Handle properly C++14's template variables.Argyrios Kyrtzidis2016-11-073-14/+45
| | | | | | | | | - 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-2/+7
| | | | llvm-svn: 286153
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-022-13/+8
| | | | | | | | | | | 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] Avoid using a RecursiveASTVisitor for SyntacticFormIndexer and ↵Argyrios Kyrtzidis2016-11-011-43/+14
| | | | | | | | iterate the DesignatedInitExprs of the InitListExpr directly. This is more efficient, as per feedback by Richard. llvm-svn: 285666
* [index] Fix repeated visitation of the same InitListExpr for indexing.Argyrios Kyrtzidis2016-10-311-0/+17
| | | | | | | | It was visited multiple times unnecessarily. rdar://28985038 llvm-svn: 285647
* [index] Fixes for locations and relations in Objective C categories and ↵Argyrios Kyrtzidis2016-10-252-9/+41
| | | | | | | | | | | getters/setters - Add entries for protocols on categories - Add relation between categories and class they extend - Add relation between getters/setters and their corresponding property - Use category name location as the location of category decls/defs if it has one llvm-svn: 285120
* Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture().Martin Bohme2016-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: rL277342 made RecursiveASTVisitor visit lambda capture initialization expressions (these are the Exprs in LambdaExpr::capture_inits()). jdennett identified two issues with rL277342 (see comments there for details): - It visits initialization expressions for implicit lambda captures, even if shouldVisitImplicitCode() returns false. - It visits initialization expressions for init captures twice (because these were already traveresed in TraverseLambdaCapture() before rL277342) This patch fixes these issues and moves the code for traversing initialization expressions into TraverseLambdaCapture(). This patch also makes two changes required for the tests: - It adds Lang_CXX14 to the Language enum in TestVisitor. - It adds a parameter to ExpectedLocationVisitor::ExpectMatch() that specifies the number of times a match is expected to be seen. Reviewers: klimek, jdennett, alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23204 llvm-svn: 278933
* [index] Fix crash with indexing designated init expressions inside templates.Argyrios Kyrtzidis2016-08-031-1/+1
| | | | | | rdar://27452869 llvm-svn: 277570
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* [index] Create different USR if a property is a class property.Argyrios Kyrtzidis2016-07-151-5/+6
| | | | | | Avoids USR conflicts between class & instance properties of the same name. llvm-svn: 275630
* [index] Index system ImportDecls even when there is a DeclarationsOnly filterBen Langmuir2016-07-141-2/+2
| | | | | | | | | | | | Whether we call an ImportDecl a decl or a reference symbol role is somewhat academic, but in practice it's more like a declaration because it is interesting even to consumers who wouldn't care about references. Most importantly, we want to report the module dependencies of system modules even when we have declaration-only filtering. rdar://problem/27134855 llvm-svn: 275454
* Use more ArrayRefsDavid Majnemer2016-06-242-3/+3
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* Use ranges to concisely express iterationDavid Majnemer2016-06-231-12/+7
| | | | | | | No functional change is intended, this should just clean things up a little. llvm-svn: 273522
OpenPOWER on IntegriCloud