Page MenuHomePhabricator

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

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

Diff Detail


Event Timeline

sammccall created this revision.Oct 11 2018, 5:32 AM
ilya-biryukov accepted this revision.Oct 11 2018, 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.Oct 11 2018, 8:05 AM
sammccall added inline comments.Oct 12 2018, 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.Oct 18 2018, 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.