[PATCH] D67037: [ClangFormat] Add new style option IndentGotoLabels
Alex Cameron via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 31 04:06:19 PDT 2019
tetsuo-cpp created this revision.
tetsuo-cpp added a reviewer: klimek.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This option determines whether goto labels are indented according to scope. Setting this option to false causes goto labels to be flushed to the left.
This is mostly copied from this patch <http://lists.llvm.org/pipermail/cfe-dev/2015-September/045014.html> submitted by Christian Neukirchen that didn't make its way into trunk.
true: false:
int f() { vs. int f() {
if (foo()) { if (foo()) {
label1: label1:
bar(); bar();
} }
label2: label2:
return 1; return 1;
} }
Repository:
rC Clang
https://reviews.llvm.org/D67037
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/UnwrappedLineParser.cpp
clang/lib/Format/UnwrappedLineParser.h
clang/unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67037.218212.patch
Type: text/x-patch
Size: 6746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190831/6da30cdc/attachment.bin>
More information about the cfe-commits
mailing list