hanchenye-llvm-project/clang/lib
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
..
AST Fix two crashes on value dependent expressions (shift and null-pointer check). 2009-09-17 06:31:27 +00:00
Analysis Have divide-by-zero checker not handled undefined denominators. This is handled by the generic checking for undefined operands for BinaryOperators. 2009-09-16 06:04:26 +00:00
Basic Initial implementation of a code-completion interface in Clang. In 2009-09-17 21:32:03 +00:00
CodeGen Ignore extern "C++" { } when mangling. 2009-09-17 16:12:20 +00:00
Driver Driver: Change -O to mean -O2, -O1 is meaningless. 2009-09-17 06:53:36 +00:00
Frontend PCH: When writing PCH files, tweak the predicate function deciding whether to mark a decl as "external" to be closer to reality. 2009-09-17 03:06:51 +00:00
Headers Collapse more clang version numbers down into fewer places. 2009-09-16 01:26:05 +00:00
Index Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
Lex Initial implementation of a code-completion interface in Clang. In 2009-09-17 21:32:03 +00:00
Parse Initial implementation of a code-completion interface in Clang. In 2009-09-17 21:32:03 +00:00
Rewrite Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
Sema Initial implementation of a code-completion interface in Clang. In 2009-09-17 21:32:03 +00:00
CMakeLists.txt Introduce the 'Index' library. 2009-07-05 22:22:19 +00:00
Makefile Introduce the 'Index' library. 2009-07-05 22:22:19 +00:00