[PATCH] D18766: [clang-tidy] Add check misc-multiple-statement-macro

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 14:18:41 PDT 2016


sbenza marked an inline comment as done and an inline comment as not done.

================
Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:33
@@ +32,3 @@
+
+namespace {
+
----------------
etienneb wrote:
> I feel it nicer if you merge this namespace with the one at line 20.
I like to put the helper functions closer to where they are used.
Merging the namespaces means I have to put everything at the top.

================
Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:42
@@ +41,3 @@
+  for (const Stmt *Child : Parent->children()) {
+    if (found)
+      return Child;
----------------
etienneb wrote:
> Why not this?
> 
>   if (found)
>     return Child;
>   else
>     found = Child == S;    // why the "|" is needed?
Fixed a different way.


http://reviews.llvm.org/D18766





More information about the cfe-commits mailing list