summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-24 22:20:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-24 22:20:20 +0000
commitec00a268552c93b79c5049111b674e2aa184bf5d (patch)
tree8306d1d20b1bccbe0f1350275ff010c7bf33b69c /clang/lib/Frontend/ASTUnit.cpp
parent3c884a014c87e15f5ac0430e29960129251dc65c (diff)
downloadbcm5719-llvm-ec00a268552c93b79c5049111b674e2aa184bf5d.tar.gz
bcm5719-llvm-ec00a268552c93b79c5049111b674e2aa184bf5d.zip
Implement code completion for preprocessor expressions and in macro
arguments. llvm-svn: 111976
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 384edb4502b..117d3775c0e 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -278,7 +278,8 @@ void ASTUnit::CacheCodeCompletionResults() {
| (1 << (CodeCompletionContext::CCC_Statement - 1))
| (1 << (CodeCompletionContext::CCC_Expression - 1))
| (1 << (CodeCompletionContext::CCC_ObjCMessageReceiver - 1))
- | (1 << (CodeCompletionContext::CCC_MacroNameUse - 1));
+ | (1 << (CodeCompletionContext::CCC_MacroNameUse - 1))
+ | (1 << (CodeCompletionContext::CCC_PreprocessorExpression - 1));
CachedResult.Priority = Results[I].Priority;
CachedResult.Kind = Results[I].CursorKind;
@@ -1550,6 +1551,7 @@ void CalculateHiddenNames(const CodeCompletionContext &Context,
case CodeCompletionContext::CCC_ObjCProtocolName:
case CodeCompletionContext::CCC_MacroName:
case CodeCompletionContext::CCC_MacroNameUse:
+ case CodeCompletionContext::CCC_PreprocessorExpression:
// If we're just looking for protocol or macro names, nothing can hide them.
return;
}
OpenPOWER on IntegriCloud