[PATCH] D155067: [clang][dataflow] Strengthen flow condition assertions.
Martin Böhme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 04:28:52 PDT 2023
mboehme updated this revision to Diff 541454.
mboehme added a comment.
Adapted to `Formula` changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155067/new/
https://reviews.llvm.org/D155067
Files:
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
Index: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
===================================================================
--- clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
+++ clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
@@ -3586,7 +3586,8 @@
EXPECT_TRUE(EnvThen.flowConditionImplies(BarValThen));
auto &BarValElse = getFormula(*BarDecl, EnvElse);
- EXPECT_FALSE(EnvElse.flowConditionImplies(BarValElse));
+ EXPECT_TRUE(
+ EnvElse.flowConditionImplies(EnvElse.arena().makeNot(BarValElse)));
});
}
@@ -3617,7 +3618,8 @@
ASSERT_THAT(BarDecl, NotNull());
auto &BarValThen = getFormula(*BarDecl, EnvThen);
- EXPECT_FALSE(EnvThen.flowConditionImplies(BarValThen));
+ EXPECT_TRUE(
+ EnvThen.flowConditionImplies(EnvThen.arena().makeNot(BarValThen)));
auto &BarValElse = getFormula(*BarDecl, EnvElse);
EXPECT_TRUE(EnvElse.flowConditionImplies(BarValElse));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155067.541454.patch
Type: text/x-patch
Size: 1000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230718/f647c5f2/attachment.bin>
More information about the cfe-commits
mailing list