schittir added inline comments.
================
Comment at: clang/lib/Sema/SemaInit.cpp:5824-5828
// Handle default initialization.
if (Kind.getKind() == InitializationKind::IK_Default) {
TryDefaultInitialization(S, Entity, Kind, *this);
return;
}
----------------
tahonermann wrote:
> This block handles default initialization and unconditionally performs a
> return. I wonder if this effectively guarantees that `Initializer` is
> non-null if this block is not entered.
Thank you for the review. I am trying to find an explicit connection between
this block and `Initializer` being non-null, but it isn't clear to me yet.
How about adding the assert right after this block?
================
Comment at: clang/lib/Sema/SemaInit.cpp:5941
if (allowObjCWritebackConversion &&
tryObjCWritebackConversion(S, *this, Entity, Initializer)) {
return;
----------------
tahonermann wrote:
> This use of `Initializer` is also questionable;
> `tryObjCWritebackConversion()` will unconditionally dereference it.
Indeed. This set of calls should be addressed too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139148/new/
https://reviews.llvm.org/D139148
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits