hazohelet added inline comments.
================ Comment at: clang/lib/AST/ExprConstant.cpp:2379 if (!Value.hasValue()) { assert(SubobjectDecl && "SubobjectDecl shall be non-null"); Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl; ---------------- The reason I put the assertion here in the original patch was that there were not enough test cases to see what could cause null here, and I thought we could rethink later about this assertion's validness through crash reports like this. FWIW, I thought this assertion could be beneficial at that time because it had caught two internal bugs. If reviewers do not agree with the assertion here anymore, we can fallback to the old diagnostic(`subobject of type 'A' is not initialized`) when we have invalid subobject, or revert the original patch. Currently this patch is a partial fallback to the old diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153969/new/ https://reviews.llvm.org/D153969 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits