summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
...
* Added CXAvailability_NotAccessible to indicate that a declaration is ↵Erik Verbruggen2011-10-061-0/+8
| | | | | | available, but not accessible from the current code completion context. llvm-svn: 141278
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-061-9/+108
| | | | | | | | and a callback and finds all identifier references of the cursor in the file. rdar://7948304 llvm-svn: 141277
* Install c-index-test also on CMake build, following up r140681.NAKAMURA Takumi2011-09-281-0/+1
| | | | llvm-svn: 140694
* Install c-index-test as part of install-clang-c Makefile rule.Ted Kremenek2011-09-281-3/+0
| | | | llvm-svn: 140681
* Don't map a file:line:col triplet that is inside the preamble range toArgyrios Kyrtzidis2011-09-261-0/+11
| | | | | | | | | | | | | | a "loaded" location of the precompiled preamble. Instead, handle specially locations of preprocessed entities: -When looking up for preprocessed entities, map main file locations inside the preamble range to a preamble loaded location. -When getting the source range of a preprocessing cursor, map preamble loaded locations back to main file locations. Fixes rdar://10175093 & http://llvm.org/PR10999 llvm-svn: 140519
* [libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment ↵Argyrios Kyrtzidis2011-09-121-1/+10
| | | | | | | | | variable, which when set it determines the trial number after which the remapping of files should take effect. llvm-svn: 139511
* Fix type mismatch in initialization (caught by -Wliteral-conversion)Matt Beaumont-Gay2011-08-291-1/+1
| | | | llvm-svn: 138736
* Add a new libclang API to return a CXCompletionString for an arbitraryDouglas Gregor2011-08-041-0/+6
| | | | | | cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>. llvm-svn: 136911
* Add new libclang API, clang_codeCompleteGetObjCSelector(), whichDouglas Gregor2011-07-261-1/+11
| | | | | | | provides the partial Objective-C selector used in a code completion. From Connor Wakamo! llvm-svn: 136084
* Added clang_getCursorReferenceNameRange to libclang to to retrieve parts ofDouglas Gregor2011-07-251-12/+39
| | | | | | a cursor reference, from Erik Verbruggen! llvm-svn: 135920
* New libclang API to expose container type for code completion, fromDouglas Gregor2011-07-211-1/+23
| | | | | | Connor Wakamo! llvm-svn: 135651
* NestedMacroInstantiations -> NestedMacroExpansionsChandler Carruth2011-07-141-1/+1
| | | | | | | | | | | | | | | | This is switches all the interfaces points (and most of the commenst / local variables I saw on my way through) regarding the NestedMacroInstantiations bit. The libclang enums corresponding to this state were renamed, but a legacy enum was added with the old name, and the same value to keep existing clients working. I've added a documentation blurb for it, but let me know if there is a canonical way to document legacy elemenst of the libclang interface. No functionality changed here, even in tests. llvm-svn: 135141
* Fix linker problem in buildbot.Argyrios Kyrtzidis2011-07-091-1/+1
| | | | llvm-svn: 134849
* Introduce a new libclang aPI function,Douglas Gregor2011-07-071-0/+78
| | | | | | | | | clang_codeCompleteGetContexts(), that provides the client with information about the context in which code completion has occurred and what kinds of entities make sense as completions at that point. Patch by Connor Wakamo! llvm-svn: 134615
* MSVC doesn't like mixing declarations and statements in a C file.Francois Pichet2011-07-061-2/+1
| | | | llvm-svn: 134550
* libclang: Allow callers of clang_saveTranslationUnit() to distinguishDouglas Gregor2011-07-061-3/+27
| | | | | | | between different classes of errors. Addresses most of <rdar://problem/9660328>. llvm-svn: 134495
* Remove ARCMigrate from more builds that it isn't needed in now that theChandler Carruth2011-06-161-2/+1
| | | | | | layering problem has been addressed. llvm-svn: 133217
* c-index-test also depends on ARCMigrate, oh boyJohn McCall2011-06-161-2/+3
| | | | llvm-svn: 133147
* Add c-index-test printing and tests for static and virtual methodDouglas Gregor2011-05-131-0/+5
| | | | | | query functions, from Erik Verbruggen! llvm-svn: 131295
* Introduce a new libclang parsing flag,Douglas Gregor2011-05-061-10/+13
| | | | | | | | | | | | | CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost. Addresses <rdar://problem/9389320>. llvm-svn: 130990
* Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),Douglas Gregor2011-05-041-10/+16
| | | | | | | | which determines whether a particular file is actually a header that is intended to be guarded from multiple inclusions within the same translation unit. llvm-svn: 130808
* Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.Ted Kremenek2011-04-201-3/+3
| | | | llvm-svn: 129857
* Report memory usage for global code completion results in CXTUMemoryUsage.Ted Kremenek2011-04-181-8/+7
| | | | llvm-svn: 129733
* Unbreak the MSVC build: Don't mix variable declarations and statements in a ↵Francois Pichet2011-04-181-2/+4
| | | | | | .c file. llvm-svn: 129732
* Add libclang API to query how much memory is used by a CXTranslationUnit. ↵Ted Kremenek2011-04-181-4/+32
| | | | | | | | This is a WIP. Currently we report the amount used for expressions, types, identifiers, and selectors. llvm-svn: 129730
* c-index-test.c: Fix cygwin warning not to pass signed char to islower(c).NAKAMURA Takumi2011-03-091-1/+1
| | | | | | | | | | Cygwin's ctype.h says; /* These macros are intentionally written in a manner that will trigger a gcc -Wall warning if the user mistakenly passes a 'char' instead of an int containing an 'unsigned char'. (snip) */ llvm-svn: 127308
* [PR9321] "make install" does not need install c-index-test. It is used for ↵NAKAMURA Takumi2011-02-281-0/+3
| | | | | | testing. llvm-svn: 126634
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-192-3/+2
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-192-2/+3
| | | | llvm-svn: 126050
* Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenActionPeter Collingbourne2011-02-182-3/+2
| | | | | | | | | This removes the final dependency edge from any lib outside of CodeGen to core. As a result we can, and do, trim the dependency on core from libclang, PrintFunctionNames, the unit tests and c-index-test. While at it, review and trim other unneeded dependencies. llvm-svn: 125820
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-101-2/+0
| | | | llvm-svn: 125275
* If any Fix-Its attached to a diagnostic have invalid source locationsDouglas Gregor2011-02-031-1/+1
| | | | | | | or source locations that refer into a macro instantiation, delete all of the Fix-Its on that diagnostic. llvm-svn: 124833
* Teach Diagnostic::setClient() to free the existing, ownedDouglas Gregor2011-01-311-0/+2
| | | | | | client. Fixes a libclang leak. llvm-svn: 124614
* Teach ASTUnit to save the specified target features, sinceDouglas Gregor2011-01-271-1/+1
| | | | | | | TargetInfo::CreateTargetInfo() mangles the target options in a way that is not idempotent. Fixes <rdar://problem/8807535>. llvm-svn: 124382
* Add libclang functions to determine the const/volatile/restrictDouglas Gregor2011-01-271-0/+6
| | | | | | qualifiers on a CXType. Patch from Stefan Seefeld, test by me. llvm-svn: 124377
* De-C99-ify for loopDouglas Gregor2010-11-301-1/+2
| | | | llvm-svn: 120395
* Teach c-index-test to reparse the source file a few times when testingDouglas Gregor2010-11-301-17/+36
| | | | | | | | clang_getCursor() via -cursor-at=??? and CINDEXTEST_EDITING is set in the environment. This mirrors how we test code completion and source-loading in the presence of this environment variable. llvm-svn: 120392
* Extend the libclang diagnostic API to provide information about theDouglas Gregor2010-11-191-1/+2
| | | | | | option name, category ID, and category name corresponding to a diagnostic. llvm-svn: 119802
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-3/+3
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Move CXString creation/management routines intoTed Kremenek2010-11-161-3/+3
| | | | | | | their own .cpp file and make the interpretation of its flags private. llvm-svn: 119319
* Tweak libclang's heuristics for building precompiled preambles andDouglas Gregor2010-11-151-0/+5
| | | | | | | | caching global code-completion results. In particular, don't perform either operation the first time we parse, but do both after the first reparse. llvm-svn: 119285
* ntroduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-22/+22
| | | | | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. Take 2: this time, adjusted tests appropriately and used a "simple" approach to the spelling location. llvm-svn: 118495
* Revert r118492, which didn't update all of its tests accordinglyDouglas Gregor2010-11-091-22/+22
| | | | llvm-svn: 118494
* Introduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-22/+22
| | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. llvm-svn: 118492
* Adjust return type of thread_runner.Benjamin Kramer2010-11-041-2/+1
| | | | llvm-svn: 118259
* c-index-test: Switch to using clang_executeOnThread instead of mucking aboutDaniel Dunbar2010-11-041-27/+1
| | | | | | with system specific stuff. llvm-svn: 118224
* Add an environment variable that allows us to turn off threading in c-index-testDouglas Gregor2010-10-271-0/+3
| | | | llvm-svn: 117449
* Extend the preprocessing record and libclang with support forDouglas Gregor2010-10-201-0/+7
| | | | | | | | | inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. llvm-svn: 116952
* Call clang_disposeTokens() when we are done with the set of tokens.Ted Kremenek2010-10-201-0/+1
| | | | llvm-svn: 116946
* This patch remove the Win32 XFAIL from remap-complete.cFrancois Pichet2010-10-121-1/+1
| | | | | | The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode. llvm-svn: 116286
OpenPOWER on IntegriCloud