summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/derived.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaTemplate/derived.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaTemplate/derived.cpp')
-rw-r--r--test/SemaTemplate/derived.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/derived.cpp b/test/SemaTemplate/derived.cpp
index 7b91f9a..ce20cea 100644
--- a/test/SemaTemplate/derived.cpp
+++ b/test/SemaTemplate/derived.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
template<typename T> class vector2 {};
template<typename T> class vector : vector2<T> {};
@@ -28,3 +29,26 @@ namespace rdar13267210 {
}
};
}
+
+namespace PR16292 {
+ class IncompleteClass; // expected-note{{forward declaration}}
+ class BaseClass {
+ IncompleteClass Foo; // expected-error{{field has incomplete type}}
+ };
+ template<class T> class DerivedClass : public BaseClass {};
+ void* p = new DerivedClass<void>;
+}
+
+namespace rdar14183893 {
+ class Typ { // expected-note {{not complete}}
+ Typ x; // expected-error {{incomplete type}}
+ };
+
+ template <unsigned C> class B : Typ {};
+ typedef B<0> TFP;
+
+ class A {
+ TFP m_p;
+ void Enable() { 0, A(); } // expected-warning {{unused}}
+ };
+}
OpenPOWER on IntegriCloud