]> granicus.if.org Git - clang/commitdiff
Delete dead code.
authorEli Friedman <eli.friedman@gmail.com>
Tue, 25 Jun 2013 00:25:19 +0000 (00:25 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 25 Jun 2013 00:25:19 +0000 (00:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184795 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExceptionSpec.cpp

index 7ed32b89e3dc6b4767d1c57e2c4bf5e6f81a3604..919d106e24b200dac972a2fb1ba7282dc9d9dc7f 100644 (file)
@@ -229,23 +229,6 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) {
                                                NewProto->getArgTypes(), EPI);
     New->setType(NewType);
 
-    // If exceptions are disabled, suppress the warning about missing
-    // exception specifications for new and delete operators.
-    if (!getLangOpts().CXXExceptions) {
-      switch (New->getDeclName().getCXXOverloadedOperator()) {
-      case OO_New:
-      case OO_Array_New:
-      case OO_Delete:
-      case OO_Array_Delete:
-        if (New->getDeclContext()->isTranslationUnit())
-          return false;
-        break;
-
-      default:
-        break;
-      }
-    } 
-
     // Warn about the lack of exception specification.
     SmallString<128> ExceptionSpecString;
     llvm::raw_svector_ostream OS(ExceptionSpecString);