C++ lint: detect improper pass by value
Howdy. Is there a lint tool which can开发者_Go百科 find all function declarations accepting non-primitive arguments by value. My googleFu failed.
Thanks.
Yes, Cppcheck can do this (among a wide variety of other useful checks). Since this particular situation is considered a "style" warning in Cppcheck, you will want to use the --enable=all
command line switch.
精彩评论