summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
...
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-3/+32
| | | | | | | | their input files. This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. llvm-svn: 293461
* [c-index-test] Provide capability for 'c-index-test core' to dump symbol ↵Argyrios Kyrtzidis2017-01-292-0/+46
| | | | | | information from a PCH/module file. llvm-svn: 293416
* [index] Introduce SymbolSubKind for reporting language-specific details.Argyrios Kyrtzidis2017-01-081-0/+2
| | | | | | Initially reports if a constructor symbol is a copy or move constructor. llvm-svn: 291409
* Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase ↵David Blaikie2017-01-061-3/+2
| | | | | | | | | | | | | | and CodeCompleteConsumer" Aleksey Shlypanikov pointed out my mistake in migrating an explicit unique_ptr to auto - I was expecting the function returned a unique_ptr, but instead it returned a raw pointer - introducing a leak. Thanks Aleksey! This reapplies r291184, reverted in r291249. llvm-svn: 291270
* Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and ↵David Blaikie2017-01-061-3/+4
| | | | | | | | | | CodeCompleteConsumer" Caused a memory leak reported by asan. Reverting while I investigate. This reverts commit r291184. llvm-svn: 291249
* IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and ↵David Blaikie2017-01-051-4/+3
| | | | | | CodeCompleteConsumer llvm-svn: 291184
* [libclang] Restore the CXXRecordDecl path for ↵Argyrios Kyrtzidis2016-12-161-15/+22
| | | | | | | | | clang_Type_getNumTemplateArguments and clang_Type_getTemplateArgumentAsType Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26907 llvm-svn: 289995
* [libclang] Add APIs to check the result of an integer expression in ↵Argyrios Kyrtzidis2016-12-011-2/+8
| | | | | | | | | CXEvalResult without overflow Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26788 llvm-svn: 288438
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-111-2/+2
| | | | | | This better reflects what it represents. llvm-svn: 286680
* Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini2016-10-081-2/+1
| | | | | | | | | | | | | | | template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
* [c-index-test] Make sure to check that clang_Cursor_getNumTemplateArguments ↵Argyrios Kyrtzidis2016-07-301-2/+5
| | | | | | did not return -1. llvm-svn: 277261
* Update to match LLVM r272232.Richard Smith2016-06-092-5/+6
| | | | llvm-svn: 272233
* Indexer: add CXObjCPropertyAttr_class for class properties.Manman Ren2016-05-311-0/+1
| | | | | | rdar://25963227 llvm-svn: 271351
* clang-c: Add the clang_getCursorVisibility() APIEhsan Akhgari2016-05-311-0/+30
| | | | | | | | | 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-30/+0
| | | | llvm-svn: 271291
* [scan-build] fix dead store warnings emitted on clang code baseDavid Blaikie2016-05-031-2/+2
| | | | | | | | | | | | | This fixes dead store warnings of the type "dead assignment" reported by CLang Static Analyzer on the following file: - tools/c-index-test/c-index-test.c. Patch by Apelete Seketeli <apelete@seketeli.net>! Differential Revision: http://reviews.llvm.org/D19831 llvm-svn: 268453
* 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
OpenPOWER on IntegriCloud