From 0012dd4846953cabbf5fe00ad13d61b1f5a3cc08 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 16 Jun 2013 05:11:56 +0000 Subject: [PATCH] Add testcase for DR39 from PR5916. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184056 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/drs/dr0xx.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/CXX/drs/dr0xx.cpp b/test/CXX/drs/dr0xx.cpp index e1d22211ff..5a65fca841 100644 --- a/test/CXX/drs/dr0xx.cpp +++ b/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 -- 2.40.0