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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168582 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index 4e76a5a..14b072a 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -306,7 +306,7 @@
namespace PR13758 {
template <typename T> struct move_from {
- T invalid; // expected-error {{field has incomplete type 'void'}}
+ T invalid;
};
template <class K>
struct unordered_map {
@@ -315,9 +315,10 @@
};
template<typename T>
void StripedHashTable() {
- new unordered_map<void>(); // expected-note {{in instantiation of template class 'PR13758::move_from<void>' requested here}}
+ new unordered_map<void>();
+ new unordered_map<void>;
}
void tt() {
- StripedHashTable<int>(); // expected-note {{in instantiation of function template specialization 'PR13758::StripedHashTable<int>' requested here}}
+ StripedHashTable<int>();
}
}