[PATCH] D13811: [clang-format] AllowShortFunctionsOnASingleLine: true/Empty didn't work with BreakBeforeBraces: Linux/Allman.
Marek Kurdej via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 01:34:06 PDT 2015
curdeius marked 2 inline comments as done.
curdeius added a comment.
Applied comments.
================
Comment at: lib/Format/UnwrappedLineFormatter.cpp:190
@@ +189,3 @@
+ (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty) &&
+ (((Style.BraceWrapping.AfterFunction && (I + 2 != E)) ? I[2] : I[1])
+ ->First->is(tok::r_brace));
----------------
IMO, `(I + 2 != E)` is a bit awkward yet necessary here, but I don't see a better way to check if we have more than two tokens.
http://reviews.llvm.org/D13811
More information about the cfe-commits
mailing list