aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-03 17:57:38 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-03 17:57:38 +0000
commitf1ae705460552655fe7275327804444c62e86bae (patch)
treeb3553c031e7328d5c432e5dadf6a491b45c6d390 /lib/Analysis/BugReporter.cpp
parent84867e60a466fa1199eb4e838ddf873a2f7658a9 (diff)
Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
the new BugReporter interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r--lib/Analysis/BugReporter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index c5a59e20d8..9954298165 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -43,8 +43,7 @@ static inline Stmt* GetStmt(const ProgramPoint& P) {
PathDiagnosticPiece*
-BugDescription::getEndPath(ASTContext& Ctx,
- ExplodedNode<ValueState> *N) const {
+BugDescription::getEndPath(ASTContext& Ctx, ExplodedNode<ValueState> *N) const {
Stmt* S = GetStmt(N->getLocation());
@@ -60,6 +59,12 @@ BugDescription::getEndPath(ASTContext& Ctx,
return P;
}
+void BugDescription::getRanges(const SourceRange*& beg,
+ const SourceRange*& end) const {
+ beg = NULL;
+ end = NULL;
+}
+
void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, ASTContext& Ctx,
const BugDescription& B,
ExplodedGraph<GRExprEngine>& G,
@@ -266,7 +271,7 @@ void BugReporter::EmitWarning(Diagnostic& Diag, ASTContext& Ctx,
return;
std::ostringstream os;
- os << "[CHECKER] " << B.getName();
+ os << "[CHECKER] " << B.getDescription();
unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning,
os.str().c_str());