We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7092698 commit 1670ffaCopy full SHA for 1670ffa
1 file changed
test/testvalueflow.cpp
@@ -7406,6 +7406,12 @@ class TestValueFlow : public TestFixture {
7406
" return a[0];\n"
7407
"}";
7408
ASSERT(!isKnownContainerSizeValue(tokenValues(code, "a ["), 6).empty());
7409
+
7410
+ code = "void f(const char a[]) {\n" // #14518
7411
+ " std::string s(a);\n"
7412
+ " if (s.empty()) {}\n"
7413
+ "}";
7414
+ ASSERT(!isKnownContainerSizeValue(tokenValues(code, "s ."), 0).empty());
7415
}
7416
7417
void valueFlowContainerElement()
0 commit comments