[PATCH] D53135: Remove top-level using declaration from header files, as these aliases leak.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 12 03:59:15 PDT 2018


sammccall added inline comments.


================
Comment at: include/clang/Driver/Job.h:33
 // Re-export this as clang::driver::ArgStringList.
-using llvm::opt::ArgStringList;
+using ArgStringList = llvm::opt::ArgStringList;
 
----------------
ilya-biryukov wrote:
> Both approaches seem equivalent in that case, since we do want the re-export.
> So not sure we want to change this in the first place. But feel free to keep it too, don't have a strong opinion on this one.
The intent here is to make this look less like the typical "bring this name into the namespace" ane more like "give this a new name", even if the unqualified name is the same.

In particular: this no longer matches `rg -t h "using llvm::"` which is a good way to find such bad decls :-) It's not a big deal, but I think this is a marginal improment.


Repository:
  rC Clang

https://reviews.llvm.org/D53135





More information about the cfe-commits mailing list