@@ -237,8 +237,12 @@ class alignas(1 << DeclAlignInBits) Decl {
237
237
238
238
// / \brief Whether this declaration is currently being validated.
239
239
unsigned BeingValidated : 1 ;
240
+
241
+ // / \brief Whether this declaration was added to the surrounding
242
+ // / DeclContext of an active #if config clause.
243
+ unsigned EscapedFromIfConfig : 1 ;
240
244
};
241
- enum { NumDeclBits = 11 };
245
+ enum { NumDeclBits = 12 };
242
246
static_assert (NumDeclBits <= 32 , " fits in an unsigned" );
243
247
244
248
class PatternBindingDeclBitfields {
@@ -649,6 +653,7 @@ class alignas(1 << DeclAlignInBits) Decl {
649
653
DeclBits.FromClang = false ;
650
654
DeclBits.EarlyAttrValidation = false ;
651
655
DeclBits.BeingValidated = false ;
656
+ DeclBits.EscapedFromIfConfig = false ;
652
657
}
653
658
654
659
ClangNode getClangNodeImpl () const {
@@ -806,6 +811,14 @@ class alignas(1 << DeclAlignInBits) Decl {
806
811
DeclBits.BeingValidated = ibv;
807
812
}
808
813
814
+ bool escapedFromIfConfig () const {
815
+ return DeclBits.EscapedFromIfConfig ;
816
+ }
817
+
818
+ void setEscapedFromIfConfig (bool Escaped) {
819
+ DeclBits.EscapedFromIfConfig = Escaped;
820
+ }
821
+
809
822
// / \returns the unparsed comment attached to this declaration.
810
823
RawComment getRawComment () const ;
811
824
0 commit comments