summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-05-13 19:56:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-05-13 19:56:21 +0000
commitd6f9e73527fb48ade3580f45e03c4590defbf109 (patch)
tree1fe42912290b0562521f8997d58a7da2e41c8f9a /clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
parentaddf51ddde4f06a471b3c40ef8300d6c88919185 (diff)
downloadbcm5719-llvm-d6f9e73527fb48ade3580f45e03c4590defbf109.tar.gz
bcm5719-llvm-d6f9e73527fb48ade3580f45e03c4590defbf109.zip
PR19729: Delete a bunch of bogus code in Sema::FindAllocationOverload. This
caused us to perform copy-initialization for the parameters of an allocation function called by a new-expression multiple times, resulting in us rejecting allocations that passed non-copyable parameters (and much worse things in MSVC compat mode, where we potentially called this function multiple times). llvm-svn: 208724
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-constructor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
index dc179f81bd3..2b443fce781 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -fexceptions -verify %s
struct one { char c[1]; };
struct two { char c[2]; };
@@ -304,7 +304,6 @@ namespace init_list_default {
B b {}; // calls default constructor
}
-
// PR13470, <rdar://problem/11974632>
namespace PR13470 {
struct W {
@@ -365,3 +364,14 @@ namespace PR13470 {
yi.h(); // ok, all diagnostics produced in template definition
}
}
+
+namespace PR19729 {
+ struct A {
+ A(int);
+ A(const A&) = delete;
+ };
+ struct B {
+ void *operator new(std::size_t, A);
+ };
+ B *p = new ({123}) B;
+}
OpenPOWER on IntegriCloud