[all-commits] [llvm/llvm-project] 97a588: [Clang][Sema] Don't delay the access check when co...
Akash Agrawal via All-commits
all-commits at lists.llvm.org
Thu Jul 23 08:07:11 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97a5889383220967c7ed4eb8d23470d875f8cbcc
https://github.com/llvm/llvm-project/commit/97a5889383220967c7ed4eb8d23470d875f8cbcc
Author: Akash Agrawal <akashag at qti.qualcomm.com>
Date: 2026-07-23 (Thu, 23 Jul 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/lib/Sema/SemaAccess.cpp
M clang/test/SemaCXX/cxx20-default-compare.cpp
Log Message:
-----------
[Clang][Sema] Don't delay the access check when computing implicit deletion (#210254)
Sema::isMemberAccessibleForDeletion treats AR_delayed as unreachable,
but CheckAccess returns AR_delayed whenever it runs inside an enclosing
delayed-diagnostics scope. That happens when deletion checking runs
synchronously while parsing a later declaration -- e.g. while explaining
why a defaulted operator<=> is deleted for an expression in that
declaration's initializer. The caller cannot consume a delayed
diagnostic, so letting CheckAccess delay always hits
llvm_unreachable("cannot delay =delete computation") and crashes.
Force an immediate answer by wrapping the CheckAccess call in
DelayedDiagnostics.pushUndelayed()/popUndelayed() via llvm::scope_exit,
mirroring the existing Sema::CheckEnableIf pattern in SemaOverload.cpp.
Fixes https://github.com/llvm/llvm-project/issues/210692
Co-authored-by: Claude-Sonnet
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list