@@ -4,6 +4,7 @@ private import codeql.swift.generated.Raw
44import codeql.swift.elements.decl.AbstractStorageDecl
55import codeql.swift.elements.expr.Expr
66import codeql.swift.elements.pattern.Pattern
7+ import codeql.swift.elements.decl.PatternBindingDecl
78import codeql.swift.elements.type.Type
89
910module Generated {
@@ -98,5 +99,121 @@ module Generated {
9899 * Holds if `getParentInitializer()` exists.
99100 */
100101 final predicate hasParentInitializer ( ) { exists ( getParentInitializer ( ) ) }
102+
103+ /**
104+ * Gets the property wrapper backing var binding of this var declaration, if it exists.
105+ *
106+ * This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
107+ * behavior of both the `Immediate` and non-`Immediate` versions.
108+ */
109+ PatternBindingDecl getImmediatePropertyWrapperBackingVarBinding ( ) {
110+ result =
111+ Synth:: convertPatternBindingDeclFromRaw ( Synth:: convertVarDeclToRaw ( this )
112+ .( Raw:: VarDecl )
113+ .getPropertyWrapperBackingVarBinding ( ) )
114+ }
115+
116+ /**
117+ * Gets the property wrapper backing var binding of this var declaration, if it exists.
118+ *
119+ * This is the synthesized binding introducing the property wrapper backing variable for this
120+ * variable, if any.
121+ */
122+ final PatternBindingDecl getPropertyWrapperBackingVarBinding ( ) {
123+ result = getImmediatePropertyWrapperBackingVarBinding ( ) .resolve ( )
124+ }
125+
126+ /**
127+ * Holds if `getPropertyWrapperBackingVarBinding()` exists.
128+ */
129+ final predicate hasPropertyWrapperBackingVarBinding ( ) {
130+ exists ( getPropertyWrapperBackingVarBinding ( ) )
131+ }
132+
133+ /**
134+ * Gets the property wrapper backing var of this var declaration, if it exists.
135+ *
136+ * This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
137+ * behavior of both the `Immediate` and non-`Immediate` versions.
138+ */
139+ VarDecl getImmediatePropertyWrapperBackingVar ( ) {
140+ result =
141+ Synth:: convertVarDeclFromRaw ( Synth:: convertVarDeclToRaw ( this )
142+ .( Raw:: VarDecl )
143+ .getPropertyWrapperBackingVar ( ) )
144+ }
145+
146+ /**
147+ * Gets the property wrapper backing var of this var declaration, if it exists.
148+ *
149+ * This is the synthesized variable holding the property wrapper for this variable, if any.
150+ */
151+ final VarDecl getPropertyWrapperBackingVar ( ) {
152+ result = getImmediatePropertyWrapperBackingVar ( ) .resolve ( )
153+ }
154+
155+ /**
156+ * Holds if `getPropertyWrapperBackingVar()` exists.
157+ */
158+ final predicate hasPropertyWrapperBackingVar ( ) { exists ( getPropertyWrapperBackingVar ( ) ) }
159+
160+ /**
161+ * Gets the property wrapper projection var binding of this var declaration, if it exists.
162+ *
163+ * This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
164+ * behavior of both the `Immediate` and non-`Immediate` versions.
165+ */
166+ PatternBindingDecl getImmediatePropertyWrapperProjectionVarBinding ( ) {
167+ result =
168+ Synth:: convertPatternBindingDeclFromRaw ( Synth:: convertVarDeclToRaw ( this )
169+ .( Raw:: VarDecl )
170+ .getPropertyWrapperProjectionVarBinding ( ) )
171+ }
172+
173+ /**
174+ * Gets the property wrapper projection var binding of this var declaration, if it exists.
175+ *
176+ * This is the synthesized binding introducing the property wrapper projection variable for this
177+ * variable, if any.
178+ */
179+ final PatternBindingDecl getPropertyWrapperProjectionVarBinding ( ) {
180+ result = getImmediatePropertyWrapperProjectionVarBinding ( ) .resolve ( )
181+ }
182+
183+ /**
184+ * Holds if `getPropertyWrapperProjectionVarBinding()` exists.
185+ */
186+ final predicate hasPropertyWrapperProjectionVarBinding ( ) {
187+ exists ( getPropertyWrapperProjectionVarBinding ( ) )
188+ }
189+
190+ /**
191+ * Gets the property wrapper projection var of this var declaration, if it exists.
192+ *
193+ * This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
194+ * behavior of both the `Immediate` and non-`Immediate` versions.
195+ */
196+ VarDecl getImmediatePropertyWrapperProjectionVar ( ) {
197+ result =
198+ Synth:: convertVarDeclFromRaw ( Synth:: convertVarDeclToRaw ( this )
199+ .( Raw:: VarDecl )
200+ .getPropertyWrapperProjectionVar ( ) )
201+ }
202+
203+ /**
204+ * Gets the property wrapper projection var of this var declaration, if it exists.
205+ *
206+ * If this variable has a property wrapper with a projected value, this is the corresponding
207+ * synthesized variable holding that projected value, accessible with this variable's name
208+ * prefixed with `$`.
209+ */
210+ final VarDecl getPropertyWrapperProjectionVar ( ) {
211+ result = getImmediatePropertyWrapperProjectionVar ( ) .resolve ( )
212+ }
213+
214+ /**
215+ * Holds if `getPropertyWrapperProjectionVar()` exists.
216+ */
217+ final predicate hasPropertyWrapperProjectionVar ( ) { exists ( getPropertyWrapperProjectionVar ( ) ) }
101218 }
102219}
0 commit comments