aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/BugReporter.cpp
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-09-16 03:50:38 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-09-16 03:50:38 +0000
commit212f6d3b5fb3fa55ba1e40671cfc336430abc8dd (patch)
tree946a45142d9dfb844bcb7eb2a909b834f14c8c69 /lib/Checker/BugReporter.cpp
parent49b4ef364ba042f7db2ba567310fb49917ad0086 (diff)
Refactored BugReporter to refer to EndNode as ErrorNode. We currently make the assumption that EndNode == ErrorNode, but upcoming changes will break this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/BugReporter.cpp')
-rw-r--r--lib/Checker/BugReporter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Checker/BugReporter.cpp b/lib/Checker/BugReporter.cpp
index a3f4f032a2..b300a05b89 100644
--- a/lib/Checker/BugReporter.cpp
+++ b/lib/Checker/BugReporter.cpp
@@ -168,9 +168,9 @@ public:
PathDiagnosticLocation ExecutionContinues(llvm::raw_string_ostream& os,
const ExplodedNode* N);
- Decl const &getCodeDecl() { return R->getEndNode()->getCodeDecl(); }
+ Decl const &getCodeDecl() { return R->getErrorNode()->getCodeDecl(); }
- ParentMap& getParentMap() { return R->getEndNode()->getParentMap(); }
+ ParentMap& getParentMap() { return R->getErrorNode()->getParentMap(); }
const Stmt *getParent(const Stmt *S) {
return getParentMap().getParent(S);
@@ -1216,13 +1216,13 @@ BugReport::~BugReport() {}
RangedBugReport::~RangedBugReport() {}
const Stmt* BugReport::getStmt() const {
- ProgramPoint ProgP = EndNode->getLocation();
+ ProgramPoint ProgP = ErrorNode->getLocation();
const Stmt *S = NULL;
if (BlockEntrance* BE = dyn_cast<BlockEntrance>(&ProgP)) {
CFGBlock &Exit = ProgP.getLocationContext()->getCFG()->getExit();
if (BE->getBlock() == &Exit)
- S = GetPreviousStmt(EndNode);
+ S = GetPreviousStmt(ErrorNode);
}
if (!S)
S = GetStmt(ProgP);
@@ -1266,8 +1266,8 @@ void BugReport::getRanges(const SourceRange*& beg, const SourceRange*& end) {
}
SourceLocation BugReport::getLocation() const {
- if (EndNode)
- if (const Stmt* S = GetCurrentOrPreviousStmt(EndNode)) {
+ if (ErrorNode)
+ if (const Stmt* S = GetCurrentOrPreviousStmt(ErrorNode)) {
// For member expressions, return the location of the '.' or '->'.
if (const MemberExpr *ME = dyn_cast<MemberExpr>(S))
return ME->getMemberLoc();
@@ -1665,7 +1665,7 @@ FindReportInEquivalenceClass(BugReportEquivClass& EQ,
// by a sink, simply add all the nodes in the equivalence class to 'Nodes'.
if (!BT.isSuppressOnSink()) {
for (BugReportEquivClass::iterator I=EQ.begin(), E=EQ.end(); I!=E; ++I) {
- const ExplodedNode* N = I->getEndNode();
+ const ExplodedNode* N = I->getErrorNode();
if (N) {
R = *I;
Nodes.push_back(N);
@@ -1684,7 +1684,7 @@ FindReportInEquivalenceClass(BugReportEquivClass& EQ,
for (; I != E; ++I) {
R = *I;
- const ExplodedNode *N = R->getEndNode();
+ const ExplodedNode *N = R->getErrorNode();
if (!N)
continue;