[PATCH] D92886: [Sema] Warn about unused functions even when they're inline
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 8 15:05:23 PST 2020
Quuxplusone added subscribers: mpark, Quuxplusone.
Quuxplusone added a comment.
I agree with your reasoning, but in practice I still see a lot of people using `static inline` for functions (especially function templates) in .h files. I'm not sure exactly why — maybe to reduce the burden on the linker, which would otherwise have to make sure all the symbols had the same address, whereas with `static` it doesn't have to worry about that?
Have you run this patch over Clang's own codebase, and over libc++? How many positives are there, and do they fall into any thought-provoking patterns?
@mpark, you added some `static inline` to libc++ in D68840 <https://reviews.llvm.org/D68840> — any thoughts on this subject?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92886/new/
https://reviews.llvm.org/D92886
More information about the cfe-commits
mailing list