[clang] [clang-format] Don't break module names (PR #193834)

via cfe-commits cfe-commits at lists.llvm.org
Sun May 3 20:08:38 PDT 2026


=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= <bjoern at hazardy.de>,
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= <bjoern at hazardy.de>,
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= <bjoern at hazardy.de>,
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= <bjoern at hazardy.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/193834 at github.com>


================
@@ -1359,29 +1359,21 @@ bool UnwrappedLineParser::parseModuleImport() {
     return false;
   }
 
-  nextToken();
-  while (!eof()) {
-    if (FormatTok->is(tok::colon)) {
-      FormatTok->setFinalizedType(TT_ModulePartitionColon);
-    }
+  for (nextToken(); !eof(); nextToken()) {
----------------
owenca wrote:

```suggestion
  for (;; nextToken()) {
```

https://github.com/llvm/llvm-project/pull/193834


More information about the cfe-commits mailing list