[PATCH] D95168: [clang-format] Add InsertBraces option
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 3 04:23:24 PDT 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/include/clang/Format/Format.h:908
+ /// If set to ``BIS_Always`` will always insert braces.
+ /// The default is the disabled value of ``BIS_Never``.
+ BraceInsertionStyle InsertBraces;
----------------
Please add something like this
```
/// \warning
/// Setting ``InsertBraces`` to something other than `Never`, COULD
/// lead to incorrect code formatting due to incorrect decisions made due to
/// clang-formats lack of full semantic information.
/// As such extra care should be taken to review code changes made by the use
/// of this option.
/// \endwarning
/// \version 14
```
================
Comment at: clang/lib/Format/Format.cpp:188
+ IO.enumCase(Value, "Always", FormatStyle::BIS_Always);
+ IO.enumCase(Value, "WrapLikely", FormatStyle::BIS_WrapLikely);
+ }
----------------
I'd like to see "Remove"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95168/new/
https://reviews.llvm.org/D95168
More information about the cfe-commits
mailing list