================
@@ -1275,6 +1303,31 @@ TEST_F(FlowConditionTest,
WhileStmtWithAssignmentInCondition) {
});
}
+TEST_F(FlowConditionTest, GotoLoopWithAssignmentInCondition) {
+ std::string Code = R"cc(
+ void target(bool Foo) {
+ // This test checks whether the analysis preserves the connection between
+ // the value of `Foo` and the assignment expression, despite widening.
+ // The equality operator generates a fresh boolean variable on each
----------------
ymand wrote:
Why not a call to a bool-valued function? The equality operation is odd since
we know its false, EXPECT_TRUE on line 1327 is surprising (if correct). If we
ever upgraded to interpret `3 == 4`, it would become trivially true because the
body would be dead code.
https://github.com/llvm/llvm-project/pull/179546
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits