aboutsummaryrefslogtreecommitdiff
path: root/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
commitb223d8c4266655fe7a9491a0aff0263597672823 (patch)
treebdc4e3242b73289bad16770ac851421bfcc643a6 /lib/Sema/SemaCodeComplete.cpp
parent8398cbfc73f7ff0a676232db9ea9160bb9dafd8d (diff)
When providing code completions for a switch over a scoped enumeration
type, be sure to add the qualifier for the enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index f20558c201..0d5413a936 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/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.