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

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 21 18:02:50 PST 2021


ChuanqiXu added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3226
+    // No space between module :.
+    if (Left.isOneOf(Keywords.kw_module, tok::kw_export, Keywords.kw_import) &&
+        Right.is(TT_ModulePartitionColon))
----------------
owenpan wrote:
> You can remove `kw_export` as it must be followed by `import` or `module`, based on how `TT_ModulePartitionColon` is set on Line 908.
`export` could be followed by many other declarations. (Maybe the logic on line 908 is not right, I am not sure)


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

https://reviews.llvm.org/D114151



More information about the cfe-commits mailing list