virtual SourceLocation getLocation() const;
/// getRanges - Returns the source ranges associated with this bug.
- virtual void getRanges(BugReporter& BR,const SourceRange*& beg,
- const SourceRange*& end);
+ virtual void getRanges(const SourceRange*& beg, const SourceRange*& end);
virtual PathDiagnosticPiece* VisitNode(const ExplodedNode* N,
const ExplodedNode* PrevN,
void addRange(SourceRange R) { Ranges.push_back(R); }
// FIXME: Move this out of line.
- void getRanges(BugReporter& BR,const SourceRange*& beg,
- const SourceRange*& end) {
+ void getRanges(const SourceRange*& beg, const SourceRange*& end) {
if (Ranges.empty()) {
beg = NULL;
return NULL;
const SourceRange *Beg, *End;
- getRanges(BRC.getBugReporter(), Beg, End);
+ getRanges(Beg, End);
PathDiagnosticLocation L(S, BRC.getSourceManager());
// Only add the statement itself as a range if we didn't specify any
return P;
}
-void BugReport::getRanges(BugReporter& BR, const SourceRange*& beg,
- const SourceRange*& end) {
-
+void BugReport::getRanges(const SourceRange*& beg, const SourceRange*& end) {
if (const Expr* E = dyn_cast_or_null<Expr>(getStmt())) {
R = E->getSourceRange();
assert(R.isValid());
// Emit a summary diagnostic to the regular Diagnostics engine.
const SourceRange *Beg = 0, *End = 0;
- R.getRanges(*this, Beg, End);
+ R.getRanges(Beg, End);
Diagnostic& Diag = getDiagnostic();
FullSourceLoc L(R.getLocation(), getSourceManager());
unsigned ErrorDiag = Diag.getCustomDiagID(Diagnostic::Warning,
return (const CFRefBug&) RangedBugReport::getBugType();
}
- virtual void getRanges(BugReporter& BR, const SourceRange*& beg,
- const SourceRange*& end) {
-
+ virtual void getRanges(const SourceRange*& beg, const SourceRange*& end) {
if (!getBugType().isLeak())
- RangedBugReport::getRanges(BR, beg, end);
+ RangedBugReport::getRanges(beg, end);
else
beg = end = 0;
}