[PATCH] D54683: [WebAssembly] Delete unused using statements (NFC)

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 17:31:30 PST 2018


dschuff added a comment.

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.
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.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54683





More information about the llvm-commits mailing list