aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-20 22:30:48 +0000
committerAnna Zaks <ganna@apple.com>2011-09-20 22:30:48 +0000
commitbc0a3016b9fd51f84780f0f82fb0f7f2ca93e8ff (patch)
treed7140c9f2bc434e480edbb55286214bd0c2d2f90 /lib
parent5e5e95dec56d8f2392068c43c84eaaad674c2702 (diff)
[analyzer] Remove dead code. (This code is trying to implement the idea that PathDiagnosticClient could implement DiagnosticClient and has been dead for a while).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/StaticAnalyzer/Core/PathDiagnostic.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
index 2de96bd101..932689cf5c 100644
--- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
+++ b/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