Skip to content

Commit fc98fd3

Browse files
committed
Swift: add var to the list of doc expanded abbreviations
1 parent 85233b3 commit fc98fd3

File tree

4 files changed

+24
-23
lines changed

4 files changed

+24
-23
lines changed

swift/codegen/generators/qlgen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class NoClasses(Error):
6363
"repr": "representation",
6464
"param": "parameter",
6565
"int": "integer",
66+
"var": "variable",
6667
}
6768

6869
abbreviations.update({f"{k}s": f"{v}s" for k, v in abbreviations.items()})

swift/ql/lib/codeql/swift/generated/decl/ParamDecl.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module Generated {
1414
predicate isInout() { Synth::convertParamDeclToRaw(this).(Raw::ParamDecl).isInout() }
1515

1616
/**
17-
* Gets the property wrapper local wrapped var binding of this parameter declaration, if it exists.
17+
* Gets the property wrapper local wrapped variable binding of this parameter declaration, if it exists.
1818
*
1919
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
2020
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -27,7 +27,7 @@ module Generated {
2727
}
2828

2929
/**
30-
* Gets the property wrapper local wrapped var binding of this parameter declaration, if it exists.
30+
* Gets the property wrapper local wrapped variable binding of this parameter declaration, if it exists.
3131
*
3232
* This is the synthesized binding introducing the property wrapper local wrapped projection
3333
* variable for this variable, if any.
@@ -44,7 +44,7 @@ module Generated {
4444
}
4545

4646
/**
47-
* Gets the property wrapper local wrapped var of this parameter declaration, if it exists.
47+
* Gets the property wrapper local wrapped variable of this parameter declaration, if it exists.
4848
*
4949
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
5050
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -57,7 +57,7 @@ module Generated {
5757
}
5858

5959
/**
60-
* Gets the property wrapper local wrapped var of this parameter declaration, if it exists.
60+
* Gets the property wrapper local wrapped variable of this parameter declaration, if it exists.
6161
*
6262
* This is the synthesized local wrapped value, shadowing this parameter declaration in case it
6363
* has a property wrapper.

swift/ql/lib/codeql/swift/generated/decl/VarDecl.qll

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import codeql.swift.elements.type.Type
1010
module Generated {
1111
class VarDecl extends Synth::TVarDecl, AbstractStorageDecl {
1212
/**
13-
* Gets the name of this var declaration.
13+
* Gets the name of this variable declaration.
1414
*/
1515
string getName() { result = Synth::convertVarDeclToRaw(this).(Raw::VarDecl).getName() }
1616

1717
/**
18-
* Gets the type of this var declaration.
18+
* Gets the type of this variable declaration.
1919
*
2020
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
2121
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -25,12 +25,12 @@ module Generated {
2525
}
2626

2727
/**
28-
* Gets the type of this var declaration.
28+
* Gets the type of this variable declaration.
2929
*/
3030
final Type getType() { result = getImmediateType().resolve() }
3131

3232
/**
33-
* Gets the attached property wrapper type of this var declaration, if it exists.
33+
* Gets the attached property wrapper type of this variable declaration, if it exists.
3434
*
3535
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
3636
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -43,7 +43,7 @@ module Generated {
4343
}
4444

4545
/**
46-
* Gets the attached property wrapper type of this var declaration, if it exists.
46+
* Gets the attached property wrapper type of this variable declaration, if it exists.
4747
*/
4848
final Type getAttachedPropertyWrapperType() {
4949
result = getImmediateAttachedPropertyWrapperType().resolve()
@@ -55,7 +55,7 @@ module Generated {
5555
final predicate hasAttachedPropertyWrapperType() { exists(getAttachedPropertyWrapperType()) }
5656

5757
/**
58-
* Gets the parent pattern of this var declaration, if it exists.
58+
* Gets the parent pattern of this variable declaration, if it exists.
5959
*
6060
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
6161
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -68,7 +68,7 @@ module Generated {
6868
}
6969

7070
/**
71-
* Gets the parent pattern of this var declaration, if it exists.
71+
* Gets the parent pattern of this variable declaration, if it exists.
7272
*/
7373
final Pattern getParentPattern() { result = getImmediateParentPattern().resolve() }
7474

@@ -78,7 +78,7 @@ module Generated {
7878
final predicate hasParentPattern() { exists(getParentPattern()) }
7979

8080
/**
81-
* Gets the parent initializer of this var declaration, if it exists.
81+
* Gets the parent initializer of this variable declaration, if it exists.
8282
*
8383
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
8484
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -91,7 +91,7 @@ module Generated {
9191
}
9292

9393
/**
94-
* Gets the parent initializer of this var declaration, if it exists.
94+
* Gets the parent initializer of this variable declaration, if it exists.
9595
*/
9696
final Expr getParentInitializer() { result = getImmediateParentInitializer().resolve() }
9797

@@ -101,7 +101,7 @@ module Generated {
101101
final predicate hasParentInitializer() { exists(getParentInitializer()) }
102102

103103
/**
104-
* Gets the property wrapper backing var binding of this var declaration, if it exists.
104+
* Gets the property wrapper backing variable binding of this variable declaration, if it exists.
105105
*
106106
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
107107
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -114,7 +114,7 @@ module Generated {
114114
}
115115

116116
/**
117-
* Gets the property wrapper backing var binding of this var declaration, if it exists.
117+
* Gets the property wrapper backing variable binding of this variable declaration, if it exists.
118118
*
119119
* This is the synthesized binding introducing the property wrapper backing variable for this
120120
* variable, if any.
@@ -131,7 +131,7 @@ module Generated {
131131
}
132132

133133
/**
134-
* Gets the property wrapper backing var of this var declaration, if it exists.
134+
* Gets the property wrapper backing variable of this variable declaration, if it exists.
135135
*
136136
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
137137
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -144,7 +144,7 @@ module Generated {
144144
}
145145

146146
/**
147-
* Gets the property wrapper backing var of this var declaration, if it exists.
147+
* Gets the property wrapper backing variable of this variable declaration, if it exists.
148148
*
149149
* This is the synthesized variable holding the property wrapper for this variable, if any.
150150
*/
@@ -158,7 +158,7 @@ module Generated {
158158
final predicate hasPropertyWrapperBackingVar() { exists(getPropertyWrapperBackingVar()) }
159159

160160
/**
161-
* Gets the property wrapper projection var binding of this var declaration, if it exists.
161+
* Gets the property wrapper projection variable binding of this variable declaration, if it exists.
162162
*
163163
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
164164
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -171,7 +171,7 @@ module Generated {
171171
}
172172

173173
/**
174-
* Gets the property wrapper projection var binding of this var declaration, if it exists.
174+
* Gets the property wrapper projection variable binding of this variable declaration, if it exists.
175175
*
176176
* This is the synthesized binding introducing the property wrapper projection variable for this
177177
* variable, if any.
@@ -188,7 +188,7 @@ module Generated {
188188
}
189189

190190
/**
191-
* Gets the property wrapper projection var of this var declaration, if it exists.
191+
* Gets the property wrapper projection variable of this variable declaration, if it exists.
192192
*
193193
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
194194
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -201,7 +201,7 @@ module Generated {
201201
}
202202

203203
/**
204-
* Gets the property wrapper projection var of this var declaration, if it exists.
204+
* Gets the property wrapper projection variable of this variable declaration, if it exists.
205205
*
206206
* If this variable has a property wrapper with a projected value, this is the corresponding
207207
* synthesized variable holding that projected value, accessible with this variable's name

swift/ql/lib/codeql/swift/generated/expr/TapExpr.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module Generated {
4747
final BraceStmt getBody() { result = getImmediateBody().resolve() }
4848

4949
/**
50-
* Gets the var of this tap expression.
50+
* Gets the variable of this tap expression.
5151
*
5252
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
5353
* behavior of both the `Immediate` and non-`Immediate` versions.
@@ -58,7 +58,7 @@ module Generated {
5858
}
5959

6060
/**
61-
* Gets the var of this tap expression.
61+
* Gets the variable of this tap expression.
6262
*/
6363
final VarDecl getVar() { result = getImmediateVar().resolve() }
6464
}

0 commit comments

Comments
 (0)