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
{{ message }}
Repository navigation
Commit 436735e
Browse filesBrowse the repository at this point in the historyBrowse files
ASSERT_EQUALS("[test.cpp:4:5]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'function *'. [invalidPrintfArgType_sint]\n"
5011
+
"[test.cpp:4:5]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'member-pointer *'. [invalidPrintfArgType_sint]\n"
5012
+
"[test.cpp:4:5]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'function *'. [invalidPrintfArgType_sint]\n", errout_str());
5013
+
5014
+
check("void test(char* (*cs)(int)) {\n"// a call through a copy of the pointer has the return type of the function
5015
+
" auto acs = cs;\n"
5016
+
" printf(\"%d %s\", acs(1), (*cs)(2));\n"
5017
+
"}\n");
5018
+
ASSERT_EQUALS("[test.cpp:3:5]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'char *'. [invalidPrintfArgType_sint]\n", errout_str());
0 commit comments