================
@@ -778,6 +778,48 @@ void BreakableBlockComment::reflow(unsigned LineIndex,
 void BreakableBlockComment::adaptStartOfLine(
     unsigned LineIndex, WhitespaceManager &Whitespaces) const {
   if (LineIndex == 0) {
+    StringRef Text = tokenAt(LineIndex).TokenText;
+    if (Style.SpacesInComments != FormatStyle::SICS_Leave &&
+        Lines.size() == 1 && Text.size() >= 4) {
----------------
frank-suwen wrote:

My original intention was to scope the initial implementation to ordinary 
single-line block comments only. Multiline block comments interact with the 
existing comment reflow and formatting logic, so I wanted to avoid changing 
that behavior until the overall design was confirmed.

If the preferred direction is to support multiline block comments as well, I’m 
happy to extend the implementation accordingly. Please let me know if you think 
that would be the right next step or if you have any other suggestions. Thanks!

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

Reply via email to