[cfe-dev] clang format: proper indention for the goto destination point
Jason Juang
jasjuang at gmail.com
Mon Jul 13 16:46:22 PDT 2015
When using clang format based on google style.
It reformat the following code to
int main() {
for (int i = 1; i < 10; i++)
for (int j = 0; j < 5; j++) {
// do something
goto end_double_loop;
}
end_double_loop : {}
return 0;}
Could someone add a clang format style options so the "end_double_loop"
will be aligned to the first for loop instead of int main? Meaning the
desired format is
int main() {
for (int i = 1; i < 10; i++)
for (int j = 0; j < 5; j++) {
// do something
goto end_double_loop;
}
end_double_loop : {}
return 0;}
Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150713/ac36c9db/attachment.html>
More information about the cfe-dev
mailing list