diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-20 22:30:48 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-20 22:30:48 +0000 |
commit | 6800ab437c8aaf7373a1ee5fa8dc1a5e3c48746e (patch) | |
tree | 3e1576a54b7c5dc493b1518b11232fed483f5d3a /clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | |
parent | cf1372d183890d2ef491300c1954e7111c08647d (diff) | |
download | bcm5719-llvm-6800ab437c8aaf7373a1ee5fa8dc1a5e3c48746e.tar.gz bcm5719-llvm-6800ab437c8aaf7373a1ee5fa8dc1a5e3c48746e.zip |
[analyzer] Remove dead code. (This code is trying to implement the idea that PathDiagnosticClient could implement DiagnosticClient and has been dead for a while).
llvm-svn: 140198
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 2de96bd1015..932689cf5c3 100644 --- a/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -82,43 +82,6 @@ PathDiagnostic::PathDiagnostic(StringRef bugtype, StringRef desc, Desc(StripTrailingDots(desc)), Category(StripTrailingDots(category)) {} -void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel, - const DiagnosticInfo &Info) { - // Default implementation (Warnings/errors count). - DiagnosticClient::HandleDiagnostic(DiagLevel, Info); - - // Create a PathDiagnostic with a single piece. - - PathDiagnostic* D = new PathDiagnostic(); - - const char *LevelStr; - switch (DiagLevel) { - default: - case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type"); - case Diagnostic::Note: LevelStr = "note: "; break; - case Diagnostic::Warning: LevelStr = "warning: "; break; - case Diagnostic::Error: LevelStr = "error: "; break; - case Diagnostic::Fatal: LevelStr = "fatal error: "; break; - } - - llvm::SmallString<100> StrC; - StrC += LevelStr; - Info.FormatDiagnostic(StrC); - - PathDiagnosticPiece *P = - new PathDiagnosticEventPiece(FullSourceLoc(Info.getLocation(), - Info.getSourceManager()), - StrC.str()); - - for (unsigned i = 0, e = Info.getNumRanges(); i != e; ++i) - P->addRange(Info.getRange(i).getAsRange()); - for (unsigned i = 0, e = Info.getNumFixItHints(); i != e; ++i) - P->addFixItHint(Info.getFixItHint(i)); - D->push_front(P); - - HandlePathDiagnostic(D); -} - void PathDiagnosticClient::HandlePathDiagnostic(const PathDiagnostic *D) { // For now this simply forwards to HandlePathDiagnosticImpl. In the future // we can use this indirection to control for multi-threaded access to |