[cfe-commits] r39705 - /cfe/cfe/trunk/Driver/DiagChecker.cpp
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:47:21 PDT 2007
Author: clattner
Date: Wed Jul 11 11:47:21 2007
New Revision: 39705
URL: http://llvm.org/viewvc/llvm-project?rev=39705&view=rev
Log:
Remove dead code.
Modified:
cfe/cfe/trunk/Driver/DiagChecker.cpp
Modified: cfe/cfe/trunk/Driver/DiagChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/DiagChecker.cpp?rev=39705&r1=39704&r2=39705&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/DiagChecker.cpp (original)
+++ cfe/cfe/trunk/Driver/DiagChecker.cpp Wed Jul 11 11:47:21 2007
@@ -42,7 +42,6 @@
/// 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 @@
/// 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 @@
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 @@
/// CheckDiagnostics - Implement the -parse-ast-check diagnostic verifier.
bool clang::CheckDiagnostics(Preprocessor &PP, unsigned MainFileID) {
- const TextDiagnosticBuffer &Diags =
- static_cast<const TextDiagnosticBuffer&>(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<const TextDiagnosticBuffer&>(PP.getDiagnostics().getClient());
return ReportCheckingResults(Diags, ExpectedErrors,
ExpectedWarnings, PP.getSourceManager());
More information about the cfe-commits
mailing list