diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-18 23:30:37 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-18 23:30:37 +0000 |
commit | 5c722c7020b33da57090422b854072258a50b3f0 (patch) | |
tree | 48ef82316f6c7edebee531d1e1fba40da6bec767 /include/clang/Sema/CodeCompleteConsumer.h | |
parent | 4a4e2efb908b17e79d95b5b4fccf58b4cd1dddb1 (diff) |
When code-completing a case statement for a switch on a value of
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index 2838c19b72..882440b78c 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -36,6 +36,9 @@ enum { /// \brief Priority for the next initialization in a constructor initializer /// list. CCP_NextInitializer = 7, + /// \brief Priority for an enumeration constant inside a switch whose + /// condition is of the enumeration type. + CCP_EnumInCase = 7, /// \brief Priority for a send-to-super completion. CCP_SuperCompletion = 20, /// \brief Priority for a declaration that is in the local scope. @@ -153,6 +156,9 @@ public: enum Kind { /// \brief An unspecified code-completion context. CCC_Other, + /// \brief An unspecified code-completion context where we should also add + /// macro completions. + CCC_OtherWithMacros, /// \brief Code completion occurred within a "top-level" completion context, /// e.g., at namespace or global scope. CCC_TopLevel, |