C ++ lint: detect wrong pass by value

Howdy. Is there a tool that can find all function declarations that accept non-primitive arguments by value. Error of my googleFu.

Thanks.

+4
source share
1 answer

Yes, Cppcheck can do this (among many 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.

+4
source

Source: https://habr.com/ru/post/1344861/


All Articles