[PATCH] Fixed calculation of penalty when breaking tokens.
Alexander Kornienko
alexfh at google.com
Thu Jun 6 13:55:15 PDT 2013
Hi klimek, djasper,
Introduced two new style parameters: PenaltyBreakComment and
PenaltyBreakString. Add penalty for each character of a breakable token beyond
the column limit (this relates mainly to comments, as they are broken only on
whitespace). Tuned PenaltyBreakComment to prefer comment breaking over breaking
inside most binary expressions.
Fixed a bug that prevented *, & and && from being considered TT_BinaryOperator
in the presense of adjacent comments.
http://llvm-reviews.chandlerc.com/D933
Files:
include/clang/Format/Format.h
lib/Format/BreakableToken.cpp
lib/Format/BreakableToken.h
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D933.1.patch
Type: text/x-patch
Size: 14220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130606/f1007289/attachment.bin>
More information about the cfe-commits
mailing list