[PATCH] D101108: [PR49761] Fix variadic arg handling in matcher

Chris Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 23 09:54:59 PDT 2021


chrish_ericsson_atx added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4760-4765
+  unsigned numArgs = Node.getNumArgs();
+  if (FProto && FProto->isVariadic() && FProto->getNumParams() < numArgs) {
+    numArgs = FProto->getNumParams();
+  }
 
+  for (; ArgIndex < numArgs; ++ArgIndex, ++ParamIndex) {
----------------
aaron.ballman wrote:
> 
Thanks Aaron!  Nice simplification.  I don't know why I can't remember the variable name style -- old habits die hard!  :)   Thanks for the feedback.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101108



More information about the cfe-commits mailing list