r184056 - Add testcase for DR39 from PR5916.

Richard Smith richard-llvm at metafoo.co.uk
Sat Jun 15 22:11:56 PDT 2013


Author: rsmith
Date: Sun Jun 16 00:11:56 2013
New Revision: 184056

URL: http://llvm.org/viewvc/llvm-project?rev=184056&view=rev
Log:
Add testcase for DR39 from PR5916.

Modified:
    cfe/trunk/test/CXX/drs/dr0xx.cpp

Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr0xx.cpp?rev=184056&r1=184055&r2=184056&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr0xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr0xx.cpp Sun Jun 16 00:11:56 2013
@@ -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





More information about the cfe-commits mailing list