Page MenuHomePhabricator

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

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

Diff Detail

Repository
rL LLVM

Event Timeline

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

LGTM

include/clang/Driver/Job.h
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
include/clang/Driver/Job.h
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.
cfe/trunk/include/clang/Serialization/GlobalModuleIndex.h
147

It's preferred to include clang/Basic/LLVM.h instead and use the StringRef in the clang namespace:
https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/LLVM.h

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