[all-commits] [llvm/llvm-project] 96b659: [Clang] Remove the early-check for anonymous struc...
Younan Zhang via All-commits
all-commits at lists.llvm.org
Thu Dec 11 18:41:02 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 96b6594c901d0d92eec12c9e06388d7011049f69
https://github.com/llvm/llvm-project/commit/96b6594c901d0d92eec12c9e06388d7011049f69
Author: Younan Zhang <zyn7109 at gmail.com>
Date: 2025-12-12 (Fri, 12 Dec 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/test/SemaCXX/anonymous-struct.cpp
M clang/test/SemaObjCXX/arc-0x.mm
Log Message:
-----------
[Clang] Remove the early-check for anonymous struct in ShouldDeleteSpecialMember (#171799)
That check doesn't seem very useful. For non-dependent context records,
ShouldDeleteSpecialMember is called when checking implicitly defined
member functions, before the anonymous flag which the check relies on is
set. (One could notice that in ParseCXXClassMemberDeclaration,
ParseDeclarationSpecifiers ends up calling
ShouldDeleteSpecialMember, while the flag is only set later in
ParsedFreeStandingDeclSpec.)
For dependent contexts, this check actually breaks correctness: since we
don't create those special members until the template is instantiated,
their deletion checks are skipped because of the anonymity.
There's only one regression in ObjC test about notes; we are more
explanative now.
Fixes https://github.com/llvm/llvm-project/issues/167217
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