[cfe-commits] r79328 - in /cfe/trunk: include/clang/Analysis/PathSensitive/BugReporter.h lib/Analysis/BugReporter.cpp lib/Analysis/CFRefCount.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Aug 18 01:58:41 PDT 2009


Author: zhongxingxu
Date: Tue Aug 18 03:58:41 2009
New Revision: 79328

URL: http://llvm.org/viewvc/llvm-project?rev=79328&view=rev
Log:
Remove unused parameter BugReporter due to previous patch.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h
    cfe/trunk/lib/Analysis/BugReporter.cpp
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h?rev=79328&r1=79327&r2=79328&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/BugReporter.h Tue Aug 18 03:58:41 2009
@@ -125,8 +125,7 @@
   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 @@
   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;

Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=79328&r1=79327&r2=79328&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Tue Aug 18 03:58:41 2009
@@ -1231,7 +1231,7 @@
     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 @@
   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());
@@ -1657,7 +1655,7 @@
 
   // 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,

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=79328&r1=79327&r2=79328&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Tue Aug 18 03:58:41 2009
@@ -2140,11 +2140,9 @@
       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;
     }





More information about the cfe-commits mailing list