}
-/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
-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.
///
static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
const std::string &InFile, ProgActions PA) {
-
llvm::OwningPtr<ASTConsumer> Consumer;
bool ClearSourceMgr = false;
break;
}
- if (Consumer) {
- if (VerifyDiagnostics)
- exit(CheckASTConsumer(PP, Consumer.get()));
-
+ if (Consumer)
ParseAST(PP, Consumer.get(), Stats, !DisableFree);
- } else {
- if (VerifyDiagnostics)
- exit(CheckDiagnostics(PP));
- }
+
+ if (VerifyDiagnostics)
+ exit(CheckDiagnostics(PP));
if (Stats) {
fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str());
/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
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);