================
@@ -2411,10 +2411,15 @@ static bool 
CheckEvaluationResult(CheckEvaluationResultKind CERK,
                                   const FieldDecl *SubobjectDecl,
                                   CheckedTemporaries &CheckedTemps) {
   if (!Value.hasValue()) {
-    assert(SubobjectDecl && "SubobjectDecl shall be non-null");
-    Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << SubobjectDecl;
-    Info.Note(SubobjectDecl->getLocation(),
-              diag::note_constexpr_subobject_declared_here);
+    if (SubobjectDecl) {
----------------
shafik wrote:

So if we look back at https://reviews.llvm.org/D146358 you used to get the 
location which could be invalid and the diagnostic that was based on that is 
now lost b/c we lost that information b/c in many cases you just pass `nullptr` 
explicitly. So Perhaps you should have been encoding that information as well 
and then understand why that is important here.

https://github.com/llvm/llvm-project/pull/67817
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to