summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | | 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 a SymbolSubKind for an ObjC unit test.Argyrios Kyrtzidis2016-04-221-1/+2
| | | | llvm-svn: 267117
* [index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.Argyrios Kyrtzidis2016-04-221-2/+3
| | | | | | This provides a more general and flexible way to annotate special symbols. llvm-svn: 267116
* [c-index-test] Fix leak in print_completion_result, NFCVedant Kumar2016-04-031-3/+5
| | | | llvm-svn: 265252
* [c-index-test] Delete dead function, NFCVedant Kumar2016-03-301-19/+0
| | | | llvm-svn: 264874
* Optionally demote fatal errors to non-fatal errors.Manuel Klimek2016-03-011-0/+2
| | | | | | | | | | | | | | | | | | 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
* [index] Print and test module import references.Argyrios Kyrtzidis2016-02-291-0/+20
| | | | llvm-svn: 262208
* [c-index-test] CMake: When installing c-index-test to a different prefix ↵Argyrios Kyrtzidis2016-02-201-0/+2
| | | | | | | | directory, add an rpath so that it can find libclang. llvm-svn: 261445
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-151-4/+1
| | | | | | | | | | 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
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-141-0/+10
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* Don't leak the ASTUnit when done with testing.Benjamin Kramer2016-02-141-3/+2
| | | | | | Found by lsan. llvm-svn: 260850
* c-index-test: Fix libdeps corresponding to r260841.NAKAMURA Takumi2016-02-141-0/+3
| | | | llvm-svn: 260847
* [c-index-test] Fix a gcc build error.Argyrios Kyrtzidis2016-02-141-1/+1
| | | | llvm-svn: 260844
* [index] Fix gcc builds.Argyrios Kyrtzidis2016-02-141-1/+2
| | | | llvm-svn: 260843
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-143-4/+220
| | | | | | library directly. llvm-svn: 260842
* Remove autoconf supportChris Bieneman2016-01-261-58/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* [libclang] Introduce APIs for evaluating a cursor and checking if a macro is ↵Argyrios Kyrtzidis2016-01-161-70/+195
| | | | | | | | builtin/function. rdar://24091595 llvm-svn: 257968
* [libclang] Handle AutoType in clang_getTypeDeclarationSergey Kalinichev2016-01-071-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D13001 llvm-svn: 257043
* Show inclusions from a preamble in clang_getInclusions.Erik Verbruggen2016-01-061-0/+21
| | | | | | | | | | | | | | | | 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-1/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-11-231-0/+30
| | | | | | | | | | | | 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
* [CMake] Don't install c-index-test when LLVM_INSTALL_TOOLCHAIN_ONLY=ON.Argyrios Kyrtzidis2015-11-131-14/+16
| | | | llvm-svn: 253099
* [CMake] If 'INTERNAL_INSTALL_PREFIX' is set, use it for determining the ↵Argyrios Kyrtzidis2015-11-131-6/+15
| | | | | | install destination of c-index-test and the libclang headers. llvm-svn: 253001
* Fix c-index-test install pathIsmail Donmez2015-11-121-1/+1
| | | | llvm-svn: 252890
* libclang: add clang_Cursor_getCXXManglingsSaleem Abdulrasool2015-11-121-0/+21
| | | | | | | | | 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
* [CMake] Setup an install component for libclang and c-index-test.Argyrios Kyrtzidis2015-11-121-0/+9
| | | | | | Also don't create libclang dylib symlinks on darwin. llvm-svn: 252836
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-271-0/+2
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! llvm-svn: 251410
* Fix a -Wdeclaration-after-statement warning.Craig Topper2015-10-081-1/+1
| | | | llvm-svn: 249652
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-10-081-0/+2
| | | | | | | | | | | | 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: 249639
* Revert r249437Ehsan Akhgari2015-10-061-2/+0
| | | | llvm-svn: 249440
* Make clang_Cursor_getMangling don't mangle if the declaration isn't mangledEhsan Akhgari2015-10-061-0/+2
| | | | | | | | | | | | 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: 249437
* [UB] Avoid a really broken call to realloc that would later result inChandler Carruth2015-08-041-0/+11
| | | | | | | | | | | | a bad call to memcpy. When we only have a buffer from one of the two reparse calls, we can just return that buffer rather than going through the realloc/memcpy dance. Found with UBsan. llvm-svn: 243950
* Tweak libclang's users, c-arcmt-test, c-index-test and libclangTests to ↵NAKAMURA Takumi2015-07-121-0/+4
| | | | | | satisfy LDFLAGS=-static. llvm-svn: 241992
* Reformat Makefile.NAKAMURA Takumi2015-07-121-1/+6
| | | | llvm-svn: 241991
* Fix a typo.Adrian Prantl2015-06-181-1/+1
| | | | llvm-svn: 240025
* Revert r237339 as sanitizer-ppc64-linux1 does not like it.Yaron Keren2015-05-141-7/+6
| | | | | | | | | | | | | | | | | | | Complains: /home/buildbots/sanitizerslave1/sanitizer-ppc64-1/build/llvm/tools/clang/tools/c-index-test/c-index-test.c:829:30: error: format specifies type 'long' but the argument has type 'long long' [-Werror,-Wformat] I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm not sure now how this should be fixed. %lld is non-standard and not accepted by mingw on Windows while PRId64 is bad for this bot. Is long long longer than 64 bits here? if not, why is PRId64 incompatible with it? something seems wrong. Probably all the datatypes should be replaced to unsigned or uint64_t depending upin requirements instead of the non standard long long. llvm-svn: 237346
* Replace non-standard %lld printf usage with PRId64.Yaron Keren2015-05-141-6/+7
| | | | | | See also r180024. llvm-svn: 237339
* [libclang] Add functions to get information about fields.Argyrios Kyrtzidis2015-04-131-18/+41
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 234762
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-251-4/+2
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-251-2/+4
| | | | | | | | | | | | | | | | | 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
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-241-4/+5
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-241-5/+4
| | | | | | | | | | | | | | 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. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-211-3/+1
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-1/+3
| | | | | | | | | | | | | | 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. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-3/+1
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-1/+3
| | | | | | | | | | | | | | 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. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* This reverts commit r227432, r227438 and r227448.Rafael Espindola2015-01-291-41/+18
| | | | | | | | | | | | | | | | | | | | | | | 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
* libclang: Add three functions useful for dealing with anonymous fields:Francois Pichet2015-01-291-18/+41
| | | | | | | | | | | 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
* Support LLVM_BUILD_STATIC.Rafael Espindola2014-11-051-2/+8
| | | | llvm-svn: 221346
* [autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o ↵NAKAMURA Takumi2014-10-301-0/+1
| | | | | | libclang.dll. llvm-svn: 220904
OpenPOWER on IntegriCloud