We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3504614 commit 3306a0eCopy full SHA for 3306a0e
1 file changed
test/testvalueflow.cpp
@@ -172,6 +172,7 @@ class TestValueFlow : public TestFixture {
172
173
mNewTemplate = false;
174
TEST_CASE(valueFlowBailoutIncompleteVar);
175
+ TEST_CASE(valueFlowBailoutNoreturn);
176
mNewTemplate = true;
177
178
TEST_CASE(performanceIfCount);
@@ -9077,6 +9078,16 @@ class TestValueFlow : public TestFixture {
9077
9078
errout_str());
9079
}
9080
9081
+ void valueFlowBailoutNoreturn() { // #13718
9082
+ bailout(
9083
+ "void f(const int* p) {\n"
9084
+ " if (p)\n"
9085
+ " (void)*p;\n"
9086
+ "}\n"
9087
+ );
9088
+ ASSERT_EQUALS_WITHOUT_LINENUMBERS("", errout_str());
9089
+ }
9090
+
9091
void performanceIfCount() {
9092
/*const*/ Settings s(settings);
9093
s.vfOptions.maxIfCount = 1;
0 commit comments