[PATCH] Fix bug in clang-format while merging short function (PR19461)
Dinesh Dwivedi
dinesh.d at samsung.com
Fri Apr 25 07:14:45 PDT 2014
Update patch to check First->MustBreakBefore of every line before joining them.
I have updated patch as per you comment. I am checking for MustBreakBefore for
only first token of every line. I was just wondering if AnnotatedLine can have
MustBreakBefore flag set for some internal token and how we honour it while
formatting the line.
Can an AnnotatedLine have MustBreakBefore flag set for internal tokens as well?
If so, then we have to check this flag for all tokens and their children. Will
it be ok to add a 'IsJoinable' flag in AnnotatedLine and set it accordingly
while constructing AnnotatedLine.
http://reviews.llvm.org/D3439
Files:
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3439.8846.patch
Type: text/x-patch
Size: 4383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140425/6d17174f/attachment.bin>
More information about the cfe-commits
mailing list