================
@@ -1591,10 +1591,16 @@ static bool diagnoseTypeIdField(InterpState &S, CodePtr 
OpPC,
   return false;
 }
 
+static bool allowNullSubObj(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
+  const SourceInfo &Loc = S.Current->getSource(OpPC);
+  return Ptr.isZero() &&
+         S.shouldRelaxDiag(Loc.getLoc(), diag::note_constexpr_null_subobject);
----------------
tbaederr wrote:

```suggestion
  return Ptr.isZero() &&
         S.shouldRelaxDiag(S.Current->getSource(OpPC).getLoc(), 
diag::note_constexpr_null_subobject);
```

https://github.com/llvm/llvm-project/pull/217311
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to