From: Zhongxing Xu Date: Tue, 18 Aug 2009 08:58:41 +0000 (+0000) Subject: Remove unused parameter BugReporter due to previous patch. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=292a5c04694ebf0cfcf41f5afe7e3db27019260e;p=clang Remove unused parameter BugReporter due to previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79328 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/PathSensitive/BugReporter.h b/include/clang/Analysis/PathSensitive/BugReporter.h index 19d9ccd6aa..519df66c2c 100644 --- a/include/clang/Analysis/PathSensitive/BugReporter.h +++ b/include/clang/Analysis/PathSensitive/BugReporter.h @@ -125,8 +125,7 @@ public: 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, @@ -230,8 +229,7 @@ public: 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; diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 745e90c38e..2e2665c173 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -1231,7 +1231,7 @@ BugReport::getEndPath(BugReporterContext& BRC, 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 @@ -1245,9 +1245,7 @@ BugReport::getEndPath(BugReporterContext& BRC, 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(getStmt())) { R = E->getSourceRange(); assert(R.isValid()); @@ -1657,7 +1655,7 @@ void BugReporter::FlushReport(BugReportEquivClass& EQ) { // 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, diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 683be27cb2..c441e0e242 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -2140,11 +2140,9 @@ namespace { 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; }