summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp10
-rw-r--r--clang/test/SemaCXX/PR9461.cpp6
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp12
3 files changed, 25 insertions, 3 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
index 71e6927b20e..9414a128832 100644
--- a/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp
@@ -91,6 +91,16 @@ struct X {
X() : member()... { } // expected-error{{pack expansion for initialization of member 'member'}}
};
+// There was a bug in the delayed parsing code for the
+// following case.
+template<typename ...T>
+struct DelayedParseTest : T...
+{
+ int a;
+ DelayedParseTest(T... i) : T{i}..., a{10} {}
+};
+
+
// In a template-argument-list (14.3); the pattern is a template-argument.
template<typename ...Types>
struct tuple_of_refs {
diff --git a/clang/test/SemaCXX/PR9461.cpp b/clang/test/SemaCXX/PR9461.cpp
index ce17931324e..beed348abb7 100644
--- a/clang/test/SemaCXX/PR9461.cpp
+++ b/clang/test/SemaCXX/PR9461.cpp
@@ -26,7 +26,7 @@ basic_string<_CharT,_Traits,_Alloc>::basic_string(const _CharT*,const _Alloc&)
:us(_S_construct)
{string a;}
-struct runtime_error{runtime_error(string);}; // expected-note 2 {{candidate constructor}}
+struct runtime_error{runtime_error(string);};
-struct system_error:runtime_error{ // expected-note {{to match}} expected-note {{specified here}}
-system_error():time_error("" // expected-error 4 {{expected}} expected-error {{initializer}} expected-note {{to match}} expected-error {{no matching constructor}}
+struct system_error:runtime_error{ // expected-note {{to match}}
+system_error():time_error("" // expected-error 3 {{expected}} expected-note {{to match}}
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index c6bcad2c098..e8b7f0b6760 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -268,3 +268,15 @@ struct S4 {
};
}
+
+namespace PR12049 {
+ int function();
+
+ class Class
+ {
+ public:
+ Class() : member(function() {} // expected-note {{to match this '('}}
+
+ int member; // expected-error {{expected ')'}}
+ };
+}
OpenPOWER on IntegriCloud