[PATCH] D115879: [clang-format] extern with new line brace without indentation
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 16 19:26:20 PST 2021
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1282-1300
if (FormatTok->Tok.is(tok::string_literal)) {
nextToken();
if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterExternBlock) {
+ addUnwrappedLine();
+ }
if (!Style.IndentExternBlock) {
----------------
This `case` is kind of messy and some cleanup may be in order. A related question: why do we make `IEBS_AfterExternBlock` depend on `BraceWrapping.AfterExternBlock`? Can't we only have true/false for `IndentExternBlock` and let the user set it independent of `BraceWrapping.AfterExternBlock`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115879/new/
https://reviews.llvm.org/D115879
More information about the cfe-commits
mailing list