Yeah, probably. That said, LLVM Clang has many of that same sort of static analysis baked into the compiler, if you just turn the flags on for it. (-Wall -Wextra -Werror).
It's also pretty trivial to hook cppcheck into your automatic workflow and/or IDE to handle all the stuff the compiler doesn't complain about.
Yeah, probably. That said, LLVM Clang has many of that same sort of static analysis baked into the compiler, if you just turn the flags on for it. (
-Wall -Wextra -Werror
).It's also pretty trivial to hook
cppcheck
into your automatic workflow and/or IDE to handle all the stuff the compiler doesn't complain about.TIL, thanks! I don't know that I've ever compiled C++ without that set of flags, I'm a little scared to.
Just in case I wasn't clear,
cppcheck
is an external static analyser, but it's quite a good one!Yeah, I never work without
-Wall -Wextra -Werror
. I ususally throw-Wpedantic
in there too, for good measure.Also, Qt Creator IDE has an amazing static analyzer working out-of-the box.