summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/class-template-ctor-initializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/class-template-ctor-initializer.cpp')
-rw-r--r--test/SemaTemplate/class-template-ctor-initializer.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-ctor-initializer.cpp b/test/SemaTemplate/class-template-ctor-initializer.cpp
index 44bb4bda791e..6043327b7bab 100644
--- a/test/SemaTemplate/class-template-ctor-initializer.cpp
+++ b/test/SemaTemplate/class-template-ctor-initializer.cpp
@@ -53,3 +53,20 @@ namespace PR7259 {
return 0;
}
}
+
+namespace NonDependentError {
+ struct Base { Base(int); }; // expected-note 2{{candidate}}
+
+ template<typename T>
+ struct Derived1 : Base {
+ Derived1() : Base(1, 2) {} // expected-error {{no matching constructor}}
+ };
+
+ template<typename T>
+ struct Derived2 : Base {
+ Derived2() : BaseClass(1) {} // expected-error {{does not name a non-static data member or base}}
+ };
+
+ Derived1<void> d1;
+ Derived2<void> d2;
+}