================
@@ -1612,6 +1613,16 @@ bool Sema::isMemberAccessibleForDeletion(CXXRecordDecl 
*NamingClass,
   // Suppress diagnostics.
   Entity.setDiag(Diag);
 
+  // Deletion checking can run while we are inside an enclosing
+  // delayed-diagnostics scope (e.g. when parsing a later declaration whose
+  // initializer requires explaining why a defaulted comparison operator is
+  // deleted). CheckAccess would then return AR_delayed, but the result must be
+  // known immediately here. Force an undelayed check, mirroring CheckEnableIf.
----------------
zyn0217 wrote:

```suggestion
  // We don't want to delay access checking even we are inside an enclosing
  // delayed-diagnostics scope (e.g. when parsing a later declaration whose
  // initializer requires explaining why a defaulted comparison operator is
  // deleted)
```

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

Reply via email to