From dd2ca571ae371469ffaaa898920572d34c1baa0a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 26 Nov 2012 08:32:48 +0000 Subject: PR14428: When instantiating a 'new' expression, if we had a non-dependent initialization, don't rebuild it. Remove a couple of hacks which were trying to work around this. Fix the special case for one-argument CXXConstructExprs to not apply if the one argument is a default argument. llvm-svn: 168582 --- clang/test/SemaTemplate/default-expr-arguments.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/test') diff --git a/clang/test/SemaTemplate/default-expr-arguments.cpp b/clang/test/SemaTemplate/default-expr-arguments.cpp index 4e76a5a04c8..14b072a1a5e 100644 --- a/clang/test/SemaTemplate/default-expr-arguments.cpp +++ b/clang/test/SemaTemplate/default-expr-arguments.cpp @@ -306,7 +306,7 @@ namespace PR12581 { namespace PR13758 { template struct move_from { - T invalid; // expected-error {{field has incomplete type 'void'}} + T invalid; }; template struct unordered_map { @@ -315,9 +315,10 @@ namespace PR13758 { }; template void StripedHashTable() { - new unordered_map(); // expected-note {{in instantiation of template class 'PR13758::move_from' requested here}} + new unordered_map(); + new unordered_map; } void tt() { - StripedHashTable(); // expected-note {{in instantiation of function template specialization 'PR13758::StripedHashTable' requested here}} + StripedHashTable(); } } -- cgit v1.2.3