diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-18 02:43:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-18 02:43:19 +0000 |
commit | f333f8c40df86381db23105973587bcfdbca97a5 (patch) | |
tree | a353fd0f839d032526df4cb0a1695e62f537c461 /clang/test/SemaTemplate/instantiate-expr-1.cpp | |
parent | 050d261ec7bb2057b007b06ac9bd2ffc541cb0f5 (diff) | |
download | bcm5719-llvm-f333f8c40df86381db23105973587bcfdbca97a5.tar.gz bcm5719-llvm-f333f8c40df86381db23105973587bcfdbca97a5.zip |
When transforming the arguments for a C++ "new" expression, make sure
to drop the implicitly-generated value initialization expression used
for initializing scalars. Fixes <rdar://problem/10283928>.
llvm-svn: 142330
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-expr-1.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-1.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-1.cpp b/clang/test/SemaTemplate/instantiate-expr-1.cpp index 896437488d6..08f5e9d9a7f 100644 --- a/clang/test/SemaTemplate/instantiate-expr-1.cpp +++ b/clang/test/SemaTemplate/instantiate-expr-1.cpp @@ -167,8 +167,15 @@ namespace PR6424 { new X(); // expected-note{{instantiation of}} } }; - + template void Y2<3>::f(); + + template<typename T> + void rdar10283928(int count) { + (void)new char[count](); + } + + template void rdar10283928<int>(int); } namespace PR10864 { |