diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/CXX/temp/temp.decls | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/CXX/temp/temp.decls')
-rw-r--r-- | test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 9 | ||||
-rw-r--r-- | test/CXX/temp/temp.decls/temp.variadic/p5.mm | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp index 726e222..9453798 100644 --- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp @@ -351,6 +351,15 @@ void test_unexpanded_exprs(Types ...values) { // FIXME: Objective-C expressions will need to go elsewhere for (auto t : values) { } // expected-error{{expression contains unexpanded parameter pack 'values'}} + + switch (values) { } // expected-error{{expression contains unexpanded parameter pack 'values'}} + + do { } while (values); // expected-error{{expression contains unexpanded parameter pack 'values'}} + +test: + goto *values; // expected-error{{expression contains unexpanded parameter pack 'values'}} + + void f(int arg = values); // expected-error{{default argument contains unexpanded parameter pack 'values'}} } // Test unexpanded parameter packs in partial specializations. diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.mm b/test/CXX/temp/temp.decls/temp.variadic/p5.mm new file mode 100644 index 0000000..d059826 --- /dev/null +++ b/test/CXX/temp/temp.decls/temp.variadic/p5.mm @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fobjc-exceptions -fexceptions -std=c++11 -fblocks -fsyntax-only -verify %s + +template<typename...Types> +void f(Types ...values) { + for (id x in values) { } // expected-error {{expression contains unexpanded parameter pack 'values'}} + @synchronized(values) { // expected-error {{expression contains unexpanded parameter pack 'values'}} + @throw values; // expected-error {{expression contains unexpanded parameter pack 'values'}} + } +} |