[PATCH] D42729: clang-format: Fix formatting of function body followed by semicolon

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 04:24:33 PST 2018


Typz added inline comments.


================
Comment at: lib/Format/TokenAnnotator.cpp:1911
+      if (Next && Next->is(tok::l_brace) && Next->BlockKind == BK_BracedInit)
+          Next->BlockKind = BK_Block;
+    }
----------------
this may actually not be enough in all cases: to completely match the 'standard' behavior we should be able to "split" the UnwrappedLine at both opening and ending brace, in this case.


Repository:
  rC Clang

https://reviews.llvm.org/D42729





More information about the cfe-commits mailing list