forked from OSchip/llvm-project
Allow -parse-noop -verify options to be used together.
llvm-svn: 52249
This commit is contained in:
parent
ed169d531d
commit
351008da17
|
@ -229,7 +229,11 @@ bool clang::CheckASTConsumer(Preprocessor &PP, ASTConsumer* C) {
|
|||
|
||||
// Parse the AST and run the consumer, ultimately deleting C.
|
||||
ParseAST(PP, C);
|
||||
|
||||
return CheckDiagnostics(PP);
|
||||
}
|
||||
|
||||
/// CheckDiagnostics - Gather the expected diagnostics and check them.
|
||||
bool clang::CheckDiagnostics(Preprocessor &PP) {
|
||||
// Gather the set of expected diagnostics.
|
||||
DiagList ExpectedErrors, ExpectedWarnings;
|
||||
FindExpectedDiags(PP, ExpectedErrors, ExpectedWarnings);
|
||||
|
|
|
@ -1134,6 +1134,9 @@ static void ParseFile(Preprocessor &PP, MinimalAction *PA) {
|
|||
// Parsing the specified input file.
|
||||
P.ParseTranslationUnit();
|
||||
delete PA;
|
||||
|
||||
if (VerifyDiagnostics)
|
||||
exit(CheckDiagnostics(PP));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -43,6 +43,9 @@ void EmitLLVMFromASTs(Preprocessor &PP, bool PrintStats);
|
|||
/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
|
||||
bool CheckASTConsumer(Preprocessor &PP, ASTConsumer* C);
|
||||
|
||||
/// CheckDiagnostics - Gather the expected diagnostics and check them.
|
||||
bool CheckDiagnostics(Preprocessor &PP);
|
||||
|
||||
|
||||
} // end namespace clang
|
||||
|
||||
|
|
Loading…
Reference in New Issue