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
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index c5a59e2..9954298 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -43,8 +43,7 @@
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 @@
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 @@
return;
std::ostringstream os;
- os << "[CHECKER] " << B.getName();
+ os << "[CHECKER] " << B.getDescription();
unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning,
os.str().c_str());