================
@@ -3786,9 +3800,8 @@ tooling::Replacements sortJavaImports(const FormatStyle 
&Style, StringRef Code,
       ImportsInBlock.push_back(
           {Identifier, Line, Prev, AssociatedCommentLines, IsStatic});
       AssociatedCommentLines.clear();
-    } else if (!Trimmed.empty() && !ImportsInBlock.empty()) {
-      // Associating comments within the imports with the nearest import below
-      AssociatedCommentLines.push_back(Line);
+    } else {
+      break;
----------------
owenca wrote:

```suggestion
      // `Trimmed` is neither empty, nor a comment or a package/import
      // statement.
      break;
```

https://github.com/llvm/llvm-project/pull/177326
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to