diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 2 | ||||
-rw-r--r-- | clang/test/Sema/paren-list-expr-type.cpp | 17 | ||||
-rw-r--r-- | clang/test/SemaTemplate/nested-incomplete-class.cpp | 21 |
3 files changed, 22 insertions, 18 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp index bbdf489796b..6955219e7ae 100644 --- a/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp @@ -185,7 +185,7 @@ struct alignas(Types) TestUnexpandedDecls : T{ // expected-error{{expression con void test_initializers() { T copy_init = static_cast<Types>(0); // expected-error{{initializer contains unexpanded parameter pack 'Types'}} - T direct_init(0, static_cast<Types>(0)); // expected-error{{expression contains unexpanded parameter pack 'Types'}} + T direct_init(0, static_cast<Types>(0)); // expected-error{{initializer contains unexpanded parameter pack 'Types'}} T list_init = { static_cast<Types>(0) }; // expected-error{{initializer contains unexpanded parameter pack 'Types'}} } diff --git a/clang/test/Sema/paren-list-expr-type.cpp b/clang/test/Sema/paren-list-expr-type.cpp deleted file mode 100644 index ad5b7fbf918..00000000000 --- a/clang/test/Sema/paren-list-expr-type.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %clang -cc1 -ast-dump %s | not grep NULL -// Makes sure that we don't introduce null types when handling -// ParenListExpr. - -template<typename T> class X { void f() { X x(*this); } }; - -template<typename T> class Y { Y() : t(1) {} T t; }; - -template<typename T> class Z { Z() : b(true) {} const bool b; }; - -template<typename T> class A : public Z<T> { A() : Z<T>() {} }; - -class C {}; -template<typename T> class D : public C { D(): C() {} }; - -void f() { (int)(1, 2); } - diff --git a/clang/test/SemaTemplate/nested-incomplete-class.cpp b/clang/test/SemaTemplate/nested-incomplete-class.cpp new file mode 100644 index 00000000000..a4bfccb8d27 --- /dev/null +++ b/clang/test/SemaTemplate/nested-incomplete-class.cpp @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -fsyntax-only %s + +template <typename T> +struct foo { + struct bar; + + bar fn() { + // Should not get errors about bar being incomplete here. + bar b = bar(1, 2); + return b; + } +}; + +template <typename T> +struct foo<T>::bar { + bar(int, int); +}; + +void fn() { + foo<int>().fn(); +} |