[clang] [Clang] disallow selectany on non-global-variable declarations (PR #189641)

Oleksandr Tarasiuk via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 06:20:21 PDT 2026


================
@@ -4500,6 +4500,8 @@ def DLLImportStaticLocal : InheritableAttr, TargetSpecificAttr<TargetHasDLLImpor
 
 def SelectAny : InheritableAttr {
   let Spellings = [Declspec<"selectany">, GCC<"selectany">];
+  let Subjects = SubjectList<[NonParmVar, Function], ErrorDiag,
+                             "variable declarations with external linkage">;
----------------
a-tarasyuk wrote:

@AaronBallman I've removed it

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


More information about the cfe-commits mailing list