aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorSamira Bazuzi <bazuzi@users.noreply.github.com>2023-12-05 06:09:33 -0500
committerGitHub <noreply@github.com>2023-12-05 12:09:33 +0100
commit40381d12640932a4e8185d18e5a0da84b4e449c0 (patch)
tree0a3e97dda8db3e25e4c9720dd539fafcf568137d /llvm/lib/Transforms/Utils/Local.cpp
parent72c6ca694384744225bbfcbd899602848e46e8ff (diff)
downloadllvm-40381d12640932a4e8185d18e5a0da84b4e449c0.zip
llvm-40381d12640932a4e8185d18e5a0da84b4e449c0.tar.gz
llvm-40381d12640932a4e8185d18e5a0da84b4e449c0.tar.bz2
[clang][dataflow] Re-land: Retrieve members from accessors called usi… (#74336)
…ng member pointers. This initially landed with a broken test due to a mid-air collision with a new requirement for Environment initialization before field modeling. Have added that initialization in the test. From first landing: 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/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions