summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/default-expr-arguments.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-04 15:04:32 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-04 15:04:32 +0000
commitb6d5e15aae202f157c6cd63da8fa4b089e7b31e9 (patch)
tree59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/SemaTemplate/default-expr-arguments.cpp
parent5563df30b9c8d1fe87a54baae0d6bd86642563f4 (diff)
downloadFreeBSD-src-b6d5e15aae202f157c6cd63da8fa4b089e7b31e9.zip
FreeBSD-src-b6d5e15aae202f157c6cd63da8fa4b089e7b31e9.tar.gz
Update clang to r86025.
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r--test/SemaTemplate/default-expr-arguments.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index 575283e..9c0f1ec 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -84,3 +84,27 @@ struct X1 {
void test_X1() {
X1<int> x1;
}
+
+// PR5283
+namespace PR5283 {
+template<typename T> struct A {
+ A(T = 1); // expected-error 3 {{incompatible type initializing 'int', expected 'int *'}}
+};
+
+struct B : A<int*> {
+ B();
+};
+B::B() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}}
+
+struct C : virtual A<int*> {
+ C();
+};
+C::C() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}}
+
+struct D {
+ D();
+
+ A<int*> a;
+};
+D::D() { } // expected-note {{in instantiation of default function argument expression for 'A<int *>' required he}}
+}
OpenPOWER on IntegriCloud