Added "CheckASTConsumer", a function that generalizes
"CheckDiagnostics" (used for -parse-ast-check) to check the
diagnostics of any ASTConsumer.
Reimplemented CheckDiagnostics to use CheckASTConsumer instead.
Added driver option -warn-dead-stores-check, which checks the
diagnostics generated by the DeadStores checker. This is implemented
using CheckASTConsumer.111
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42310 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.h b/Driver/clang.h
index 06d4963..69b8443 100644
--- a/Driver/clang.h
+++ b/Driver/clang.h
@@ -14,12 +14,15 @@
#ifndef LLVM_CLANG_CLANG_H
#define LLVM_CLANG_CLANG_H
+#include <memory>
+
namespace clang {
class Preprocessor;
struct LangOptions;
class MinimalAction;
class TargetInfo;
class Diagnostic;
+class ASTConsumer;
/// DoPrintPreprocessedInput - Implement -E mode.
void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP,
@@ -39,6 +42,10 @@
/// CheckDiagnostics - Implement the -parse-ast-check diagnostic verifier.
bool CheckDiagnostics(Preprocessor &PP, unsigned MainFileID);
+
+/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
+bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID,
+ std::auto_ptr<ASTConsumer> C);
} // end namespace clang