All right, will add another heuristic: if the function being used is also inline this gets downgraded to an Extension, not an ExtWarn.
(I have already disabled this completely in C++ mode, though.) Jordan On Jun 20, 2012, at 14:31 , Jim Grosbach <[email protected]> wrote: > I'm seeing many, many warnings compiling LLVM with this warning, in > particular from things like the ctype macros (isascii(), isupper(), et. al.). > The common theme is static inline functions in headers. Consider: > > $ cat fail.h > static inline int foo() { return 0; } > > class test { > public: > int blah() const { > return foo(); > } > }; > $ cat fail.cpp > #include "fail.h" > $ clang++ fail.cpp -c > In file included from fail.cpp:1: > ./fail.h:6:12: warning: function 'foo' has internal linkage but is used in an > inline method with external linkage [-Winternal-linkage-in-inline] > return foo(); > ^ > ./fail.h:1:19: note: 'foo' declared here > static inline int foo() { return 0; } > ^ > 1 warning generated. > > This strikes me as a false positive. > > -Jim _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
