diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:06:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:06:57 +0000 |
commit | e39fe72df7da662c195ef4bcd542d58ec87d5422 (patch) | |
tree | cc449e5f1361af6e5b9d77a24c04b912772bcf9d /lib/Sema/SemaDecl.cpp | |
parent | c1a35d97d3b1e743c54350d80c62e0895f31b59d (diff) |
When looking up enumerator names for redeclaration, use the
ForRedeclaration flag so that we don't look into base classes.
Fixes PR6061.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 101cae84be..d2ac483db5 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6095,7 +6095,8 @@ Sema::DeclPtrTy Sema::ActOnEnumConstant(Scope *S, DeclPtrTy theEnumDecl, // Verify that there isn't already something declared with this name in this // scope. - NamedDecl *PrevDecl = LookupSingleName(S, Id, LookupOrdinaryName); + NamedDecl *PrevDecl = LookupSingleName(S, Id, LookupOrdinaryName, + ForRedeclaration); if (PrevDecl && PrevDecl->isTemplateParameter()) { // Maybe we will complain about the shadowed template parameter. DiagnoseTemplateParameterShadow(IdLoc, PrevDecl); |