summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
* [ObjC] Add NSValue support for objc_boxed_expressionsAlex Denisov2015-06-261-32/+49
| | | | | | | | | | | | | Patch extends ObjCBoxedExpr to accept records (structs and unions): typedef struct __attribute__((objc_boxable)) _Color { int r, g, b; } Color; Color color; NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)]; llvm-svn: 240761
* Replace __double_underscored type nullability qualifiers with ↵Douglas Gregor2015-06-242-3/+3
| | | | | | | | | | | | | | | | _Uppercase_underscored Addresses a conflict with glibc's __nonnull macro by renaming the type nullability qualifiers as follows: __nonnull -> _Nonnull __nullable -> _Nullable __null_unspecified -> _Null_unspecified This is the major part of rdar://problem/21530726, but does not yet provide the Darwin-specific behavior for the old names. llvm-svn: 240596
* Code completion for nullability type specifiers.Douglas Gregor2015-06-194-0/+38
| | | | | | Another part of rdar://problem/18868820. llvm-svn: 240159
* Extend type nullability qualifiers for Objective-C.Douglas Gregor2015-06-191-4/+4
| | | | | | | | | | | | | | | Introduce context-sensitive, non-underscored nullability specifiers (nonnull, nullable, null_unspecified) for Objective-C method return types, method parameter types, and properties. Introduce Objective-C-specific semantics, including computation of the nullability of the result of a message send, merging of nullability information from the @interface of a class into its @implementation, etc . This is the Objective-C part of rdar://problem/18868820. llvm-svn: 240154
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-161-4/+4
| | | | llvm-svn: 239791
* [modules] Move implicit creation of ImportDecls for #includes transformed ↵Richard Smith2015-05-182-4/+4
| | | | | | into module imports from the frontend into Sema where it belongs. llvm-svn: 237555
* [modules] Refactor and simplify #include handling.Richard Smith2015-05-181-4/+0
| | | | | | | Fix a tiny bug where we'd try to load a module file for the module we're in the middle of building. llvm-svn: 237552
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-291-1/+1
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* [libclang] Add functions to get information about fields.Argyrios Kyrtzidis2015-04-132-5/+7
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 234762
* [libclang] Fix crash when code-completing inside constructor initializer for ↵Argyrios Kyrtzidis2015-03-131-0/+14
| | | | | | | | a builtin type. rdar://20149746 llvm-svn: 232145
* [libclang] During member ref expression visitation, ignore base anonymous ↵Argyrios Kyrtzidis2015-03-132-1/+29
| | | | | | | | | | struct/union fields. Otherwise they will shadow the real field that that we are interested in. rdar://19783938 llvm-svn: 232141
* [ASTUnit] Fix crash when trying to load a module file via ↵Argyrios Kyrtzidis2015-03-031-0/+5
| | | | | | | | ASTUnit::LoadFromASTFile. rdar://19997358 llvm-svn: 231060
* Add -frtti/-fexceptions to some more tests that assume they're onFilipe Cabecinhas2015-02-261-1/+1
| | | | llvm-svn: 230656
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-255-5/+2
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-255-2/+5
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* This reverts commit r227432, r227438 and r227448.Rafael Espindola2015-01-292-6/+4
| | | | | | | | | | | | | | | | | | | | | | | It should bring the bots back. Original messagses: r227448: Remove unnecessary default. r227438: Fix Index/print-type.cpp test following r227432. r227432: libclang: Add three functions useful for dealing with anonymous fields: clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet llvm-svn: 227472
* Fix Index/print-type.cpp test following r227432.Francois Pichet2015-01-291-1/+1
| | | | llvm-svn: 227438
* libclang: Add three functions useful for dealing with anonymous fields:Francois Pichet2015-01-292-4/+6
| | | | | | | | | | | clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet llvm-svn: 227432
* Improves overload completion result chunks.Francisco Lopes da Silva2015-01-286-73/+148
| | | | | | | | | | | | | | | | | | | | | The code building the code completion string for overloads was providing less detail compared to the one building completion strings for function declarations. There was no information about optionals and no information about what's a parameter and what's a function identifier, everything besides ResultType, CurrentParameter and special characters was classified as Text. This makes code completion strings for overload candidates to follow a pattern very similar, but not identical, to the one in use for function declarations: - return type chunk: ResultType - function identifier chunk: Text - parameter chunks: Placeholder - optional parameter chunks: Optional - current parameter chunk: CurrentParameter llvm-svn: 227309
* Sema: require a complete type before lookup.Francisco Lopes da Silva2015-01-251-12/+28
| | | | llvm-svn: 227037
* Add tests for code completion of variadic prototypesFrancisco Lopes da Silva2015-01-231-2/+30
| | | | llvm-svn: 226924
* Sema: code completion for pointer and reference to functions.Francisco Lopes da Silva2015-01-221-0/+34
| | | | llvm-svn: 226865
* Initial support for C++ parameter completionFrancisco Lopes da Silva2015-01-215-11/+1117
| | | | | | | | | | | | | | | | | | | | The improved completion in call context now works with: - Functions. - Member functions. - Constructors. - New expressions. - Function call expressions. - Template variants of the previous. There are still rough edges to be fixed: - Provide support for optional parameters. (fix known) - Provide support for member initializers. (fix known) - Provide support for variadic template functions. (fix unknown) - Others? llvm-svn: 226670
* PR13699: Include friend declarations in code completion results if they had aRichard Smith2015-01-151-0/+33
| | | | | | | | | prior visible declaration. Prefer to take template parameter names from the first declaration. Testcase from a patch by Francisco Lopes! llvm-svn: 226083
* Teach compile_commands.json test that windows-gnu is the new name for mingw32.Yaron Keren2014-12-171-1/+1
| | | | llvm-svn: 224426
* clang/test/Index/usrs.cpp: Appease targeting msvc.NAKAMURA Takumi2014-12-081-1/+1
| | | | llvm-svn: 223649
* [libclang] Encode InjectedClassNameType in the USR.Argyrios Kyrtzidis2014-12-081-0/+7
| | | | llvm-svn: 223634
* [libclang] Encode location info for anonymous embedded tag decls.Argyrios Kyrtzidis2014-12-081-0/+6
| | | | | | Otherwise the USR will conflict with different embedded tag decls. llvm-svn: 223633
* [libclang] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-085-58/+58
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Encode C++11 rvalue reference types in the USR.Argyrios Kyrtzidis2014-12-081-0/+2
| | | | llvm-svn: 223631
* [libclang] Encode the C++11 method reference qualifier in the USR.Argyrios Kyrtzidis2014-12-081-0/+8
| | | | llvm-svn: 223630
* [libclang] Reflect in USR generation that 'signed char' and 'unsigned char' ↵Argyrios Kyrtzidis2014-12-081-0/+9
| | | | | | can overload a 'char' in C++, by giving them distinct encodings. llvm-svn: 223629
* [libclang] Function templates can be 'overloaded' by return type, so encode ↵Argyrios Kyrtzidis2014-12-085-21/+27
| | | | | | | | the return type in the USR and handle DependentNameType in order to be able to distinguish them. llvm-svn: 223628
* [libclang] Make sure to visit the body of a CXXForRangeStmt.Argyrios Kyrtzidis2014-11-131-2/+5
| | | | llvm-svn: 221881
* [liblang] Handle CXXForRangeStmt during AST visitation.Argyrios Kyrtzidis2014-11-131-0/+13
| | | | llvm-svn: 221874
* [libclang] When initializing an ObjC object via the "[[ClassName alloc] ↵Argyrios Kyrtzidis2014-11-101-0/+14
| | | | | | | | | | | | init*]" pattern, report the 'init*' invocation as non-dynamic via clang_Cursor_isDynamicCall. Of course it is dynamic at runtime, but for purposes of indexing we can treat as an invocation to ClassName's init*. Addresses rdar://18916871. llvm-svn: 221641
* clang-format: Fix tests after recent change to ObjC block formatting.Daniel Jasper2014-10-222-2/+2
| | | | llvm-svn: 220376
* [libclang] If the code-completion point is inside the preamble, adjust the ↵Argyrios Kyrtzidis2014-10-181-0/+4
| | | | | | | | | position at the beginning of the file after the preamble. Otherwise we will not hit the code-completion point. llvm-svn: 220136
* [libclang] Allow code-completion when pointing at the end-of-file.Argyrios Kyrtzidis2014-10-182-0/+8
| | | | llvm-svn: 220135
* Fix for PR21254 - Assertion in comment parserDario Domizioli2014-10-151-0/+295
| | | | | | | | | | | | | The size of the ID field in CommandInfo was narrow, leading to potential wrap-around of command IDs, causing misinterpretation later on. The patch does the following: - It extends the ID bitfield from 8 to 20 bits. - It provides a DRY definition of the number of bits for the field to avoid using literal numbers in different files. - It introduces a new assertion that checks for the wrap-around. - It adds the testcase from PR21254. llvm-svn: 219802
* Add libclang capabilities to retriete template arguments from specializations.Eli Bendersky2014-10-102-2/+12
| | | | | | | | | Includes Python bindings. Reviewed in http://reviews.llvm.org/D5621 Patch by Rob Springer llvm-svn: 219529
* Avoid a crash after loading an #undef'd macro in code completionBen Langmuir2014-09-303-0/+12
| | | | | | | | | | | In code-completion, don't assume there is a MacroInfo for everything, since we aren't serializing the def corresponding to a later #undef in the same module. Also setup the HadMacro bit correctly for undefs to avoid an assertion failure. rdar://18416901 llvm-svn: 218694
* Add ubsan/not_ubsan features to Clang lit tests and useAlexey Samsonov2014-09-033-2/+8
| | | | | | them to exclude tests with large stack usage from UBSan bootstrap. llvm-svn: 217064
* [libclang] Fixup the cursor spelling range for C++ destructors, operator ↵Argyrios Kyrtzidis2014-08-261-0/+115
| | | | | | | | overloads, and conversion functions. Patch by Craig Tenenbaum! llvm-svn: 216480
* Fix the rececl chain for redeclarations of predefined declsBen Langmuir2014-08-182-0/+12
| | | | | | | | | Predefined decls like 'Protocol' in objc are not loaded from AST files, so we cannot rely on loading the canonical decl to complete the redecl chain for redeclarations of these decls. The broken redecl chain was non-circular, so looping over redecls() would hang. llvm-svn: 215929
* clang/test/Index/index-module.m: Tweak expressions to meet dos path on win32.NAKAMURA Takumi2014-08-131-2/+2
| | | | llvm-svn: 215592
* Expose the CUDA shared attribute to the C API.Eli Bendersky2014-08-081-2/+5
| | | | | | | | Similar to r209767, which exposed other CUDA-related attributes. Patch by Rob Springer. llvm-svn: 215208
* Add IR Mangler for more stable mangling.Eli Bendersky2014-08-011-1/+8
| | | | llvm-svn: 214520
* Exposes a C API to name mangling for a given cursor.Eli Bendersky2014-07-311-0/+23
| | | | | | | | | Inspired by https://gist.github.com/tritao/2766291, and was previously discussed on cfe-dev: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html Adding testing capability via c-index-test. llvm-svn: 214410
* [test] Add '-target' option to fix bot failure.Argyrios Kyrtzidis2014-06-211-1/+1
| | | | llvm-svn: 211439
OpenPOWER on IntegriCloud