From d6f9e73527fb48ade3580f45e03c4590defbf109 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 13 May 2014 19:56:21 +0000 Subject: 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 --- clang/test/SemaCXX/cxx0x-initializer-constructor.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp') 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, 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; +} -- cgit v1.2.3