summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* Check that template template arguments match template template parametersRichard Smith2017-01-091-3/+3
| | | | | | | | | | | | | | | properly even when a non-type template parameter has a dependent type. Previously, if a non-type template parameter was dependent, but not dependent on an outer level of template parameter, we would not match the type of the parameter. Under [temp.arg.template], we are supposed to check that the types are equivalent, which means checking for syntactic equivalence in the dependent case. This also fixes some accepts-invalids when passing templates with auto-typed non-type template parameters as template template arguments. llvm-svn: 291512
* [index] Introduce SymbolSubKind for reporting language-specific details.Argyrios Kyrtzidis2017-01-081-0/+11
| | | | | | Initially reports if a constructor symbol is a copy or move constructor. llvm-svn: 291409
* [CodeCompletion] Block property setters: Use dynamic priority heuristicAlex Lorenz2017-01-062-11/+15
| | | | | | | | | | | | | | Now when completing blocks properties that return void the block call completion result shows up before the setter, otherwise the setter completion shows up before the block call completion. We normally want to use the result of the block call, so one typically wouldn't call a block that returns a non-void type in a standalone statement. rdar://28846153 Differential Revision: https://reviews.llvm.org/D26034 llvm-svn: 291232
* [CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializersAlex Lorenz2017-01-031-0/+43
| | | | | | | | | | with arguments rdar://21014571 Differential Revision: https://reviews.llvm.org/D27039 llvm-svn: 290879
* Fix for clang_Cursor_getSpellingNameRange()Kevin Funk2016-12-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes spelling name ranges for user-defined string literal operators. Example: constexpr int operator""_toint(unsigned long long val) { return int(val); } Before this patch the spelling name range on consisted of 'operator'. After this patch: 'operator""_toint'. Related to http://reviews.llvm.org/D5041, which fixes the function for other cursor kinds. Reviewers: akyrtzi, craigt, skalinichev, klimek, milianw, bkramer Subscribers: cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D18462 llvm-svn: 290172
* [libclang] Restore the CXXRecordDecl path for ↵Argyrios Kyrtzidis2016-12-162-5/+23
| | | | | | | | | clang_Type_getNumTemplateArguments and clang_Type_getTemplateArgumentAsType Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26907 llvm-svn: 289995
* [CodeCompletion][ObjC] Use a parameterized NSSet return type forAlex Lorenz2016-12-081-1/+1
| | | | | | | | keyPathsForValuesAffecting* KVO completion results rdar://23791701 llvm-svn: 289068
* [CodeCompletion] Provide Objective-C class property completion resultsAlex Lorenz2016-12-082-0/+97
| | | | | | | | | | | | This commit provides class property code completion results. It supports explicit and implicit class properties, but the special block completion is done only for explicit properties right now. rdar://25636195 Differential Revision: https://reviews.llvm.org/D27053 llvm-svn: 289058
* [libclang] Add APIs to check the result of an integer expression in ↵Argyrios Kyrtzidis2016-12-011-0/+14
| | | | | | | | | CXEvalResult without overflow Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26788 llvm-svn: 288438
* [CodeCompletion] Fix incorrect Objective-C block parameter formattingAlex Lorenz2016-11-231-0/+19
| | | | | | | | | | This commit fixes an incorrectly formatted Objective-C block parameter placeholder in a code completion result. The incorrect parameter had a redundant leading parenthesis. rdar://25224416 llvm-svn: 287771
* [libclang] Generalize clang_getNumTemplateArguments and ↵Argyrios Kyrtzidis2016-11-151-1/+10
| | | | | | | | | clang_getTemplateArgumentAsType to other kind of specializations. Patch by Emilio Cobos Álvarez! https://reviews.llvm.org/D26663 llvm-svn: 287024
* [index] Add SymbolSubKind for the GKInspectable annotation.Argyrios Kyrtzidis2016-11-101-0/+8
| | | | llvm-svn: 286518
* Make output of -ast-print a valid C++ code.Serge Pavlov2016-11-102-4/+4
| | | | | | | | | | | | | | | | | | Output generated by option -ast-print looks like C/C++ code, and it really is for plain C. For C++ the produced output was not valid C++ code, but the differences were small. With this change the output is fixed and can be compiled. Tests are changed so that output produced by -ast-print is compiled again with the same flags and both outputs are compared. Option -ast-print is extensively used in clang tests but it itself was tested poorly, existing tests only checked that compiler did not crash. There are unit tests in file DeclPrinterTest.cpp, but they test only terse output mode. Differential Revision: https://reviews.llvm.org/D26452 llvm-svn: 286439
* [libclang] Fix issue with clang_tokenize and make sure it interprets ↵Argyrios Kyrtzidis2016-11-091-0/+4
| | | | | | | | CXSourceRange as half-open character range. Patch provided by Emilio Cobos Álvarez! (https://reviews.llvm.org/D26446) llvm-svn: 286421
* [CodeCompletion] Show block invocation results for block property settersAlex Lorenz2016-11-092-3/+56
| | | | | | | | | | | | This commit changes the code completion results for block property setters: The default block property result is now a block invocation rather than a simple property reference. rdar://28846196 Differential Revision: https://reviews.llvm.org/D26071 llvm-svn: 286363
* [index] Fix issue with protocol name locations in conformance list of an ↵Argyrios Kyrtzidis2016-11-091-0/+20
| | | | | | | | | | | ObjC class when they come from a typedef. The ObjC class protocol list assumes there is an associated location for each protocol but no location is provided when the protocol list comes from a typedef, and we end up with a buffer overflow when trying to get locations for the protocol names. Fixes crash of rdar://28980278. llvm-svn: 286331
* [index] Handle properly C++14's template variables.Argyrios Kyrtzidis2016-11-071-1/+12
| | | | | | | | | - 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-1/+5
| | | | llvm-svn: 286153
* [test] Test that static_assert is properly visited in liblcangOlivier Goffart2016-11-041-0/+11
| | | | llvm-svn: 285994
* [index] Expose FriendDeclOlivier Goffart2016-11-041-5/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D26285 llvm-svn: 285984
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-021-0/+6
| | | | | | | | | | | 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] Fix repeated visitation of the same InitListExpr for indexing.Argyrios Kyrtzidis2016-10-311-0/+33
| | | | | | | | It was visited multiple times unnecessarily. rdar://28985038 llvm-svn: 285647
* Mark invalid RecordDecls as completed.Erik Verbruggen2016-10-272-0/+16
| | | | | | | | | | | | | | | Sema::ActOnTag creates TagDecls for records. However, if those record declarations are invalid, and the parser is in C++ mode, it would silently drop the TagDecl (and leave it as "beingDefined"). The problem is that other code (e.g. the ASTWriter) will serialize all types, and expects them to be complete. So, leaving them open would result in failing asserts. Fixes PR20320 Differential Revision: http://reviews.llvm.org/D21176 llvm-svn: 285275
* [index] Fixes for locations and relations in Objective C categories and ↵Argyrios Kyrtzidis2016-10-252-3/+31
| | | | | | | | | | | 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
* [CodeCompletion] Add a block property setter completion resultAlex Lorenz2016-10-181-0/+68
| | | | | | | | | | | | | | | | | | This commit changes code completion results for Objective-C block properties: clang now suggests an additional completion result that displays the block property together with '=' and the block literal placeholder for the appropriate readwrite block properties. This commit uses a simple heuristic to determine when it's appropriate to suggest a setter completion for block properties: the additional block setter completion is provided iff the member access that's being completed is a standalone statement. rdar://28481726 Differential Revision: https://reviews.llvm.org/D25520 llvm-svn: 284472
* [index] Fix crash with indexing designated init expressions inside templates.Argyrios Kyrtzidis2016-08-031-0/+12
| | | | | | rdar://27452869 llvm-svn: 277570
* Implement filtering for code completion of identifiers.Vassil Vassilev2016-07-275-10/+10
| | | | | | | | Patch by Cristina Cristescu and Axel Naumann! Agreed on post commit review (D17820). llvm-svn: 276878
* [index] Create different USR if a property is a class property.Argyrios Kyrtzidis2016-07-151-0/+2
| | | | | | Avoids USR conflicts between class & instance properties of the same name. llvm-svn: 275630
* Remove the new module cache from the index-module testBen Langmuir2016-07-141-1/+1
| | | | | | | Forgot to add the new cache to the `rm -rf` line. This broke some bots when trying to load a module built with an older compiler. llvm-svn: 275496
* Attempt to workaround Windows bots after my previous commitBen Langmuir2016-07-141-2/+3
| | | | | | | | | For some reason it seems the second invocation is getting DMOD_OTHER_H set to a path with/forward/slashes, but one of the use sites has\back\slashes. There should be no difference with what was already there, but for now try to avoid checking those paths. llvm-svn: 275464
* [index] Index system ImportDecls even when there is a DeclarationsOnly filterBen Langmuir2016-07-142-4/+8
| | | | | | | | | | | | 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
* [test] Add 'env' to fix test failures in windows bots.Argyrios Kyrtzidis2016-07-131-1/+1
| | | | llvm-svn: 275324
* [PCH/preamble] Make sure that if the preamble/PCH was serialized with errors ↵Argyrios Kyrtzidis2016-07-133-0/+48
| | | | | | | | | | that we set diagnostic engine state appropriately. Otherwise there can be a crash with CFG analysis warnings doing work on invalid AST. Fixes crash of rdar://26224134 llvm-svn: 275313
* [libclang] Sync-up the way top-level decls in an ASTUnit are handled with ↵Argyrios Kyrtzidis2016-07-011-1/+1
| | | | | | | | how decls in a DeclContext are handled. rdar://19775013 llvm-svn: 274378
* AvailabilityAttr: we accept "macos" as the platform name.Manman Ren2016-06-282-4/+4
| | | | | | | | | | | | | | We continue accepting "macosx" but canonicalize it to "macos", When emitting diagnostics, we use "macOS" instead of "OS X". The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can directly compare the Platform in AvailabilityAttr with the PlatformName in TargetInfo. rdar://26795172 rdar://26800775 llvm-svn: 274064
* Make sizeof and alignof a CXCursor_UnaryExprOlivier Goffart2016-06-091-3/+3
| | | | | | | | So we can match sizeof expressions more accurately than with UnexposedExpr Differential Revision: http://reviews.llvm.org/D18081 llvm-svn: 272274
* Indexer: add CXObjCPropertyAttr_class for class properties.Manman Ren2016-05-312-1/+8
| | | | | | rdar://25963227 llvm-svn: 271351
* clang-c: Add the clang_getCursorVisibility() APIEhsan Akhgari2016-05-311-0/+7
| | | | | | | | | This patch adds an API for querying the visibility of the entity referred to by a cursor. Patch by Michael Wu <mwu@mozilla.com>. llvm-svn: 271292
* Revert r253909 because it was committed with an incorrect messageEhsan Akhgari2016-05-311-7/+0
| | | | llvm-svn: 271291
* [libclang] Expose the ElaboratedTypeSergey Kalinichev2016-05-032-2/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D11797 llvm-svn: 268366
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-277-12/+29
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
* [index] Add SymbolSubKinds for ObjC IB annotations.Argyrios Kyrtzidis2016-04-221-0/+12
| | | | llvm-svn: 267118
* [index] Add a SymbolSubKind for an ObjC unit test.Argyrios Kyrtzidis2016-04-221-0/+36
| | | | llvm-svn: 267117
* [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from the following unit tests: test/CXX/special/class.copy/implicit-move-def.cpp test/CodeGen/cleanup-destslot-simple.c test/CodeGen/inline-asm-immediate-ubsan.c test/CodeGen/mips-interrupt-attr.c test/CodeGenCXX/cfi-stats.cpp test/CodeGenCXX/copy-constructor-elim.cpp test/CodeGenCXX/microsoft-templ-uuidof.cpp test/CodeGenCXX/vtable-linkage.cpp test/CodeGenObjC/messages-2.m test/Driver/noinline.c test/Index/remap-load.c test/Index/retain-comments-from-system-headers.c test/OpenMP/task_if_codegen.cpp test/Preprocessor/comment_save_macro.c Patch by: Mandeep Singh Grang (mgrang) Reviewers: rafael, ABataev, rengolin Projects: #clang-c Differential Revision: http://reviews.llvm.org/D19232 llvm-svn: 266843
* [index] Fix regression where ObjC method declarations may mistakenly get ↵Argyrios Kyrtzidis2016-03-312-0/+43
| | | | | | | | indexed as definition. rdar://25372906 llvm-svn: 265042
* [index] Remove redundancy between symbol kind and languageBen Langmuir2016-03-252-13/+13
| | | | | | | | | Condense the ObjCKIND and CXXKIND options into just KIND, since the language was already specified on a per-symbol basis and this information was redundant. This only changes the internal representation; naturally the libclang interface remains the same. llvm-svn: 264423
* [index] Make sure that declarations of builtin functions are indexed.Argyrios Kyrtzidis2016-03-171-0/+1
| | | | | | rdar://25154630 llvm-svn: 263689
* [index] libclang: Make sure to treat forward ObjC protocols as ↵Argyrios Kyrtzidis2016-03-091-0/+5
| | | | | | | | ObjCProtocolRef declarations, and fix related crash. rdar://25035376 llvm-svn: 262985
* [index] Fix assertion hit when indexing re-declarations of built-in functions.Argyrios Kyrtzidis2016-03-091-0/+5
| | | | llvm-svn: 262984
* [index] Distinguish USRs of anonymous enums by using their first enumerator.Argyrios Kyrtzidis2016-03-042-6/+23
| | | | | | rdar://24609949. llvm-svn: 262695
OpenPOWER on IntegriCloud