[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

Ronald Wampler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 08:42:16 PST 2019


rdwampler marked an inline comment as done.
rdwampler added inline comments.


================
Comment at: clang/lib/Format/Format.cpp:649
   LLVMStyle.AllowShortIfStatementsOnASingleLine = false;
+  LLVMStyle.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All;
   LLVMStyle.AllowShortLoopsOnASingleLine = false;
----------------
MyDeveloperDay wrote:
> What is the difference between what clang-format does now and using SLS_All, i.e. if your introducing a new style shouldn't the default be to not change the exsiting code?
> 
> Without trying this myself I would think this needs to be SLS_None? (am I wrong?)
AFAICT, the current behavior is to always put lambdas on a single line, if possible.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57687/new/

https://reviews.llvm.org/D57687





More information about the cfe-commits mailing list