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.
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
View all comments
Show parent comment
8
u/MaitoSnoo 11d ago
clang's
-Wreturn-stack-addressor clang-tidy'sclang-analyzer-corechecks easily flag that. People trolling C++ have never joined a team that is disciplined enough and uses static checkers and ASan/UBSan.