aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorManna, Soumi <soumi.manna@intel.com>2023-06-28 19:51:15 -0700
committerManna, Soumi <soumi.manna@intel.com>2023-06-28 20:40:02 -0700
commita806ec4857c2c662c89755edba56d893ae1beeb4 (patch)
treeb5d050e51c9b9ac7813ea43be2e031cd55661bf5 /llvm/lib/CodeGen/MachineFunction.cpp
parent310a6f12b5b80f6b77d8551c53e0fc2a2844df07 (diff)
downloadllvm-a806ec4857c2c662c89755edba56d893ae1beeb4.zip
llvm-a806ec4857c2c662c89755edba56d893ae1beeb4.tar.gz
llvm-a806ec4857c2c662c89755edba56d893ae1beeb4.tar.bz2
[analyzer] Refactor codes in findMethodDecl()
In findMethodDecl(clang::ObjCMessageExpr const *, clang::ObjCObjectPointerType const *, clang::ASTContext &), if the MessageExpr->getReceiverKind() is not Instance or Class, we never dereference pointer “ReceiverObjectPtrType”. Also, we don't dereference the pointer “ReceiverObjectPtrType” if ReceiverType is ObjCIdType or ObhjCClassType. So the pointer “ReceiverObjectPtrType”is only used in this branch and the declaration should be here. This patch directly uses ReceiverType->castAs<ObjCObjectPointerType>() instead of ReceiverObjectPtrType when calling canAssignObjCInterfaces() to express the intent more clearly. Reviewed By: erichkeane, steakhal Differential Revision: https://reviews.llvm.org/D152194
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions