[PATCH] D64566: [YAMLIO] Remove trailing spaces when outputting maps
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 07:32:04 PDT 2019
jhenderson accepted this revision.
jhenderson added a comment.
LGTM, I think too.
================
Comment at: lib/Support/YAMLTraits.cpp:768
+ Padding = {};
+ Column = 0;
----------------
grimar wrote:
> 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..
Yup. My bad too!
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