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 | 52779fb71795534d0447f6f4d4a6f6a7b09c4639 (patch) | |
tree | ebe30da1c1eb36ba1ff4e70e688ff2711efc11df /include/clang/Sema/CodeCompleteConsumer.h | |
parent | b17cc9e904c277b97cc4d57227122acd8d46ed36 (diff) |
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index 85f3c91649..d43a077802 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -146,7 +146,7 @@ class Sema; class CodeCompletionContext { public: enum Kind { - /// \brief An unspecified code-completion context. + /// \brief An unspecified code-completion context, where the CCC_Other, /// \brief Code completion occurred within a "top-level" completion context, /// e.g., at namespace or global scope. @@ -220,7 +220,10 @@ public: CCC_TypeQualifiers, /// \brief Code completion in a parenthesized expression, which means that /// we may also have types here in C and Objective-C (as well as in C++). - CCC_ParenthesizedExpression + CCC_ParenthesizedExpression, + /// \brief An unknown context, in which we are recovering from a parsing + /// error and don't know which completions we should give. + CCC_Recovery }; private: |