summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-19 18:01:13 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-11-19 18:01:13 +0000
commit0d09c4944e448958ab1ff1941948777805df95e7 (patch)
tree6b5c36f3ade69e225924258059cf95b0dfbc6615 /clang/test/SemaCXX/nested-name-spec.cpp
parentef5e6934cb38f616938a448bd31868c19edafd71 (diff)
downloadbcm5719-llvm-0d09c4944e448958ab1ff1941948777805df95e7.tar.gz
bcm5719-llvm-0d09c4944e448958ab1ff1941948777805df95e7.zip
Take care another assert:
struct A { struct B; }; struct A::B { void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one." }; Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g: namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' // getLexicalParent() == translation unit llvm-svn: 59650
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index b22d8dc3d4d..18cb3b418a6 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -45,12 +45,19 @@ struct A::undef; // expected-error {{'undef' does not name a tag member in the s
namespace A2 {
typedef int INT;
struct RC;
+ struct CC {
+ struct NC;
+ };
}
struct A2::RC {
INT x;
};
+struct A2::CC::NC {
+ void m() {}
+};
+
void f3() {
N::x = 0; // expected-error {{use of undeclared identifier 'N'}}
int N;
OpenPOWER on IntegriCloud