[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 6 15:41:53 PST 2021


njames93 added a reviewer: klimek.
njames93 added a comment.

I have no issues here, but see what the others say as well.
Also related post to cfe-dev - https://lists.llvm.org/pipermail/cfe-dev/2021-February/067629.html



================
Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:148-151
+      for (auto *P : FD->parameters())
+        if (!TraverseDecl(P)) {
+          return false;
+        }
----------------
nit: Inner If doesn't need braces, but I'd prefer the loop to have them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96114/new/

https://reviews.llvm.org/D96114



More information about the cfe-commits mailing list