[PATCH] D74515: Add coding standard recommending use of qualifiers in cpp files
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 16:31:29 PST 2020
rjmccall added a comment.
In D74515#1873345 <https://reviews.llvm.org/D74515#1873345>, @jlebar wrote:
> Do we have any nontrivially-long namespaces in LLVM?
I don't think any of LLVM's top-level namespaces are more than 5 characters or so. Sometimes we have long nested namespaces to e.g. move the helper types/functions of a particular data structure out of `llvm::`, like with `llvm::ilist_detail`, but they're rare and generally local to a single file.
Some of our project libraries use nested namespaces, and the qualifiers all together can get pretty long, but that's not a problem for this recommendatiion because you can just use the interior namespace in the out-of-line definition:
using namespace clang;
using namespace CodeGen;
void CodeGen::foo() {...}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74515/new/
https://reviews.llvm.org/D74515
More information about the llvm-commits
mailing list