开发者

C++ lint: detect improper pass by value

开发者 https://www.devze.com 2023-02-18 08:23 出处:网络
Howdy. Is there a lint tool which can开发者_Go百科 find all function declarations accepting non-primitive arguments by value. My googleFu failed.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消