summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-08-22 18:54:07 +0000
committerAnna Zaks <ganna@apple.com>2011-08-22 18:54:07 +0000
commit752de1443f5c2cb3e06c06f2e2e6c9d50ec4d119 (patch)
tree53905d2ce31ce14b4c566447a955daffb3515b10
parent5c932b24be74e38bd95624429465dceafb8ea6d8 (diff)
downloadbcm5719-llvm-752de1443f5c2cb3e06c06f2e2e6c9d50ec4d119.tar.gz
bcm5719-llvm-752de1443f5c2cb3e06c06f2e2e6c9d50ec4d119.zip
Clean up the CFRefBugReport - remove the members, which got moved to the CFRefReportVisitors.
llvm-svn: 138259
-rw-r--r--clang/lib/StaticAnalyzer/Core/CFRefCount.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
index 6c35d1ae9c3..4ade451ba57 100644
--- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
@@ -1945,38 +1945,30 @@ namespace {
};
class CFRefReport : public BugReport {
- protected:
- SymbolRef Sym;
- const CFRefCount &TF;
public:
CFRefReport(CFRefBug& D, const CFRefCount &tf,
ExplodedNode *n, SymbolRef sym, bool registerVisitor = true)
- : BugReport(D, D.getDescription(), n), Sym(sym), TF(tf) {
+ : BugReport(D, D.getDescription(), n) {
if (registerVisitor)
addVisitor(new CFRefReportVisitor(sym, tf));
}
CFRefReport(CFRefBug& D, const CFRefCount &tf,
ExplodedNode *n, SymbolRef sym, StringRef endText)
- : BugReport(D, D.getDescription(), endText, n), Sym(sym), TF(tf) {
+ : BugReport(D, D.getDescription(), endText, n) {
addVisitor(new CFRefReportVisitor(sym, tf));
}
virtual ~CFRefReport() {}
- CFRefBug& getBugType() const {
- return (CFRefBug&) BugReport::getBugType();
- }
-
virtual std::pair<ranges_iterator, ranges_iterator> getRanges() {
- if (!getBugType().isLeak())
+ const CFRefBug& BugTy = static_cast<CFRefBug&>(getBugType());
+ if (!BugTy.isLeak())
return BugReport::getRanges();
else
return std::make_pair(ranges_iterator(), ranges_iterator());
}
- SymbolRef getSymbol() const { return Sym; }
-
std::pair<const char**,const char**> getExtraDescriptiveText();
};
@@ -2468,7 +2460,7 @@ CFRefLeakReport::CFRefLeakReport(CFRefBug& D, const CFRefCount &tf,
const ExplodedNode *AllocNode = 0;
llvm::tie(AllocNode, AllocBinding) = // Set AllocBinding.
- GetAllocationSite(Eng.getStateManager(), getErrorNode(), getSymbol());
+ GetAllocationSite(Eng.getStateManager(), getErrorNode(), sym);
// Get the SourceLocation for the allocation site.
ProgramPoint P = AllocNode->getLocation();
OpenPOWER on IntegriCloud