================
@@ -3769,7 +3774,20 @@ tooling::Replacements sortJavaImports(const FormatStyle 
&Style, StringRef Code,
     else if (isClangFormatOn(Trimmed))
       FormattingOff = false;
 
----------------
owenca wrote:

> Handle `Trimmed.empty()` at the top of the chained conditional.

I meant the following:
```
    if (Trimmed.empty()) {
      ...
    } else if (isClangFormatOff(Trimmed))
      FormattingOff = true;
    } else if (isClangFormatOn(Trimmed))
      FormattingOff = false;
    } else if (Trimmed.starts_with("//")) {
```

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