[PATCH] Major refactoring of BreakableToken.
Manuel Klimek
klimek at google.com
Mon May 27 06:26:04 PDT 2013
================
Comment at: lib/Format/BreakableToken.h:104
@@ +103,3 @@
+ //
+ // \p StartColumn specifies the column in which the comment will start
+ // after formatting.
----------------
Alexander Kornienko wrote:
> "the comment"?
Done.
================
Comment at: lib/Format/BreakableToken.cpp:90
@@ -35,1 +89,3 @@
+ // Don't break at leading whitespace.
+ Text.find_last_not_of(' ', SpaceOffset) == StringRef::npos)
SpaceOffset = Text.find(' ', MaxSplit);
----------------
Alexander Kornienko wrote:
> Manuel Klimek wrote:
> > Alexander Kornienko wrote:
> > > I'd leave {} for clarity.
> > I think llvm style is to not put in the {}s.
> > (otherwise I personally would put them in *everywhere* for clarity ;)
> I wasn't able to find this here http://llvm.org/docs/CodingStandards.html. The only related thing I've found is:
> "This document intentionally does not prescribe fixed standards for religious issues such as brace placement and space usage."
> and
> "If you are extending, enhancing, or bug fixing already implemented code, use the style that is already being used so that the source is uniform and easy to follow."
>
> So it's probably up to us to decide on this matter. What do you think?
While I have my own preference, I don't think it's important enough to argue about. So far Daniel has forced me to unbrace single-line stuff, so I think we already fell into that well...
http://llvm-reviews.chandlerc.com/D864
BRANCH
breakable-tokens
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list