[PATCH] D31252: [clang-tidy] add readability-compound-statement-size check.

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 16:26:26 PDT 2017


Eugene.Zelenko added a comment.

Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).

Will be good idea to run Clang-tidy modernize and readability checks over new code.



================
Comment at: clang-tidy/readability/CompoundStatementSizeCheck.cpp:41
+      ++Info.Branches;
+    // fallthrough
+    case Stmt::CompoundStmtClass:
----------------
Please use LLVM_FALLTHROUGH instead (defined in llvm/Support/Compiler.h)


================
Comment at: clang-tidy/readability/CompoundStatementSizeCheck.cpp:64
+  struct CompoundStatementInfo {
+    CompoundStatementInfo() : Lines(0), Statements(0), Branches(0) {}
+    unsigned Lines;
----------------
Please use default member initializers and = default;


https://reviews.llvm.org/D31252





More information about the cfe-commits mailing list