[PATCH] D114151: [clang-format] [C++20] [Module] clang-format couldn't recognize partitions

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 22 08:17:29 PST 2021


owenpan added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1055-1077
+  while (FormatTok) {
+    if (FormatTok->is(tok::colon)) {
+      FormatTok->setType(TT_ModulePartitionColon);
+    }
+    // Handle import <foo/bar.h> as we would an include statement
+    else if (FormatTok->is(tok::less)) {
+      nextToken();
----------------
Possible infinite loops if the `import` statement is the last line and not terminated by a `;`?


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

https://reviews.llvm.org/D114151



More information about the cfe-commits mailing list