summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/default-expr-arguments.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-11-26 08:32:48 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-11-26 08:32:48 +0000
commitdd2ca571ae371469ffaaa898920572d34c1baa0a (patch)
treed8b4b966c604ff99e3c0b096de8e76d15924d592 /clang/test/SemaTemplate/default-expr-arguments.cpp
parentc1cf629e41313a5193e0cccee1c39c7c0e1207f7 (diff)
downloadbcm5719-llvm-dd2ca571ae371469ffaaa898920572d34c1baa0a.tar.gz
bcm5719-llvm-dd2ca571ae371469ffaaa898920572d34c1baa0a.zip
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
Diffstat (limited to 'clang/test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r--clang/test/SemaTemplate/default-expr-arguments.cpp7
1 files changed, 4 insertions, 3 deletions
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 <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 @@ namespace PR13758 {
};
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>();
}
}
OpenPOWER on IntegriCloud