[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 01:16:29 PDT 2024


================
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl,
                                     AccessSpecifier LexicalAS) {
   if (!PrevMemberDecl) {
     // Use the lexical access specifier.
-    MemberDecl->setAccess(LexicalAS);
----------------
a-tarasyuk wrote:

@shafik thanks for the feedback. I've checked, and it seems safe to omit `Name` here, so I’ve removed it.

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


More information about the cfe-commits mailing list