@@ -351,7 +351,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
351351 // for the inline bitfields.
352352 union { uint64_t OpaqueBits;
353353
354- SWIFT_INLINE_BITFIELD_BASE (Decl, bitmax (NumDeclKindBits,8 )+1 +1 +1 +1 +1 ,
354+ SWIFT_INLINE_BITFIELD_BASE (Decl, bitmax (NumDeclKindBits,8 )+1 +1 +1 +1 +1 + 1 ,
355355 Kind : bitmax (NumDeclKindBits,8 ),
356356
357357 // / Whether this declaration is invalid.
@@ -374,7 +374,10 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
374374 // / a local context, but should behave like a top-level
375375 // / declaration for name lookup purposes. This is used by
376376 // / lldb.
377- Hoisted : 1
377+ Hoisted : 1 ,
378+
379+ // / Whether the set of semantic attributes has been computed.
380+ SemanticAttrsComputed : 1
378381 );
379382
380383 SWIFT_INLINE_BITFIELD_FULL (PatternBindingDecl, Decl, 1 +1 +2 +16 ,
@@ -921,7 +924,13 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
921924 // / expansions.
922925 OrigDeclAttributes getOriginalAttrs () const ;
923926
924- // / Returns the semantic attributes attached to this declaration,
927+ // / Returns the semantic CustomAttrs attached to this declaration,
928+ // / including attributes that are generated as the result of member
929+ // / attribute macro expansion.
930+ DeclAttributes::AttributeKindRange<CustomAttr, false >
931+ getSemanticCustomAttrs () const ;
932+
933+ // / Returns all semantic attributes attached to this declaration,
925934 // / including attributes that are generated as the result of member
926935 // / attribute macro expansion.
927936 DeclAttributes getSemanticAttrs () const ;
@@ -1090,6 +1099,14 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
10901099 Bits.Decl .EscapedFromIfConfig = Escaped;
10911100 }
10921101
1102+ bool getSemanticAttrsComputed () const {
1103+ return Bits.Decl .SemanticAttrsComputed ;
1104+ }
1105+
1106+ void setSemanticAttrsComputed (bool Computed) {
1107+ Bits.Decl .SemanticAttrsComputed = Computed;
1108+ }
1109+
10931110 // / \returns the unparsed comment attached to this declaration.
10941111 RawComment getRawComment () const ;
10951112
0 commit comments