[clang] [Clang] disallow selectany on non-global-variable declarations (PR #189641)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 05:33:06 PDT 2026
================
@@ -7146,15 +7148,16 @@ static void checkAliasAttr(Sema &S, NamedDecl &ND) {
}
static void checkSelectAnyAttr(Sema &S, NamedDecl &ND) {
----------------
AaronBallman wrote:
Drive-by comment, nothing to do for this PR: `checkInheritableAttr()` exists and selectany is an inheritable attribute, so I would expect this function to be called from `checkInheritableAttr()` instead of `checkAttributesAfterMerging()`. It'd be an NFC change and I suspect it applies to other attributes with their own check functionality.
https://github.com/llvm/llvm-project/pull/189641
More information about the cfe-commits
mailing list