Some functions can end up non-externally visible despite not being declared "static" or in an unnamed namespace in C++ - such as by having parameters that are of non-external types. Such functions aren't mistakenly intended to be defining some function that needs a declaration. They could be maybe more legible (except for the operator new example) with an explicit static, but that's a stylistic thing outside what should be addressed by a warning. This reapplies275c56226d- once we figure out what to do about the change in behavior for -Wnon-c-typedef-for-linkage (this reverts the revert commit85ee1d3ca1) Differential Revision: https://reviews.llvm.org/D121328
7.6 KiB
7.6 KiB