summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CoreEngine.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-06-18 19:23:30 +0000
committerJordan Rose <jordan_rose@apple.com>2014-06-18 19:23:30 +0000
commit0674b813aa85ee53ab5ece6efd7f982aa04652d9 (patch)
treed0b308b488f242a829ed0382a34b58a27dd1e930 /lib/StaticAnalyzer/Core/CoreEngine.cpp
parent487276293aeaf5919fba290bfa7979e0bb1fa5be (diff)
downloadclang-0674b813aa85ee53ab5ece6efd7f982aa04652d9.tar.gz
clang-0674b813aa85ee53ab5ece6efd7f982aa04652d9.tar.bz2
clang-0674b813aa85ee53ab5ece6efd7f982aa04652d9.tar.xz
[analyzer] Don't create new PostStmt nodes if we don't have to.
Doing this caused us to mistakenly think we'd seen a particular state before when we actually hadn't, which resulted in false negatives. Credit to Rafael Auler for discovering this issue! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CoreEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CoreEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/CoreEngine.cpp b/lib/StaticAnalyzer/Core/CoreEngine.cpp
index e710c7f717..4623c358a9 100644
--- a/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ b/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -541,7 +541,7 @@ void CoreEngine::enqueueStmtNode(ExplodedNode *N,
CFGStmt CS = (*Block)[Idx].castAs<CFGStmt>();
PostStmt Loc(CS.getStmt(), N->getLocationContext());
- if (Loc == N->getLocation()) {
+ if (Loc == N->getLocation().withTag(nullptr)) {
// Note: 'N' should be a fresh node because otherwise it shouldn't be
// a member of Deferred.
WList->enqueue(N, Block, Idx+1);