hokein added a comment. Nice check! I like the check, it would be very helpful. (I have struggled with this kind of bug before)
================ Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:33 @@ +32,3 @@ + +namespace { + ---------------- I think you can put this anonymous namespace into the above one. ================ Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:37 @@ +36,3 @@ +const Stmt *nextStmt(const MatchFinder::MatchResult &Result, const Stmt *S) { + const Stmt *Parent = Result.Context->getParents(*S)[0].get<Stmt>(); + if (!Parent) ---------------- Should we check the result returned by `Result.Context->getParents` is valid or not? ================ Comment at: docs/clang-tidy/checks/misc-multiple-statement-macro.rst:15 @@ +14,3 @@ + if (do_increment) + INCREMENT_TWO(a, b); + ---------------- Would be better to add a comment to explain the sample. http://reviews.llvm.org/D18766 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits