[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 29 16:42:21 PDT 2024
================
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl,
AccessSpecifier LexicalAS) {
if (!PrevMemberDecl) {
// Use the lexical access specifier.
- MemberDecl->setAccess(LexicalAS);
----------------
shafik wrote:
I think these changes make sense, the diagnostic on forward reference is not great but that feels like a seperate already existing problem and not directly related to the crash.
Please update the summary. I also had one question on why we are checking `Name` as well.
https://github.com/llvm/llvm-project/pull/112424
More information about the cfe-commits
mailing list