summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [index] Handle vector types in USR generatorAlex Lorenz2017-04-281-0/+11
| | | | | | rdar://25339187 llvm-svn: 301635
* clang/test/Index/index-module.m: Relax expressions to satisfy DOSish path ↵NAKAMURA Takumi2017-04-281-1/+1
| | | | | | separator \\, since r301597. llvm-svn: 301613
* [libclang] Enhance clang_Cursor_isDynamicCall and ↵Argyrios Kyrtzidis2017-04-271-1/+11
| | | | | | | | clang_Cursor_getReceiverType to handle ObjC property references Also enhance clang_Cursor_getReceiverType to handle C++ method calls. llvm-svn: 301568
* [index] Mark the ObjC implicit accessor method definitions as 'dynamic' as wellArgyrios Kyrtzidis2017-04-271-12/+12
| | | | llvm-svn: 301548
* [libclang] Pass in the -fallow-editor-placeholders optionAlex Lorenz2017-04-271-0/+5
| | | | | | | | This will suppress any live diagnostics caused by editor placeholders in Xcode. rdar://31833579 llvm-svn: 301542
* [libclang] Check for a record declaration before a template specializationAlex Lorenz2017-04-251-1/+7
| | | | | | | | | | Fixes PR32539. Patch by Emilio Cobos Álvarez! Differential Revision: https://reviews.llvm.org/D32348 llvm-svn: 301328
* [index] Index type source info for class specializationsAlex Lorenz2017-04-252-0/+34
| | | | | | 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
* [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] Take into account the category's external_symbol attr for ↵Argyrios Kyrtzidis2017-04-211-4/+16
| | | | | | namespacing its methods llvm-svn: 301051
* [index] Take advantage of 'external_source_symbol' attribute for indexing ↵Argyrios Kyrtzidis2017-04-211-0/+88
| | | | | | | | | 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-1/+2
| | | | llvm-svn: 300948
* [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
* Do not run tests for crash recovery if libstdc++ safe mode is enabledSerge Pavlov2017-04-154-1/+5
| | | | | | | | | | | | | | | | | | If expensive checks are enabled, safe mode of libstdc++ is enabled too. In this mode the library uses more complex data that allow additional checks, for instance, a container may keep list of iterators that points to it. If a code crashes it can leave these complex library objects in inconsistent state. It occurs in a few tests that check error recovery if compiler crashes. These test hang in expensive check mode, as the library tries to synchronize access to the iterators pointing to some container, but corresponding mutex remains locked after the crash. This fix marks these tests as unsupported if clang is built with libstdc++ safe mode enabled. Differential Revision: https://reviews.llvm.org/D31126 llvm-svn: 300392
* [ASTPrinter] Print nested name specifiers for out-of-line functionsAlex Lorenz2017-04-112-5/+5
| | | | | | rdar://31501863 llvm-svn: 299962
* [index] When indexing system headers make sure to report important reference ↵Argyrios Kyrtzidis2017-03-232-0/+39
| | | | | | | | | | 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-0/+69
| | | | | | | | | | 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-171-3/+20
| | | | | | | | | 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-161-17/+57
| | | | | | | | | | | 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
* [CodeCompletion] Format block parameter placeholders in implicit propertyAlex Lorenz2017-03-131-2/+8
| | | | | | | | setters using the block type information that's obtained from the property rdar://12604235 llvm-svn: 297628
* Print nested name specifiers for typedefs and type aliasesAlex Lorenz2017-03-104-92/+94
| | | | | | | | | | | | Printing typedefs or type aliases using clang_getTypeSpelling() is missing the namespace they are defined in. This is in contrast to other types that always yield the full typename including namespaces. Patch by Michael Reiher! Differential Revision: https://reviews.llvm.org/D29944 llvm-svn: 297465
* [index] Mark categories of test classes with the 'UnitTest' symbol property ↵Argyrios Kyrtzidis2017-03-071-2/+2
| | | | | | as well. llvm-svn: 297133
* [AST/ObjC] Make ObjCCategoryImplDecl consistent with ObjCCategoryDecl and ↵Argyrios Kyrtzidis2017-03-072-2/+2
| | | | | | | | use the category name as its DeclName This also addresses the badness in ObjCCategoryImplDecl's API, which was hiding NamedDecl's APIs with different meaning. llvm-svn: 297131
* [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] ObjC: Improve handling of typedefs as base names in ObjC interface ↵Argyrios Kyrtzidis2017-03-041-6/+13
| | | | | | | | | declarations - Report the typedef reference occurrence - Mark super or protocol references as 'implicit' when they come from a typedef. llvm-svn: 296974
* [GeneratePCHAction] If preprocessor option 'AllowPCHWithCompilerErrors' is ↵Argyrios Kyrtzidis2017-02-271-2/+5
| | | | | | enabled, don't delete the produced PCH file if error diagnostics occurred. llvm-svn: 296320
* Add a cc1 flag for setting the existing Preprocessor option ↵Argyrios Kyrtzidis2017-02-271-3/+5
| | | | | | 'AllowPCHWithCompilerErrors'. llvm-svn: 296306
* [index] Add 'Parameter' symbol kind and 'Local' symbol property to ↵Argyrios Kyrtzidis2017-02-261-6/+37
| | | | | | | | | | | | 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
* [test] Disable test/Index/pch-from-libclang.c for non-darwin systems.Argyrios Kyrtzidis2017-02-251-0/+4
| | | | llvm-svn: 296267
* [test] Use cc1 -triple for test/Index/pch-from-libclang.c.Argyrios Kyrtzidis2017-02-251-2/+2
| | | | | | Note quite sure why driver -target has no effect. llvm-svn: 296265
* [test] Add target to test/Index/pch-from-libclang.c.Argyrios Kyrtzidis2017-02-251-2/+2
| | | | | | Attempt to fix the failing bots. llvm-svn: 296263
* [driver] Pass a resource dir without the '/../' part.Argyrios Kyrtzidis2017-02-251-0/+18
| | | | | | | This get the resource dir string to match with the one from libclang (which is not adding '/../'), and allows clang to accept a modules-enabled PCH that was created by libclang. llvm-svn: 296262
* [index] Improvde how we handle synthesized ObjC properties and the ↵Argyrios Kyrtzidis2017-02-173-12/+100
| | | | | | | | | | | | 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
* [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
* [Test] Make Lit tests C++11 compatible - nounwind noexceptCharles Li2017-02-131-1/+7
| | | | | | | | C++11 destructors are nothrow by default. Differential Revision: https://reviews.llvm.org/D29859 llvm-svn: 294972
* [ASTUnit] Clear out diagnostic state after creating the preamble.Benjamin Kramer2017-02-131-0/+5
| | | | | | | | If the preamble had diagnostic state this would leave behind invalid state in the DiagnosticsEngine and crash later. The test case runs into an assertion in DiagnosticsEngine::setSourceManager. llvm-svn: 294963
* [libclang] [OpenCL] Expose half type.Joey Gouly2017-02-101-0/+24
| | | | | | | | | | | | | | | | Expose the half type (fp16) through libclang and the python bindings. It seems CXType_LastBuiltin was not updated in b2ea6d9 ("Enable support for __float128 in Clang", 2016-04-13), so update it now. Add an Index test for OpenCL types; in the future we will add other OpenCL types such as images to this test. Patch by Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D29718 llvm-svn: 294754
* Fix Index test after recent clang-format change.Daniel Jasper2017-02-011-2/+2
| | | | llvm-svn: 293754
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-1/+7
| | | | | | | | 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
* [c-index-test] Provide capability for 'c-index-test core' to dump symbol ↵Argyrios Kyrtzidis2017-01-291-0/+13
| | | | | | information from a PCH/module file. llvm-svn: 293416
* [index] When indexing an ObjC method declaration use its base name for the ↵Argyrios Kyrtzidis2017-01-264-15/+15
| | | | | | | | | 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
* [CodeCompletion] Ensure that ObjC root class completes instanceAlex Lorenz2017-01-241-0/+51
| | | | | | | | | | | | | | | methods from protocols and categories as well Code completion results for class methods already include instance methods from Objective-C root classes. This commit ensures that the results also include instance methods from protocols that the root class implements and root class categories as well. rdar://28012953 Differential Revision: https://reviews.llvm.org/D27257 llvm-svn: 292932
* [Sema] UsingShadowDecl shouldn't be hidden by the UsingDecl that owns itAlex Lorenz2017-01-231-0/+25
| | | | | | | | rdar://23454249 Differential Revision: https://reviews.llvm.org/D28514 llvm-svn: 292805
* PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).Richard Smith2017-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Under this defect resolution, the injected-class-name of a class or class template cannot be used except in very limited circumstances (when declaring a constructor, in a nested-name-specifier, in a base-specifier, or in an elaborated-type-specifier). This is apparently done to make parsing easier, but it's a pain for us since we don't know whether a template-id using the injected-class-name is valid at the point when we annotate it (we don't yet know whether the template-id will become part of an elaborated-type-specifier). As a tentative resolution to a perceived language defect, mem-initializer-ids are added to the list of exceptions here (they generally follow the same rules as base-specifiers). When the reference to the injected-class-name uses the 'typename' or 'template' keywords, we permit it to be used to name a type or template as an extension; other compilers also accept some cases in this area. There are also a couple of corner cases with dependent template names that we do not yet diagnose, but which will also get this treatment. llvm-svn: 292518
* Fix test failures after recent clang-format format change.Daniel Jasper2017-01-161-2/+2
| | | | llvm-svn: 292116
* [index] Introduce symbol subkinds to mark an accessor getter or setter.Argyrios Kyrtzidis2017-01-112-7/+7
| | | | llvm-svn: 291707
* [index] Ignore invalid ObjC categories.Argyrios Kyrtzidis2017-01-111-1/+1
| | | | | | 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-111-0/+13
| | | | | | properties with IBOutletCollection. llvm-svn: 291703
* [index] Add 'contained-by' relation between references and their lexical ↵Argyrios Kyrtzidis2017-01-115-39/+59
| | | | | | container. llvm-svn: 291700
OpenPOWER on IntegriCloud