[cfe-commits] r61886 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/qualified-id-lookup.cpp
Douglas Gregor
dgregor at apple.com
Wed Jan 7 13:36:02 PST 2009
Author: dgregor
Date: Wed Jan 7 15:36:02 2009
New Revision: 61886
URL: http://llvm.org/viewvc/llvm-project?rev=61886&view=rev
Log:
Fix PR clang/3291
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/SemaCXX/qualified-id-lookup.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=61886&r1=61885&r2=61886&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jan 7 15:36:02 2009
@@ -343,11 +343,11 @@
}
}
+ if (!LookInParent && !Ctx->isTransparentContext())
+ return 0;
+
Ctx = Ctx->getParent();
}
-
- if (!LookInParent && !Ctx->isTransparentContext())
- return 0;
}
}
Modified: cfe/trunk/test/SemaCXX/qualified-id-lookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/qualified-id-lookup.cpp?rev=61886&r1=61885&r2=61886&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/qualified-id-lookup.cpp (original)
+++ cfe/trunk/test/SemaCXX/qualified-id-lookup.cpp Wed Jan 7 15:36:02 2009
@@ -1,5 +1,4 @@
// RUN: clang -fsyntax-only -verify %s
-
namespace Ns {
int f(); // expected-note{{previous declaration is here}}
@@ -71,5 +70,18 @@
}
}
+// PR clang/3291
+namespace a {
+ namespace a { // A1
+ namespace a { // A2
+ int i;
+ }
+ }
+}
+void test_a() {
+ a::a::i = 3; // expected-error{{no member named 'i'}}
+ a::a::a::i = 4;
+}
+
More information about the cfe-commits
mailing list