Skip to content

[RawPtrRefMemberChecker] Make RawPtrRefMemberChecker consistent with other checkers #137559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix formatting.
  • Loading branch information
rniwa committed Apr 27, 2025
commit b7bdc13bb2ce53d30aff8eac115a3f083d7a36f8
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ class RawPtrRefMemberChecker

if (auto *MemberCXXRD = MemberType->getPointeeCXXRecordDecl())
reportBug(Member, MemberType, MemberCXXRD, RD);
else if (auto* ObjCDecl = getObjCDecl(MemberType))
else if (auto *ObjCDecl = getObjCDecl(MemberType))
reportBug(Member, MemberType, ObjCDecl, RD);
}
}

ObjCInterfaceDecl* getObjCDecl(const Type *TypePtr) const {
ObjCInterfaceDecl *getObjCDecl(const Type *TypePtr) const {
auto *PointeeType = TypePtr->getPointeeType().getTypePtrOrNull();
if (!PointeeType)
return nullptr;
Expand Down Expand Up @@ -151,7 +151,7 @@ class RawPtrRefMemberChecker

if (auto *MemberCXXRD = IvarType->getPointeeCXXRecordDecl())
reportBug(Ivar, IvarType, MemberCXXRD, CD);
else if (auto* ObjCDecl = getObjCDecl(IvarType))
else if (auto *ObjCDecl = getObjCDecl(IvarType))
reportBug(Ivar, IvarType, ObjCDecl, CD);
}

Expand All @@ -170,7 +170,7 @@ class RawPtrRefMemberChecker

if (auto *MemberCXXRD = PropType->getPointeeCXXRecordDecl())
reportBug(PD, PropType, MemberCXXRD, CD);
else if (auto* ObjCDecl = getObjCDecl(PropType))
else if (auto *ObjCDecl = getObjCDecl(PropType))
reportBug(PD, PropType, ObjCDecl, CD);
}

Expand Down
Loading