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/testsizeof.cpp
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -334,6 +334,14 @@ class TestSizeof : public TestFixture {
334
334
"}");
335
335
ASSERT_EQUALS("", errout_str());
336
336
337
+
check("int f(std::array<int, 2> a) {\n"// #14860
338
+
" return sizeof(a);\n"
339
+
"}\n"
340
+
"int g(std::string a[2]) {\n"
341
+
" return sizeof(a);\n"
342
+
"}\n");
343
+
ASSERT_EQUALS("[test.cpp:5:12]: (warning) Using 'sizeof' on array given as function argument returns size of a pointer. [sizeofwithsilentarraypointer]\n",
0 commit comments