diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-07-03 05:26:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-07-03 05:26:14 +0000 |
commit | 7032f460fc9828f386056e75933da5af61e88638 (patch) | |
tree | 21b4e71304fdc8e0f9102d0942b8350199b6434a /lib/Analysis | |
parent | 7be3f4b3aa9e7c971d6a7abcd9c89ea3f42258f3 (diff) |
Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
on functions we cannot construct full CFGs for yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/DeadStores.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 1741e7dc9b..fba31f81af 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -118,7 +118,7 @@ Stmt* BugReport::getStmt(BugReporter& BR) const { Stmt *S = NULL; if (BlockEntrance* BE = dyn_cast<BlockEntrance>(&ProgP)) - if (BE->getBlock() == &BR.getCFG().getExit()) + if (BE->getBlock() == &BR.getCFG()->getExit()) S = GetLastStmt(EndNode); if (!S) S = GetStmt(ProgP); diff --git a/lib/Analysis/DeadStores.cpp b/lib/Analysis/DeadStores.cpp index 02198b2906..ded0ed0d89 100644 --- a/lib/Analysis/DeadStores.cpp +++ b/lib/Analysis/DeadStores.cpp @@ -153,7 +153,7 @@ void clang::CheckDeadStores(LiveVariables& L, BugReporter& BR) { DiagCollector C(BT); DeadStoreObs A(BR.getContext(), BR.getDiagnostic(), C, BR.getParentMap()); - L.runOnAllBlocks(BR.getCFG(), &A); + L.runOnAllBlocks(*BR.getCFG(), &A); // Emit the bug reports. |