[PATCH] D137320: [include-cleaner] Initial version for the "Location=>Header" step
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 10 05:35:25 PST 2022
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, lgtm!
================
Comment at: clang-tools-extra/include-cleaner/lib/Analysis.cpp:58
+ Results = {{FE}};
+ // FIXME: compute a closure of exporter headers.
+ for (const auto *Export : PI.getExporters(FE, SM.getFileManager()))
----------------
hokein wrote:
> kadircet wrote:
> > hokein wrote:
> > > kadircet wrote:
> > > > not sure i follow the fixme here, are you suggesting we should also compute transitive exporters?
> > > Yeah, rephrased the FIXME.
> > i see, i am not sure if that's desired though.
> >
> > e.g. if we have `foo.h` exporting `bar.h` exporting `baz.h`, I don't think `baz.h` counts (or should count) as an alternative to `foo.h`. do we have information proving otherwise?
> The classical IWYU tool has this semantic, see the nested_export test in https://github.com/include-what-you-use/include-what-you-use/commit/9945e543d894e90fab5ebd0b685cabd5aa8dd21f.
wow, that's surprising. but i guess is a valid point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137320/new/
https://reviews.llvm.org/D137320
More information about the cfe-commits
mailing list