summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [index] Include parameter types in the USRs for C functions marked with ↵Argyrios Kyrtzidis2016-03-041-0/+5
| | | | | | 'overloadable' attribute. llvm-svn: 262694
* [index] In ObjC++ handle objc type parameters for function USRs.Argyrios Kyrtzidis2016-03-041-0/+11
| | | | llvm-svn: 262693
* [index] Ignore ObjCTypeParamDecls during indexing.Argyrios Kyrtzidis2016-03-041-0/+5
| | | | llvm-svn: 262686
* [index] Report references of ObjC super class/protocols in interfaces and ↵Argyrios Kyrtzidis2016-03-031-0/+20
| | | | | | protocols. llvm-svn: 262584
* [test] Re-enable asan on the test, stack usage should be lower.Argyrios Kyrtzidis2016-03-031-2/+2
| | | | llvm-svn: 262583
* Fix test breakage on windows where the default std is c++11 by forcing c++03 ↵Manuel Klimek2016-03-011-1/+1
| | | | | | in the test. llvm-svn: 262325
* Optionally demote fatal errors to non-fatal errors.Manuel Klimek2016-03-011-0/+29
| | | | | | | | | | | | | | | | | | This behavior is enabled when the new CXTranslationUnit_KeepGoing option is passed to clang_parseTranslationUnit{,2}. It is geared towards use by IDEs and similar consumers of the clang-c API where fatal errors may arise when parsing incomplete code mid-edit, or when include paths are not properly configured yet. In such situations one still wants to get as much information as possible about a TU. Previously, the semantic analysis would not instantiate templates or report additional fatal errors after the first fatal error was encountered. Fixes PR24268. Patch by Milian Wolff. llvm-svn: 262318
* [test] After r262290 reducing stack usage, try re-enabling asan on the ↵Argyrios Kyrtzidis2016-03-011-2/+2
| | | | | | related test. llvm-svn: 262295
* [index] Print and test module import references.Argyrios Kyrtzidis2016-02-293-0/+15
| | | | llvm-svn: 262208
* [index] Add a caller relation for a call reference.Argyrios Kyrtzidis2016-02-291-2/+4
| | | | llvm-svn: 262207
* [AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get ↵Argyrios Kyrtzidis2016-02-291-0/+10
| | | | | | | | called after the statement has been visited. Fixes the indexing client of this. llvm-svn: 262206
* [index] Use ',' to separate symbol roles when printing.Argyrios Kyrtzidis2016-02-292-2/+2
| | | | llvm-svn: 262205
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-151-0/+9
| | | | | | | | | | printing policy. Enable it for USRs and names when indexing. Forward references can have different template argument names; including them makes USRs and names unstable, since the name depends on whether we saw a forward reference or not. llvm-svn: 260866
* [test/Index] Set a specific target for the test.Argyrios Kyrtzidis2016-02-141-1/+1
| | | | llvm-svn: 260861
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-141-2/+2
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-141-0/+8
| | | | | | library directly. llvm-svn: 260842
* Disable two tests that use a lot of stack under ASan.Alexey Samsonov2016-02-132-4/+4
| | | | llvm-svn: 260779
* [Modules] Don't infinite recurse on implicit import of circular modules in ↵Ben Langmuir2016-02-116-0/+30
| | | | | | | | | | | | | | preamble Update the Preprocessor's VisibleModuleSet when typo-correction creates an implicit module import so that we won't accidentally write an invalid SourceLocation into the preamble AST. This would later lead to infinite recursion when loading the preamble AST because we use the value in ImportLocs to prevent visiting a module twice. rdar://problem/24440990 llvm-svn: 260543
* clang/test/Index/skip-parsed-bodies/compile_commands.json: Appease targeting ↵NAKAMURA Takumi2016-02-101-3/+3
| | | | | | msvc. llvm-svn: 260347
* libclang: Enable skip-parsed-bodies on win32.NAKAMURA Takumi2016-02-101-1/+0
| | | | | | I guess it would be working since Rafael's r187619. llvm-svn: 260344
* [libclang] indexing: make sure to not visit init-list expressions twice.Argyrios Kyrtzidis2016-02-091-0/+8
| | | | llvm-svn: 260255
* Index: provide adjustment thunk information for C++ manglingsSaleem Abdulrasool2016-02-061-0/+30
| | | | | | | Add support for exposing the adjustment thunk for virtual methods as appropriate. llvm-svn: 260011
* [libclang] Introduce APIs for evaluating a cursor and checking if a macro is ↵Argyrios Kyrtzidis2016-01-161-0/+30
| | | | | | | | builtin/function. rdar://24091595 llvm-svn: 257968
* [libclang] Handle AutoType in clang_getTypeDeclarationSergey Kalinichev2016-01-071-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D13001 llvm-svn: 257043
* Show inclusions from a preamble in clang_getInclusions.Erik Verbruggen2016-01-061-0/+11
| | | | | | | | | | | | | | | | When reparsing a translation unit with preamble generation turned on, no includes are found. This is due to the fact that all SLocs from AST/PCH files are skipped as they are 'loaded', and inclusions from a preamble are also 'loaded'. So, in case a file has a preamble, it first needs to process those loaded inclusions, and then check for any local inclusions. This latter one is for any includes that are not part of the preamble, like includes half-way through a file. This fixes PR24748. Differential Revision: http://reviews.llvm.org/D14329 llvm-svn: 256939
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-151-2/+11
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 llvm-svn: 255635
* Preserve source location information for qualified names used in a constructorRichard Smith2015-12-121-0/+10
| | | | | | initializer list to name a base class. Patch by Shahms King! llvm-svn: 255420
* libclang: expose dllexport, dllimport attributesSaleem Abdulrasool2015-12-102-0/+66
| | | | | | | These attributes were previously unexposed. Expose them through the libclang interfaces. Add tests that cover both the MSVC spelling and the GNU spelling. llvm-svn: 255273
* libclang: correct inverted logicSaleem Abdulrasool2015-12-101-6/+6
| | | | | | | The complete dtor is only emitted when there is a virtual destructor. The test itself was incorrect, so the issue in the code was not noticed. llvm-svn: 255225
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-11-231-0/+7
| | | | | | | | | | | | Right now clang_Cursor_getMangling will attempt to mangle any declaration, even if the declaration isn't mangled (extern C). This results in a partially mangled name which isn't useful for much. This patch makes clang_Cursor_getMangling return an empty string if the declaration isn't mangled. Patch by Michael Wu <mwu@mozilla.com>. llvm-svn: 253909
* [libclang] Make sure to use the raw module format for libclang parsing.Argyrios Kyrtzidis2015-11-203-0/+5
| | | | | | | Fixes crash when passing '-gmodules' in the compiler options. rdar://23588717 llvm-svn: 253645
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-152-1/+8
| | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 llvm-svn: 253166
* [libclang] Expose AutoTypeSergey Kalinichev2015-11-151-5/+5
| | | | | | | | Expose the AutoType via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13000 llvm-svn: 253165
* [modules] Allow "redefinition" of typedef of anon tag from unimported submoduleBen Langmuir2015-11-141-1/+1
| | | | | | | | | r233345 started being stricter about typedef names for linkage purposes in non-visible modules, but broke languages without the ODR. rdar://23527954 llvm-svn: 253123
* [modules] Follow the C++ standard's rule for linkage of enumerators: they haveRichard Smith2015-11-131-1/+1
| | | | | | | | | the linkage of the enumeration. For enumerators of unnamed enumerations, extend the -Wmodules-ambiguous-internal-linkage extension to allow selecting an arbitrary enumerator (but only if they all have the same value, otherwise it's ambiguous). llvm-svn: 253010
* [modules] Simplify and generalize the existing rule for finding hiddenRichard Smith2015-11-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | declarations in redeclaration lookup. A declaration is now visible to lookup if: * It is visible (not in a module, or in an imported module), or * We're doing redeclaration lookup and it's externally-visible, or * We're doing typo correction and looking for unimported decls. We now support multiple modules having different internal-linkage or no-linkage definitions of the same name for all entities, not just for functions, variables, and some typedefs. As previously, if multiple such entities are visible, any attempt to use them will result in an ambiguity error. This patch fixes the linkage calculation for a number of entities where we previously didn't need to get it right (using-declarations, namespace aliases, and so on). It also classifies enumerators as always having no linkage, which is a slight deviation from the C++ standard's definition, but not an observable change outside modules (this change is being discussed on the -core reflector currently). This also removes the prior special case for tag lookup, which made some cases of this work, but also led to bizarre, bogus "must use 'struct' to refer to type 'Foo' in this scope" diagnostics in C++. llvm-svn: 252960
* libclang: add clang_Cursor_getCXXManglingsSaleem Abdulrasool2015-11-121-0/+66
| | | | | | | | | This function permits the mangling of a C++ 'structor. Depending on the ABI and the declaration, the declaration may contain more than one associated symbol for a given declaration. This allows the consumer to retrieve all of the associated symbols for the declaration the cursor points to. llvm-svn: 252853
* Stop back-patching 'readonly' Objective-C properties with 'readwrite' ones.Douglas Gregor2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A 'readonly' Objective-C property declared in the primary class can effectively be shadowed by a 'readwrite' property declared within an extension of that class, so long as the types and attributes of the two property declarations are compatible. Previously, this functionality was implemented by back-patching the original 'readonly' property to make it 'readwrite', destroying source information and causing some hideously redundant, incorrect code. Simplify the implementation to express how this should actually be modeled: as a separate property declaration in the extension that shadows (via the name lookup rules) the declaration in the primary class. While here, correct some broken Fix-Its, eliminate a pile of redundant code, clean up the ARC migrator's handling of properties declared in extensions, and fix debug info's naming of methods that come from categories. A wonderous side effect of doing this write is that it eliminates the "AddedObjCPropertyInClassExtension" method from the AST mutation listener, which in turn eliminates the last place where we rewrite entire declarations in a chained PCH file or a module file. This change (which fixes rdar://problem/18475765) will allow us to eliminate the rewritten-decls logic from the serialization library, and fixes a crash (rdar://problem/23247794) illustrated by the test/PCH/chain-categories.m example. llvm-svn: 251874
* Suppress uninteresting output from crash-recovery-modules.mNico Weber2015-10-291-4/+4
| | | | | | No behavior change, but it makes this test a bit easier to debug when it fails. llvm-svn: 251650
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-271-0/+6
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! llvm-svn: 251410
OpenPOWER on IntegriCloud