================
@@ -12106,9 +12106,10 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
AddPragmaAttributes(DeclRegionScope, Namespc);
ProcessAPINotes(Namespc);
- // FIXME: Should we be merging attributes?
if (const VisibilityAttr *Attr = Namespc->getAttr<VisibilityAttr>())
PushNamespaceVisibilityAttr(Attr, Loc);
+ if (PrevNS)
+ mergeDeclAttributes(Namespc, PrevNS);
----------------
AaronBallman wrote:
> Thanks for pointing it out, need to check it more carefully. Based on the
> lack of namespaces in `SubjectList` I've decided attributes aren't usually
> applied to namespaces.
abi_tag, gsl::suppress, and type_visibility are the only ones; it's not a
common subject for attributes and whether to inherit on reopening or not is
likely a per-attribute decision.
https://github.com/llvm/llvm-project/pull/221039
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits