The fixIncludes was using the input as the main file path, this will
results in inserting header at wrong places.
We need the main file path to so that we can get the real main-file
header.
Paths
| Differential D154950
[include-cleaner] Fix the `fixIncludes` API not respect main-file header. ClosedPublic Authored by hokein on Jul 11 2023, 4:44 AM.
Details Summary The fixIncludes was using the input as the main file path, this will We need the main file path to so that we can get the real main-file
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jul 11 2023, 5:05 AM Comment Actions add a testcase.
This revision was landed with ongoing or failed builds.Jul 11 2023, 6:02 AM Closed by commit rG7f3d2cd7ec25: [include-cleaner] Fix the `fixIncludes` API not respect main-file header. (authored by hokein). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 539045 clang-tools-extra/include-cleaner/include/clang-include-cleaner/Analysis.h
clang-tools-extra/include-cleaner/lib/Analysis.cpp
clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
|
can you also have a test in which we insert "d.h" and it gets put into the right place?