[PATCH] D54683: [WebAssembly] Delete unused using statements (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 17:41:49 PST 2018
aheejin added a comment.
In https://reviews.llvm.org/D54683#1303746, @dschuff wrote:
> LLVM doesn't actually have an IWYU guideline though: https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible ... but also not a "dont IWYU".
>
> Also this general problem is why Chrome has a rule against `using namespace` in header files. I like that rule because you can always tell by looking in the cpp file which namespaces are in scope.
Looks like the current code complies with this.
> If we do the same, then `using` directive in a cpp file can be removed if the file still compiles after removing it because we know it's not coming from somewhere else.
>
> Also even if we adopt that convention for the wasm backend we might have to make an exception for `using namespace llvm` because it's so ubiquitous.
I agree, but it's lld, so maybe `using namespace lld` can belong to that ubiquitous realm?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D54683
More information about the llvm-commits
mailing list