diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-02-19 13:53:49 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-02-19 13:53:49 +0000 |
commit | 3289ab20e5e73f2cbd52bfa2c449ce1fb48bae6a (patch) | |
tree | f3f8d299a95686c1ccb124a7d1bfb9185879190f /clang/lib/Sema/CodeCompleteConsumer.cpp | |
parent | d6f903f05c8eaa5ad4f290f016daf84e06349901 (diff) | |
download | bcm5719-llvm-3289ab20e5e73f2cbd52bfa2c449ce1fb48bae6a.tar.gz bcm5719-llvm-3289ab20e5e73f2cbd52bfa2c449ce1fb48bae6a.zip |
[CodeComplete] Avoid name clashes of 'Kind' inside CodeCompletionContext. NFC
CodeCompletionContext had declarations of field and enum inside, both named 'Kind'.
It caused gcc 4.8 to give an incorrent warning when refering to enum as
`enum CodeCompletionContext::Kind`.
Avoid that warning by renaming the private field to CCKind.
llvm-svn: 325496
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | clang/lib/Sema/CodeCompleteConsumer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index 6a96e626d90..798e7d6a1c2 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -33,7 +33,7 @@ using namespace clang; //===----------------------------------------------------------------------===// bool CodeCompletionContext::wantConstructorResults() const { - switch (Kind) { + switch (CCKind) { case CCC_Recovery: case CCC_Statement: case CCC_Expression: @@ -76,8 +76,8 @@ bool CodeCompletionContext::wantConstructorResults() const { llvm_unreachable("Invalid CodeCompletionContext::Kind!"); } -StringRef clang::getCompletionKindString(enum CodeCompletionContext::Kind Kind) { - using CCKind = enum CodeCompletionContext::Kind; +StringRef clang::getCompletionKindString(CodeCompletionContext::Kind Kind) { + using CCKind = CodeCompletionContext::Kind; switch (Kind) { case CCKind::CCC_Other: return "Other"; |