You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testfunctions.cpp
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -761,6 +761,13 @@ class TestFunctions : public TestFixture {
761
761
"}\n");
762
762
ASSERT_EQUALS("", errout_str());
763
763
764
+
check("char* f() {\n"// #14715
765
+
" char a[3] = { 'a', 'b', 'c' };\n"
766
+
" *a = 0;\n"
767
+
" return strdup(a);\n"
768
+
"}\n");
769
+
ASSERT_EQUALS("", errout_str());
770
+
764
771
check("size_t f() { wchar_t x = L'x'; return wcslen(&x); }");
765
772
ASSERT_EQUALS("[test.cpp:1:46]: (error) Invalid wcslen() argument nr 1. A nul-terminated string is required. [invalidFunctionArgStr]\n", errout_str());
0 commit comments