owenpan added inline comments.
================ Comment at: clang/docs/ClangFormatStyleOptions.rst:3419 + if (isa<VarDecl>(D)) { vs. if (isa<VarDecl>(D)) { + for (auto *A : D.attrs()) { for (auto *A : D.attrs()) + if (shouldProcessAttr(A)) { if (shouldProcessAttr(A)) ---------------- curdeius wrote: > I'm not sure if the braces on the right should be removed in the for loop. > There should probably be an option to set the minimum number of > lines/statements inside a control statement to control adding/removing braces. > I'm not sure if the braces on the right should be removed in the for loop. This //is// the LLVM [[ https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements | style ]]. See also line 23086 in FormatTest.cpp below. > There should probably be an option to set the minimum number of > lines/statements inside a control statement to control adding/removing braces. If you have more than one statement inside a control statement block, the braces must stay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits