[clang-tools-extra] Add new check: do not return 0; at the end of main() in C++ (PR #77586)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 10 07:24:25 PST 2024
carlosgalvezp wrote:
I agree with the opinions from Aaron And Piotr above - this check does the opposite of readability: it forces people to waste time digging into the Standard to find the quote that says the return is not needed.
Could some argumentation be provided as to why this would be a good check to have? What coding guidelines/best practice articles promote this? I cannot think of any category where it would fit (besides misc).
I believe this is a nano-optimization, and premature optimization is the root of all evil :)
https://github.com/llvm/llvm-project/pull/77586
More information about the cfe-commits
mailing list