move unsupported warning into a centralized place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44502 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGStmt.cpp b/CodeGen/CGStmt.cpp
index d41d2de..40cdcd3 100644
--- a/CodeGen/CGStmt.cpp
+++ b/CodeGen/CGStmt.cpp
@@ -19,9 +19,6 @@
using namespace clang;
using namespace CodeGen;
-#include "clang/Basic/Diagnostic.h"
-#include "CodeGenModule.h"
-
//===----------------------------------------------------------------------===//
// Statement Emission
//===----------------------------------------------------------------------===//
@@ -41,11 +38,7 @@
else
EmitAggExpr(E, 0, false);
} else {
-
- unsigned DiagID = CGM.getDiags().getCustomDiagID(Diagnostic::Warning,
- "cannot codegen this yet");
- SourceRange Range = S->getSourceRange();
- CGM.getDiags().Report(S->getLocStart(), DiagID, 0, 0, &Range, 1);
+ WarnUnsupported(S);
}
break;
case Stmt::NullStmtClass: break;