diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-23 23:01:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-23 23:01:17 +0000 |
commit | 0ac41389a4401daafa350d42d65ad4eb90ed61f0 (patch) | |
tree | 25bc879f7e9db70e277fbb6a965fd73e20a5d11e /clang/lib/Sema/CodeCompleteConsumer.cpp | |
parent | bd57e0ce3dd39b5e658298000adf7446b9796487 (diff) | |
download | bcm5719-llvm-0ac41389a4401daafa350d42d65ad4eb90ed61f0.tar.gz bcm5719-llvm-0ac41389a4401daafa350d42d65ad4eb90ed61f0.zip |
Synchronize globally-cached code completion results with the results
provided when the optimization is disabled. In particular, split
the completion context CCC_Other into two contexts: CCC_Other, which
means that it's an undisclosed context for which any other results are
unwelcome, and CCC_Recovery, which is used in recovery cases.
Since we're now using the completion context within the completion
results builder, make sure that it's always set to something.
Fixes <rdar://problem/8470644>.
llvm-svn: 114704
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | clang/lib/Sema/CodeCompleteConsumer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index e298d23aa0c..5c95324f4eb 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -33,7 +33,7 @@ using llvm::StringRef; bool CodeCompletionContext::wantConstructorResults() const { switch (Kind) { - case CCC_Other: + case CCC_Recovery: case CCC_Statement: case CCC_Expression: case CCC_ObjCMessageReceiver: @@ -61,6 +61,7 @@ bool CodeCompletionContext::wantConstructorResults() const { case CCC_NaturalLanguage: case CCC_SelectorName: case CCC_TypeQualifiers: + case CCC_Other: return false; } |