[PATCH] D121370: [clang-format] SortIncludes should support "@import" lines in Objective-C

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 15 12:56:57 PDT 2022


HazardyKnusperkeks added a comment.

Some test with a main header and blocks would be nice.



================
Comment at: clang/lib/Format/Format.cpp:2779
             /*CheckMainHeader=*/!MainIncludeFound && FirstIncludeBlock);
-        int Priority = Categories.getSortIncludePriority(
-            IncludeName, !MainIncludeFound && FirstIncludeBlock);
+        int Priority = WithSemicolon ? INT_MAX
+                                     : Categories.getSortIncludePriority(
----------------
I don't know about the others, but I prefer C++: `std::numeric_limits`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121370/new/

https://reviews.llvm.org/D121370



More information about the cfe-commits mailing list