[PATCH] Clang-format: Braces Indent Style Whitesmith
JVApen
jvapen at gmail.com
Mon Jan 12 11:23:01 PST 2015
I've fixed the method to do the indentation, by adapting indent in ContinuationIndenter::getNewLineColumn()
As far as I understand it, the indent of the content of the enumeration is determined by the very last statement.
In a first attempt, I looked at the current token being an identifier; though it was not selective enough.
Now I look at the previous token, though this worked for the current tests, it gives incorrect indent for the second enum-value.
Further more this introduces an issue with the breaks, where:
switch (i)
..{
case A:
..{
..}
..break;
..}
becomes:
switch (i)
..{
case A:
..{
..}
break;
..}
I'm really starting to get lost in this one function call :s
http://reviews.llvm.org/D6833
Files:
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/ContinuationIndenter.h
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineFormatter.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTest.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6833.18032.patch
Type: text/x-patch
Size: 19653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150112/51eddf2c/attachment.bin>
More information about the cfe-commits
mailing list