Skip to content

Commit 5d7ee58

Browse files
Update testvalueflow.cpp
1 parent 1193f66 commit 5d7ee58

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/testvalueflow.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7980,6 +7980,18 @@ class TestValueFlow : public TestFixture {
79807980
" return (!std::is_reference<decltype(a)>::value);\n"
79817981
"}\n";
79827982
(void)valueOfTok(code, "0");
7983+
7984+
code = "struct S { int a; };\n" // #14036
7985+
"template <typename T>\n"
7986+
"struct U {\n"
7987+
" U() = default;\n"
7988+
" U(int i, int* p) {\n"
7989+
" m = new T(i, p);\n"
7990+
" }\n"
7991+
" T m;\n"
7992+
"};\n"
7993+
"U<S*> u;\n";
7994+
(void)valueOfTok(code, "new");
79837995
}
79847996

79857997
void valueFlowHang() {

0 commit comments

Comments
 (0)