[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 13 06:52:14 PST 2025
================
@@ -1592,6 +1592,11 @@ class CGObjCNonFragileABIMac : public CGObjCCommonMac {
bool isClassLayoutKnownStatically(const ObjCInterfaceDecl *ID) {
// Test a class by checking its superclasses up to
// its base class if it has one.
+
+ // Cannot check a null class
+ if (!ID)
+ return false;
----------------
AZero13 wrote:
This shouldn't happen but if it does, return false like we used to do because otherwise we will crash as this is dereferencing a null pointer
https://github.com/llvm/llvm-project/pull/85465
More information about the cfe-commits
mailing list