[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
Thu Oct 17 22:19:25 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:

Please also add more details to the summary, it is helpful to have some idea what you think the underlying problem is and why this fix is correct before reviewing. 

https://github.com/llvm/llvm-project/pull/112424


More information about the cfe-commits mailing list