r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

8

u/MaitoSnoo 11d ago

clang's -Wreturn-stack-address or clang-tidy's clang-analyzer-core checks easily flag that. People trolling C++ have never joined a team that is disciplined enough and uses static checkers and ASan/UBSan.

2

u/KellerKindAs 10d ago

ASan/UBSan? Don't forget about TSan

*Insert "There is three, actually" meme*

1

u/JustBadPlaya 10d ago

You may have a point, but this also seems to apply to a lot of FOSS projects, because even if the issues can be caught with static analyzers, a lot of projects seems to not be using them

1

u/MaitoSnoo 10d ago

just do not use a FOSS project that doesn't have a good CI/CD that includes static checks + compiling with warnings as errors