summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexCodeCompletion.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement caching of code-completion results for macro definitionsDouglas Gregor2010-08-131-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. llvm-svn: 111051
* Once code completion has completed, pass a "completion context" on toDouglas Gregor2010-08-111-1/+3
| | | | | | | the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results. llvm-svn: 110858
* Minor libclang tweaksDouglas Gregor2010-08-091-2/+2
| | | | llvm-svn: 110599
* Use precompiled preambles for in-process code completion.Douglas Gregor2010-08-091-4/+14
| | | | llvm-svn: 110596
* Give clang_codeCompleteAt() an "options" parameter, and add a newDouglas Gregor2010-08-051-2/+10
| | | | | | | | | flags enumeration + default-generating function that allows code-completion to be customized via the libclang API. Plus, turn on spell-checking when performing code completion. llvm-svn: 110319
* When performing in-process code completion, don't free the remappedDouglas Gregor2010-08-041-10/+12
| | | | | | | file buffers until the code completion results are destroyed; diagnostics may end up referring into the source. llvm-svn: 110216
* Add code-completion support directly to ASTUnit, which performs codeDouglas Gregor2010-08-041-2/+163
| | | | | | | | | | | | | | completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). llvm-svn: 110210
* When LIBCLANG_CODE_COMPLETION_LOGGING is set in the environment, log ↵Douglas Gregor2010-07-261-0/+15
| | | | | | code-completion command lines to stderr llvm-svn: 109395
* libclang: When invoking external clang process to get code completion results,Daniel Dunbar2010-06-301-0/+3
| | | | | | | pass -ccc-clang-cxx to force C++ support (even if the binary was built without it). llvm-svn: 107324
* Silence warning about "enumeral and non-enumeral type in conditionalBill Wendling2010-05-271-1/+1
| | | | | | expression". llvm-svn: 104863
* Introduce priorities into the code-completion results.Douglas Gregor2010-05-261-8/+38
| | | | llvm-svn: 104751
* Turn vertical spacing into horizontal spacing in code-completion resultsDouglas Gregor2010-05-251-1/+4
| | | | llvm-svn: 104586
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-0/+512
(C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
OpenPOWER on IntegriCloud