summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-06-16 05:11:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-06-16 05:11:56 +0000
commitd9576c94841a744069e38649a9d26f7f819d7d38 (patch)
tree3836d82cabfbf671d9ec45cf4e2de2f88f523ea9 /clang
parenta42a4738935cd56c2426162f3f744dad1efa20da (diff)
downloadbcm5719-llvm-d9576c94841a744069e38649a9d26f7f819d7d38.tar.gz
bcm5719-llvm-d9576c94841a744069e38649a9d26f7f819d7d38.zip
Add testcase for DR39 from PR5916.
llvm-svn: 184056
Diffstat (limited to 'clang')
-rw-r--r--clang/test/CXX/drs/dr0xx.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp
index e1d22211ff8..5a65fca8415 100644
--- a/clang/test/CXX/drs/dr0xx.cpp
+++ b/clang/test/CXX/drs/dr0xx.cpp
@@ -412,6 +412,18 @@ namespace dr39 { // dr39: no
struct C : A {};
struct D : B, C { int f() { return n; } }; // expected-error {{found in multiple base-class}}
}
+
+ namespace PR5916 {
+ // FIXME: This is valid.
+ struct A { int n; }; // expected-note +{{found}}
+ struct B : A {};
+ struct C : A {};
+ struct D : B, C {};
+ int k = sizeof(D::n); // expected-error {{found in multiple base}} expected-error {{unknown type name}}
+#if __cplusplus >= 201103L
+ decltype(D::n) n; // expected-error {{found in multiple base}}
+#endif
+ }
}
// dr40: na
OpenPOWER on IntegriCloud