summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-01 05:02:47 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-01 05:02:47 +0000
commitd3cebdba411bb55d08d687fdc181b21403beb629 (patch)
tree3b2611cb8a5f750aae3e5b113e5c0090ae14064c /clang/lib/Sema/SemaCodeComplete.cpp
parent17c981a45b605af8d71041cd4435fbafa17aadad (diff)
downloadbcm5719-llvm-d3cebdba411bb55d08d687fdc181b21403beb629.tar.gz
bcm5719-llvm-d3cebdba411bb55d08d687fdc181b21403beb629.zip
When providing code completions for a switch over a scoped enumeration
type, be sure to add the qualifier for the enumeration type. llvm-svn: 149471
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index f20558c201f..0d5413a936b 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -3637,10 +3637,7 @@ void Sema::CodeCompleteCase(Scope *S) {
// If there are no prior enumerators in C++, check whether we have to
// qualify the names of the enumerators that we suggest, because they
// may not be visible in this scope.
- Qualifier = getRequiredQualification(Context, CurContext,
- Enum->getDeclContext());
-
- // FIXME: Scoped enums need to start with "EnumDecl" as the context!
+ Qualifier = getRequiredQualification(Context, CurContext, Enum);
}
// Add any enumerators that have not yet been mentioned.
OpenPOWER on IntegriCloud