jyknight marked an inline comment as done. jyknight added inline comments.
================ Comment at: clang/lib/CodeGen/CGObjC.cpp:1028-1030 + llvm::Constant *getPropertyFn = cast<llvm::Constant>( + CGM.getObjCRuntime().GetPropertyGetFunction().getCallee()); if (!getPropertyFn) { ---------------- dblaikie wrote: > This code looks like it implies that the 'if' is never hit? (since cast > doesn't propagate null (it asserts/fails/UB on null)) - should this be > cast_or_null instead? Or "if(!CGM.getObjCRuntime().getPropertyGetFunction())" > ?) > > (there are a few similar instances later on) Indeed, good catch! I don't know if that actually happens, but this code also didn't even need these casts. Removed the casts, both simplifying the code, and fixing that potential issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57668/new/ https://reviews.llvm.org/D57668 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits