summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
* Revert r145244. It causes us to create broken ASTs with missing type informationRichard Smith2011-11-292-0/+4
| | | | | | | | | | for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts llvm-svn: 145447
* [libclang] Make the test portable.Argyrios Kyrtzidis2011-11-291-1/+1
| | | | llvm-svn: 145377
* [libclang] Make clang_findReferencesInFile also work on macros (find all ↵Argyrios Kyrtzidis2011-11-291-0/+12
| | | | | | | | | | | | | expansions/definition of a macro in a file). As a bonus, also make searching for declarations more efficient by ignoring preprocessing entities when we know that we are looking for a declaration. Fixes rdar://10427411. llvm-svn: 145369
* Removed useless ImplicitCast nodes in explicit cstyle and static castsNicola Gigante2011-11-282-4/+0
| | | | llvm-svn: 145244
* [PCH] Check for isTopLevelDeclInObjCContainer when picking abbreviations.Argyrios Kyrtzidis2011-11-232-3/+5
| | | | llvm-svn: 145110
* [libclang] Fix operations (token annotation, getting cursor, etc.) with a ↵Argyrios Kyrtzidis2011-11-232-0/+40
| | | | | | | | | | | | | | | file region inside an objc container that "contains" other file-level declarations. When getting the array of file-level declarations that overlap with a file region, we failed to report that the region overlaps with an objc container, if the container had other file-level declarations declared lexically inside it. Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST and handling them appropriately. llvm-svn: 145109
* [libclang] Make clang_annotateTokens use "file-targeted" deserialization and ↵Argyrios Kyrtzidis2011-11-161-0/+99
| | | | | | | | avoid unnecessary deserializations. llvm-svn: 144792
* [libclang] Make clang_findReferencesInFile use "file-targeted" ↵Argyrios Kyrtzidis2011-11-161-0/+59
| | | | | | | | deserialization and avoid unnecessary deserializations. llvm-svn: 144791
* [libclang] Fix crash on invalid code. Fixes rdar://10451854Argyrios Kyrtzidis2011-11-161-0/+15
| | | | llvm-svn: 144766
* [libclang] In lazyCreateDiags, recreate the diagnostic set if the number of ↵Argyrios Kyrtzidis2011-11-161-0/+13
| | | | | | | | diagnostics in the ASTUnit changed. llvm-svn: 144762
* [PCH] When chaining a PCH and serializing HeaderSearch, make sure the ↵Argyrios Kyrtzidis2011-11-134-0/+23
| | | | | | | | | HeaderFileInfos from the primary PCH is deserialized, otherwise we lose info that headers were already #imported/#included. llvm-svn: 144510
* Introduce proper spacing after the Objective-C parameter qualifiersDouglas Gregor2011-11-091-1/+1
| | | | | | (bycopy, inout, etc.). Fixes <rdar://problem/10402900>. llvm-svn: 144157
* [PCH] Fix reading from PCH of diagnostic pragmas.Argyrios Kyrtzidis2011-11-092-1/+4
| | | | | | | | | | | In certain cases ASTReader would call the normal DiagnosticsEngine API to initialize the state of diagnostic pragmas but DiagnosticsEngine would try to compare source locations leading to crash because the main FileID was not yet initialized. Yet another case of the ASTReader trying to use the normal APIs and inadvertently breaking invariants. Fix this by having the ASTReader set up the internal state directly. llvm-svn: 144153
* Add missing part of testDouglas Gregor2011-11-071-0/+14
| | | | llvm-svn: 143985
* ASTConsumer::handleTopLevelDecl will end up getting called forDouglas Gregor2011-11-071-0/+7
| | | | | | function template instantiations. Fixes <rdar://problem/10398005> / PR11312. llvm-svn: 143984
* [libclang] Fix crash when a #pragma diagnostic is included in the preamble.Argyrios Kyrtzidis2011-11-031-4/+9
| | | | | | | | | | | A PCH file keeps track of #pragma diagnostics state; when loading the preamble, they conflicted with the #pragma diagnostic state already present in the DiagnosticsEngine object due to parsing the preamble. Fix this by clearing the state of the DiagnosticsEngine object. Fixes rdar://10363572 && http://llvm.org/PR11254. llvm-svn: 143644
* Force test to use the non-fragile ABIDouglas Gregor2011-11-031-4/+4
| | | | llvm-svn: 143642
* [libclang] Make sure pointing inside the #include of the fields will return ↵Argyrios Kyrtzidis2011-11-031-0/+7
| | | | | | the struct. llvm-svn: 143638
* [libclang] Add a test for "targeting" a field inside an #include that onlyArgyrios Kyrtzidis2011-11-031-0/+6
| | | | | | contains fields. llvm-svn: 143636
* Extend IsSimplyAccessible to check for Objective-C instance variableDouglas Gregor2011-11-031-0/+69
| | | | | | accessibility. Fixes <rdar://problem/3727335>. llvm-svn: 143635
* [libclang] Add infrastructure to be able to only deserialize decls in a file ↵Argyrios Kyrtzidis2011-11-035-0/+83
| | | | | | | | region and use it for clang_getCursor. llvm-svn: 143605
* Add a printing policy flag to suppress printing "<anonymous>::" priorDouglas Gregor2011-11-031-4/+6
| | | | | | | | | to types. Enable this flag for code completion, where knowing whether something is in an anonymous or inline namespace is actually not useful, since you don't have to type it anyway. Fixes <rdar://problem/10208818>. llvm-svn: 143599
* Test code completion for constructor initializers within the classDouglas Gregor2011-11-021-0/+18
| | | | | | definition. This already worked; <rdar://problem/10208871>. llvm-svn: 143595
* [libclang] Fix non-darwin buildbots.Argyrios Kyrtzidis2011-11-011-1/+2
| | | | llvm-svn: 143477
* [libclang] For a class extension, give it a unique USR but for any property ↵Argyrios Kyrtzidis2011-11-011-2/+16
| | | | | | | | | | or ivar it contains give it a USR based on its semantic context, which is the interface. This follows what we already did for objc methods. rdar://10371669 llvm-svn: 143464
* Mark these tests as requiring use of the shell.Ted Kremenek2011-10-272-0/+2
| | | | llvm-svn: 143150
* Move ASTUnit's handling of temporary files and the preamble file into a ↵Ted Kremenek2011-10-272-2/+2
| | | | | | lazily-created static DenseMap. This DenseMap is cleared (and the files erased) via an atexit routine in the case an ASTUnit is not destroyed. Fixes <rdar://problem/10293367>. llvm-svn: 143115
* Disalbe more Microsoft-specific stuff.Douglas Gregor2011-10-261-1/+1
| | | | llvm-svn: 143077
* Try to appease the Windows buildersDouglas Gregor2011-10-261-1/+1
| | | | llvm-svn: 143048
* Eliminate a hang while loading a sequence of redeclarable entities. InDouglas Gregor2011-10-262-0/+42
| | | | | | | | | | | essence, the redeclaration chain for a class could end up in an inconsistent state while deserializing multiple declarations in that chain, where the circular linked list was not, in fact, circular. Since only two redeclarations of the same entity will get loaded when we're in this state, restore circularity when both have been loaded. Fixes <rdar://problem/10324940> / PR11195. llvm-svn: 143037
* Turn off delayed template parsing for this testDouglas Gregor2011-10-251-1/+1
| | | | llvm-svn: 142951
* Implement support for dependent Microsoft __if_exists/__if_not_existsDouglas Gregor2011-10-251-0/+24
| | | | | | | | | | statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". llvm-svn: 142901
* Tweak this test to test more directly what we want, and hopefully work ↵Douglas Gregor2011-10-191-2/+10
| | | | | | around the brokenness of code completion under -fdelayed-template-parsing llvm-svn: 142472
* Minor tweak to testDouglas Gregor2011-10-181-1/+1
| | | | llvm-svn: 142427
* Provide result types for code completions that describe built-inDouglas Gregor2011-10-187-21/+24
| | | | | | expressions (this, sizeof, etc.). llvm-svn: 142424
* [libclang] Since an objc extension semantically continues the interface of ↵Argyrios Kyrtzidis2011-10-181-2/+2
| | | | | | | | | the class don't use unique USRs for them, otherwise we fail to associate @implementation methods with the methods in extensions. llvm-svn: 142361
* Add code completions for C++0x expressionsDouglas Gregor2011-10-181-2/+5
| | | | llvm-svn: 142357
* Don't format the code completion for parameters of block literalDouglas Gregor2011-10-181-2/+13
| | | | | | | arguments as block literal arguments; the block literal argument code completion should only go one level deep. Fixes <rdar://problem/10291294>. llvm-svn: 142335
* Fixed merge-mistake where ActOnAccessSpecifier was called twice for every ↵Erik Verbruggen2011-10-171-14/+14
| | | | | | access specifier. The testcase has been changed to catch this too. llvm-svn: 142186
* Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations toErik Verbruggen2011-10-141-0/+23
| | | | | | retrieve annotations from completion string. llvm-svn: 141953
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-133-4/+4
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Allow for annotate attributes after access specifiers. When suchErik Verbruggen2011-10-131-0/+33
| | | | | | attributes are found, propagate them to subsequent declarations. llvm-svn: 141861
* Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ ↵Douglas Gregor2011-10-101-0/+20
| | | | | | class member. Fixes PR11108. llvm-svn: 141600
* Added CXAvailability_NotAccessible to indicate that a declaration is ↵Erik Verbruggen2011-10-061-0/+89
| | | | | | available, but not accessible from the current code completion context. llvm-svn: 141278
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-063-0/+248
| | | | | | | | and a callback and finds all identifier references of the cursor in the file. rdar://7948304 llvm-svn: 141277
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-0525-1759/+1753
| | | | | | from Manuel Holtgrewe! llvm-svn: 141200
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-046-49/+49
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* Propagate __attribute__((returns_twice)) from C to IL.Rafael Espindola2011-10-031-14/+14
| | | | llvm-svn: 141002
* Sorry, I misunderstood the interaction here; the GNU runtime doesJohn McCall2011-10-021-5/+3
| | | | | | | | | support both a fragile and non-fragile ABI, and it can be selected at runtime. That driver option also works on Darwin (although obviously the code is not necessarily usable if the system runtime is fragile) so just do that. llvm-svn: 140973
* Use -fgnu-runtime to force the use of the non-fragile ABI;John McCall2011-10-021-6/+5
| | | | | | | otherwise these tests would fail on hosts that happen to default to that, since that affects whether default synthesis can happen. llvm-svn: 140970
OpenPOWER on IntegriCloud