[PATCH] D119670: [clang] Warn on unqualified calls to std::move and std::forward
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 13 09:42:04 PST 2022
cor3ntin added a comment.
There may be some things worth considering here:
- libc++ own tests and build is affected, I have not addressed these yet.
- other standard libs are affected but because they are considered system headers, no warning is emitted
I think this is a worth while first approach. We might want to consider a "warn on adl calls" attribute, or something of that nature, but it would be added to probably a lot of functions, so maybe we want the opposite but that might also be very noisy.
I'm also itching to warn of using namespace at file scope, but maybe that's better left in clang tidy?
Anyway, the current proposed solution should have no false positive or false negative, and we can expand from there as needed if people find the warning useful.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits