hanchenye-llvm-project/clang/tools
Douglas Gregor 2436e7116b Initial implementation of a code-completion interface in Clang. In
essence, code completion is triggered by a magic "code completion"
token produced by the lexer [*], which the parser recognizes at
certain points in the grammar. The parser then calls into the Action
object with the appropriate CodeCompletionXXX action.

Sema implements the CodeCompletionXXX callbacks by performing minimal
translation, then forwarding them to a CodeCompletionConsumer
subclass, which uses the results of semantic analysis to provide
code-completion results. At present, only a single, "printing" code
completion consumer is available, for regression testing and
debugging. However, the design is meant to permit other
code-completion consumers.

This initial commit contains two code-completion actions: one for
member access, e.g., "x." or "p->", and one for
nested-name-specifiers, e.g., "std::". More code-completion actions
will follow, along with improved gathering of code-completion results
for the various contexts.

[*] In the current -code-completion-dump testing/debugging mode, the
file is truncated at the completion point and EOF is translated into
"code completion".

llvm-svn: 82166
2009-09-17 21:32:03 +00:00
..
CIndex Add clang_disposeTranslationUnit() and clang_disposeIndex(). 2009-09-17 18:33:27 +00:00
c-index-test - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound). 2009-09-15 20:25:34 +00:00
clang-cc Initial implementation of a code-completion interface in Clang. In 2009-09-17 21:32:03 +00:00
driver CMake: Improve installation of Clang 2009-08-23 05:28:29 +00:00
index-test Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
scan-view Increase scan-view max timeout to 1 minute. 2009-05-04 19:02:41 +00:00
wpa Don't install wpa or index-test tools. 2009-08-20 18:45:52 +00:00
CMakeLists.txt Add 'clang-wpa' to the CMake-based build. 2009-07-16 18:10:20 +00:00
Makefile Lot's of little changes to get the C-based indexing API going... 2009-08-28 15:28:48 +00:00