[PATCH] D101788: [AST] AnyCall: Implement arguments().
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 3 19:35:40 PDT 2021
NoQ added inline comments.
================
Comment at: clang/include/clang/Analysis/AnyCall.h:170
+ return {ME->getArgs(), ME->getNumArgs()};
+ } else if (const auto *CE = dyn_cast<CallExpr>(E)) {
+ return {CE->getArgs(), CE->getNumArgs()};
----------------
xazax.hun wrote:
> As far as I remember `CXXMemberCallExpr` and `CXXOperatorCallExpr` having slightly different behavior with the former not including the implicit object argument in the argument list contrary to the latter. If that is the case, maybe this API should provide some uniformity, e.g. skipping the implicit object argument for `CXXOperatorCallExpr` (and potentially providing a separate function for getting the this/self). What do you think?
Excellent point yeah. And if we're going to do something so non-trivial it probably makes sense for me to start covering `AnyCall` with unittests.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101788/new/
https://reviews.llvm.org/D101788
More information about the cfe-commits
mailing list