[PATCH] D101108: [PR49761] Fix variadic arg handling in matcher
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 23 09:31:54 PDT 2021
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Thank you for the fix! LGTM with some minor nits.
================
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) {
----------------
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