This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcae3b70cebc1: [PR49761] Fix variadic arg handling in matcher
(authored by chrish_ericsson_atx).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE
chrish_ericsson_atx updated this revision to Diff 340094.
chrish_ericsson_atx added a comment.
Addressed feedback from aaron.ballman.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101108/new/
https://reviews.llvm.org/D101108
Files:
clang-tools-e
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();
+ }
+ fo
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();
+
chrish_ericsson_atx created this revision.
chrish_ericsson_atx requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.
Mishandling of variadic arguments in a function call caused a crash
(runtime assert fail) in bugprone-infinite-