aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-20 01:42:53 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-20 01:42:53 +0000
commit3609432178ae63977d575065509238ca2fedf455 (patch)
treef880a39ffe3ef6186a287ada063322b036fadf86
parentd764d6567ca56d23efc2d63b62b156c415fe5fae (diff)
Revert r101841 and follow-up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101859 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExprCXX.cpp7
-rw-r--r--test/CXX/expr/expr.unary/expr.new/p19.cpp2
-rw-r--r--test/CXX/expr/expr.unary/expr.new/p20-0x.cpp2
-rw-r--r--test/CXX/expr/expr.unary/expr.new/p20.cpp2
-rw-r--r--test/SemaCXX/no-exceptions.cpp21
5 files changed, 3 insertions, 31 deletions
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();
- }
-}