This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.
Closed by commit rG85c6d57eb304: [Format][Tooling] Fix HeaderIncludes::insert
not respect the main-file header. (authored by
hokein marked an inline comment as done.
hokein added inline comments.
Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:369-370
+ QuotedName, /*CheckMainHeader=*/!MainIncludeFound);
+ if (Priority == 0)
+MainIncludeFound = true;
auto CatOffset =
hokein updated this revision to Diff 539506.
hokein added a comment.
Make the MainFileFound stateless.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154963/new/
https://reviews.llvm.org/D154963
Files:
kadircet added inline comments.
Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:369-370
+ QuotedName, /*CheckMainHeader=*/!MainIncludeFound);
+ if (Priority == 0)
+MainIncludeFound = true;
auto CatOffset = CategoryEndOffsets.find(Priority);
hokein updated this revision to Diff 539481.
hokein marked 2 inline comments as done.
hokein added a comment.
Herald added a subscriber: arphaman.
address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154963/new/
kadircet added inline comments.
Comment at: clang/lib/Tooling/Inclusions/HeaderIncludes.cpp:338
int Priority = Categories.getIncludePriority(
-CurInclude.Name, /*CheckMainHeader=*/FirstIncludeOffset < 0);
+CurInclude.Name, /*CheckMainHeader=*/true);
hokein created this revision.
hokein added reviewers: sammccall, kadircet.
Herald added a project: All.
hokein requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154963
Files: