[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

ksyx via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 18 12:37:55 PST 2022


ksyx added inline comments.


================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:80
         return;
       Whitespaces.replaceWhitespace(*TargetToken, NewlineToInsert,
+                                    TargetToken->OriginalColumn,
----------------
HazardyKnusperkeks wrote:
> What if NewlineToInsert is 0? Does that explain @MyDeveloperDay s observation?
Then the line break would be removed (concatenate with last line), which is not supposed to happen with Always style but possible at first line of Never style. 

I have located the problem and roughly the solution but it takes some time to find a neat fix :)

Thanks for the feedback


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117520/new/

https://reviews.llvm.org/D117520



More information about the cfe-commits mailing list