[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-13 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
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 =

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
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:

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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);

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-12 Thread Haojian Wu via Phabricator via cfe-commits
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/

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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);

[PATCH] D154963: [Format][Tooling] Fix HeaderIncludes::insert not respect the main-file header.

2023-07-11 Thread Haojian Wu via Phabricator via cfe-commits
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: