Skip to content

Commit 1670ffa

Browse files
Update testvalueflow.cpp
1 parent 7092698 commit 1670ffa

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testvalueflow.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7406,6 +7406,12 @@ class TestValueFlow : public TestFixture {
74067406
" return a[0];\n"
74077407
"}";
74087408
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());
74097415
}
74107416

74117417
void valueFlowContainerElement()

0 commit comments

Comments
 (0)