diff options
author | Samira Bazuzi <bazuzi@users.noreply.github.com> | 2023-12-04 04:10:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 10:10:07 +0100 |
commit | a3fe9cb24da302a40c53d187271e472a6432c4f1 (patch) | |
tree | 2a26a7e31fdcacfc2de943e4899c66cb60cef5a0 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | db3d0e4dfa34e59fab90c0726a6722f82db48462 (diff) | |
download | llvm-a3fe9cb24da302a40c53d187271e472a6432c4f1.zip llvm-a3fe9cb24da302a40c53d187271e472a6432c4f1.tar.gz llvm-a3fe9cb24da302a40c53d187271e472a6432c4f1.tar.bz2 |
[clang][dataflow] Retrieve members from accessors called using member… (#73978)
… pointers.
getMethodDecl does not handle pointers to members and returns nullptr
for them. getMethodDecl contains a decade-plus-old FIXME to handle
pointers to members, but two approaches I looked at for fixing it are
more invasive or complex than simply swapping to getCalleeDecl.
The first, have getMethodDecl call getCalleeDecl, creates a large tree
of const-ness mismatches due to getMethodDecl returning a non-const
value while being a const member function and getCalleeDecl only being a
const member function when it returns a const value.
The second, implementing an AST walk to match how
CXXMemberCallExpr::getImplicitObjectArgument grabs the LHS of the binary
operator, is basically reimplementing Expr::getReferencedDeclOfCallee,
which is used by Expr::getCalleeDecl. We don't need another copy of that
code.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions