From 0d21046a7e01cfb3f96f404e2b24ef7ddd017f63 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Jun 2007 05:10:07 +0000 Subject: [PATCH] Remove dead code. llvm-svn: 39705 --- clang/Driver/DiagChecker.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/clang/Driver/DiagChecker.cpp b/clang/Driver/DiagChecker.cpp index 9524232d5b20..58ab40361ba2 100644 --- a/clang/Driver/DiagChecker.cpp +++ b/clang/Driver/DiagChecker.cpp @@ -42,7 +42,6 @@ static const char * const ExpectedWarnStr = "expected-warning"; /// diagnostics. If so, then put them in a diagnostic list. /// static void FindDiagnostics(const std::string &Comment, - const TextDiagnosticBuffer &DiagClient, DiagList &ExpectedDiags, SourceManager &SourceMgr, SourceLocation Pos, @@ -86,8 +85,7 @@ static void FindDiagnostics(const std::string &Comment, /// called later to report any discrepencies between the diagnostics expected /// and those actually seen. /// -static void ProcessFileDiagnosticChecking(const TextDiagnosticBuffer&DiagClient, - Preprocessor &PP, +static void ProcessFileDiagnosticChecking(Preprocessor &PP, unsigned MainFileID, DiagList &ExpectedErrors, DiagList &ExpectedWarnings) { @@ -105,12 +103,12 @@ static void ProcessFileDiagnosticChecking(const TextDiagnosticBuffer&DiagClient, std::string Comment = PP.getSpelling(Tok); // Find all expected errors - FindDiagnostics(Comment, DiagClient, ExpectedErrors,PP.getSourceManager(), + FindDiagnostics(Comment, ExpectedErrors,PP.getSourceManager(), Tok.getLocation(), ExpectedErrStr); // Find all expected warnings - FindDiagnostics(Comment, DiagClient, ExpectedWarnings, - PP.getSourceManager(),Tok.getLocation(), ExpectedWarnStr); + FindDiagnostics(Comment, ExpectedWarnings, PP.getSourceManager(), + Tok.getLocation(), ExpectedWarnStr); } } while (Tok.getKind() != tok::eof); @@ -223,14 +221,13 @@ static bool ReportCheckingResults(const TextDiagnosticBuffer &DiagClient, /// CheckDiagnostics - Implement the -parse-ast-check diagnostic verifier. bool clang::CheckDiagnostics(Preprocessor &PP, unsigned MainFileID) { - const TextDiagnosticBuffer &Diags = - static_cast(PP.getDiagnostics().getClient()); - // Gather the set of expected diagnostics. DiagList ExpectedErrors, ExpectedWarnings; - ProcessFileDiagnosticChecking(Diags, PP, MainFileID, ExpectedErrors, + ProcessFileDiagnosticChecking(PP, MainFileID, ExpectedErrors, ExpectedWarnings); + const TextDiagnosticBuffer &Diags = + static_cast(PP.getDiagnostics().getClient()); return ReportCheckingResults(Diags, ExpectedErrors, ExpectedWarnings, PP.getSourceManager());