Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".
Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.
Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index f1a5ea9..b5c1559 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -53,7 +53,6 @@
ParseASTPrint, // Parse ASTs and print them.
ParseASTDump, // Parse ASTs and dump them.
ParseASTView, // Parse ASTs and view them in Graphviz.
- ParseASTCheck, // Parse ASTs and check diagnostics.
BuildAST, // Parse ASTs.
ParseCFGDump, // Parse ASTS. Build CFGs. Print CFGs.
ParseCFGView, // Parse ASTS. Build CFGs. View CFGs.
@@ -93,8 +92,6 @@
"Run parser, build ASTs, then dump them"),
clEnumValN(ParseASTView, "parse-ast-view",
"Run parser, build ASTs, and view them with GraphViz."),
- clEnumValN(ParseASTCheck, "parse-ast-check",
- "Run parser, build ASTs, then check diagnostics"),
clEnumValN(ParseCFGDump, "dump-cfg",
"Run parser, then build and print CFGs."),
clEnumValN(ParseCFGView, "view-cfg",
@@ -809,7 +806,6 @@
ASTConsumer* Consumer = NULL;
bool ClearSourceMgr = false;
- bool PerformDiagnosticsCheck = VerifyDiagnostics;
switch (ProgAction) {
default:
@@ -853,8 +849,6 @@
ClearSourceMgr = true;
break;
- case ParseASTCheck:
- PerformDiagnosticsCheck = true;
case ParseSyntaxOnly: // -fsyntax-only
case BuildAST:
Consumer = new ASTConsumer();
@@ -895,7 +889,7 @@
}
if (Consumer) {
- if (PerformDiagnosticsCheck)
+ if (VerifyDiagnostics)
exit (CheckASTConsumer(PP, MainFileID, Consumer));
else
ParseAST(PP, MainFileID, *Consumer, Stats);
@@ -948,7 +942,7 @@
InitializeLanguageStandard(LangInfo);
std::auto_ptr<TextDiagnostics> DiagClient;
- if (ProgAction != ParseASTCheck) {
+ if (!VerifyDiagnostics) {
// Print diagnostics to stderr by default.
DiagClient.reset(new TextDiagnosticPrinter(SourceMgr));
} else {
@@ -957,7 +951,7 @@
if (InputFilenames.size() != 1) {
fprintf(stderr,
- "parse-ast-check only works on single input files for now.\n");
+ "-verify only works on single input files for now.\n");
return 1;
}
}