]> granicus.if.org Git - clang/commitdiff
Revert r101841 and follow-up.
authorJohn McCall <rjmccall@apple.com>
Tue, 20 Apr 2010 01:42:53 +0000 (01:42 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 20 Apr 2010 01:42:53 +0000 (01:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101859 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprCXX.cpp
test/CXX/expr/expr.unary/expr.new/p19.cpp
test/CXX/expr/expr.unary/expr.new/p20-0x.cpp
test/CXX/expr/expr.unary/expr.new/p20.cpp
test/SemaCXX/no-exceptions.cpp [deleted file]

index 605f280c4fdbb1253c336d8ce8d163203110d9c1..9440772fc6e43eb1c4dc276e427b256844983310 100644 (file)
@@ -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)
index bb69fd55fd8034abbb1abc83c4d66aa3b0583fc4..6134779f1fd22f96057e135373b7a5df3951f678 100644 (file)
@@ -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
index 4c924b137ccdfe38dd31791d0f3aa5b30167910a..c188e1e25e04eb484ec38648959601d155c0210a 100644 (file)
@@ -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 {
index 8cbe2b9be3be72b6c5b251a47a3e7cbecd0f85ba..71e584e775c3f5c640c7f8b640408e6c5208504c 100644 (file)
@@ -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 (file)
index 019e25c..0000000
+++ /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();
-  }
-}