]> granicus.if.org Git - clang/commitdiff
Add testcase for DR39 from PR5916.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 16 Jun 2013 05:11:56 +0000 (05:11 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 16 Jun 2013 05:11:56 +0000 (05:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184056 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/drs/dr0xx.cpp

index e1d22211ff8db9d9486568f78b4d8ab2dfa34931..5a65fca8415779182fc4b21ca114d3245e8b3e43 100644 (file)
@@ -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