From 3609432178ae63977d575065509238ca2fedf455 Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 20 Apr 2010 01:42:53 +0000 Subject: [PATCH] Revert r101841 and follow-up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101859 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExprCXX.cpp | 7 ------- test/CXX/expr/expr.unary/expr.new/p19.cpp | 2 +- test/CXX/expr/expr.unary/expr.new/p20-0x.cpp | 2 +- test/CXX/expr/expr.unary/expr.new/p20.cpp | 2 +- test/SemaCXX/no-exceptions.cpp | 21 -------------------- 5 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 test/SemaCXX/no-exceptions.cpp diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 605f280c4f..9440772fc6 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -886,13 +886,6 @@ bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, return true; } - // We don't need an operator delete if we're running under - // -fno-exceptions. - if (!getLangOptions().Exceptions) { - OperatorDelete = 0; - return false; - } - // FindAllocationOverload can change the passed in arguments, so we need to // copy them back. if (NumPlaceArgs > 0) diff --git a/test/CXX/expr/expr.unary/expr.new/p19.cpp b/test/CXX/expr/expr.unary/expr.new/p19.cpp index bb69fd55fd..6134779f1f 100644 --- a/test/CXX/expr/expr.unary/expr.new/p19.cpp +++ b/test/CXX/expr/expr.unary/expr.new/p19.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fexceptions %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef __SIZE_TYPE__ size_t; // Operator delete template for placement new with global lookup diff --git a/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp b/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp index 4c924b137c..c188e1e25e 100644 --- a/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp +++ b/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -fexceptions %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s typedef __SIZE_TYPE__ size_t; struct S { diff --git a/test/CXX/expr/expr.unary/expr.new/p20.cpp b/test/CXX/expr/expr.unary/expr.new/p20.cpp index 8cbe2b9be3..71e584e775 100644 --- a/test/CXX/expr/expr.unary/expr.new/p20.cpp +++ b/test/CXX/expr/expr.unary/expr.new/p20.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fexceptions %s +// RUN: %clang_cc1 -fsyntax-only -verify %s typedef __SIZE_TYPE__ size_t; // Overloaded operator delete with two arguments diff --git a/test/SemaCXX/no-exceptions.cpp b/test/SemaCXX/no-exceptions.cpp deleted file mode 100644 index 019e25c978..0000000000 --- a/test/SemaCXX/no-exceptions.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s - -// Various tests for -fno-exceptions - -typedef __SIZE_TYPE__ size_t; - -namespace test0 { - // rdar://problem/7878149 - class Foo { - public: - void* operator new(size_t x); - private: - void operator delete(void *x); - }; - - void test() { - // Under -fexceptions, this does access control for the associated - // 'operator delete'. - (void) new Foo(); - } -} -- 2.40.0