Remove top-level using declaration from header files, as these aliases leak.

Authored by sammccall on Thu, Oct 11, 5:32 AM.

Diff Detail

sammccall created this revision.Thu, Oct 11, 5:32 AM
ilya-biryukov accepted this revision.Thu, Oct 11, 8:05 AM


33 ↗(On Diff #169197)

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.

This revision is now accepted and ready to land.Thu, Oct 11, 8:05 AM
sammccall added inline comments.Fri, Oct 12, 3:59 AM
33 ↗(On Diff #169197)

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.

This revision was automatically updated to reflect the committed changes.
rnk added a subscriber: rnk.Thu, Oct 18, 9:16 PM
rnk added inline comments.

It's preferred to include clang/Basic/LLVM.h instead and use the StringRef in the clang namespace:

Otherwise we'd have llvm::StringRef literally everywhere.