@@ -712,6 +712,9 @@ const attributes = struct {
712712 pub const thiscall = struct {};
713713 pub const sysv_abi = struct {};
714714 pub const ms_abi = struct {};
715+ // TODO cannot be combined with weak or selectany
716+ pub const internal_linkage = struct {};
717+ pub const availability = struct {};
715718};
716719
717720pub const Tag = std .meta .DeclEnum (attributes );
@@ -776,9 +779,9 @@ pub fn fromString(kind: Kind, namespace: ?[]const u8, name: []const u8) ?Tag {
776779
777780 const tag_and_opts = attribute_names .fromName (normalized ) orelse return null ;
778781 switch (actual_kind ) {
779- inline else = > | tag | {
780- if (@field (tag_and_opts . properties , @tagName (tag )))
781- return tag_and_opts .properties . tag ;
782+ inline else = > | available_kind | {
783+ if (@field (tag_and_opts , @tagName (available_kind )))
784+ return tag_and_opts .tag ;
782785 },
783786 }
784787 return null ;
@@ -814,7 +817,7 @@ fn applyVariableOrParameterAttributes(p: *Parser, qt: QualType, attr_buf_start:
814817 for (attrs , toks ) | attr , tok | switch (attr .tag ) {
815818 // zig fmt: off
816819 .alias , .may_alias , .deprecated , .unavailable , .unused , .warn_if_not_aligned , .weak , .used ,
817- .noinit , .retain , .persistent , .section , .mode , .asm_label , .nullability , .unaligned ,
820+ .noinit , .retain , .persistent , .section , .mode , .asm_label , .nullability , .unaligned , .selectany , .internal_linkage ,
818821 = > try p .attr_application_buf .append (gpa , attr ),
819822 // zig fmt: on
820823 .common = > if (nocommon ) {
@@ -935,7 +938,7 @@ pub fn applyFunctionAttributes(p: *Parser, qt: QualType, attr_buf_start: usize)
935938 .noreturn , .unused , .used , .warning , .deprecated , .unavailable , .weak , .pure , .leaf ,
936939 .@"const" , .warn_unused_result , .section , .returns_nonnull , .returns_twice , .@"error" ,
937940 .externally_visible , .retain , .flatten , .gnu_inline , .alias , .asm_label , .nodiscard ,
938- .reproducible , .unsequenced , .nothrow , .nullability , .unaligned ,
941+ .reproducible , .unsequenced , .nothrow , .nullability , .unaligned , .internal_linkage ,
939942 = > try p .attr_application_buf .append (gpa , attr ),
940943 // zig fmt: on
941944 .hot = > if (cold ) {
0 commit comments