[PATCH] D64566: [YAMLIO] Remove trailing spaces when outputting maps

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 07:19:54 PDT 2019


grimar added inline comments.


================
Comment at: lib/Support/YAMLTraits.cpp:768
+  Padding = {};
+  Column = 0;
 
----------------
MaskRay wrote:
> grimar wrote:
> > grimar wrote:
> > > This seems can be a bit simpler:
> > > 
> > > ```
> > >   Out << Padding;
> > >   Padding = "";
> > >   if (Padding != "\n")
> > >     return;
> > > 
> > >   Column = 0;
> > > ```
> > Ah, no. My mistake.
> > Looks like you could move this to before the if?
> 
> I can't..
Interesting that James seems tried to suggest the same. Looks there is something in this code pattern that make people think it can be simplified in this way..


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64566





More information about the llvm-commits mailing list