[cfe-commits] r67964 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/namespace-alias.cpp
Anders Carlsson
andersca at mac.com
Sat Mar 28 16:49:36 PDT 2009
Author: andersca
Date: Sat Mar 28 18:49:35 2009
New Revision: 67964
URL: http://llvm.org/viewvc/llvm-project?rev=67964&view=rev
Log:
Fix lookup bug
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/SemaCXX/namespace-alias.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=67964&r1=67963&r2=67964&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Mar 28 18:49:35 2009
@@ -1685,7 +1685,7 @@
IdentifierInfo *Ident) {
// Check if we have a previous declaration with the same name.
- if (NamedDecl *PrevDecl = LookupName(S, Alias, LookupOrdinaryName)) {
+ if (NamedDecl *PrevDecl = LookupName(S, Alias, LookupOrdinaryName, true)) {
// FIXME: If this is a namespace alias decl, and it points to the same
// namespace, we shouldn't warn.
unsigned DiagID = isa<NamespaceDecl>(PrevDecl) ? diag::err_redefinition :
Modified: cfe/trunk/test/SemaCXX/namespace-alias.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/namespace-alias.cpp?rev=67964&r1=67963&r2=67964&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/namespace-alias.cpp (original)
+++ cfe/trunk/test/SemaCXX/namespace-alias.cpp Sat Mar 28 18:49:35 2009
@@ -21,3 +21,7 @@
using namespace A;
namespace D = B; // expected-error {{reference to 'B' is ambiguous}}
}
+
+namespace G {
+ namespace B = N;
+}
More information about the cfe-commits
mailing list