njames93 requested changes to this revision. njames93 added a comment. This revision now requires changes to proceed.
There's some merit in this, like wrapping the previous statement in braces.. However, clang-tidy should not focus on the formatting aspect as we have clang-format built in to address formatting decisions, and any special formatting you do in here would likely be undone by the users configuration. It would also be nice to add in some unittests to demonstrate that braces are currently inserted etc. How does this handle pathological cases like the statement being the iteration-expression of a for loop, or a init-statement in an if/switch/range-for loop. The documentation looks like it tries to explain that, but it doesn't do a great job IMHO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133942/new/ https://reviews.llvm.org/D133942 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits