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)
llvm-svn: 184795

clang/lib/Sema/SemaExceptionSpec.cpp

index 7ed32b8..919d106 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);