We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55e2dc6 commit 3c9db76Copy full SHA for 3c9db76
1 file changed
test/testsizeof.cpp
@@ -206,6 +206,11 @@ class TestSizeof : public TestFixture {
206
" };\n"
207
"};");
208
ASSERT_EQUALS("", errout_str());
209
+
210
+ check("int g();\n"
211
+ "size_t f1() { return sizeof(x[0]); }\n"
212
+ "size_t f2() { return sizeof(g()); }\n");
213
+ ASSERT_EQUALS("[test.cpp:3:22]: (warning) Found function call inside sizeof(). [sizeofFunctionCall]\n", errout_str());
214
}
215
216
void sizeofForArrayParameter() {
0 commit comments