Remix.run Logo
actionfromafar 3 days ago

If you are working with C++ in this day and age, regardless of which compiler you use to output your actual binaries, you really owe it to yourself to compile as many source files as possible with other diagnostic tools, foremost clang-tidy.

It will catch that and a lot of iffy stuff.

If you want to go deeper, you can also add your own diagnostics, which can have knowledge specific to your program.

https://clang.llvm.org/extra/clang-tidy/QueryBasedCustomChec...