File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
ql/lib/codeql/swift/generated Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -41,5 +41,7 @@ Element getAnImmediateChild(Element e) {
41
41
* if `e` has conversions, `getImmediateParent(e)` will give the bottom conversion in the hidden AST.
42
42
*/
43
43
Element getImmediateParent(Element e) {
44
+ // `unique` is used here to tell the optimizer that there is in fact only one result
45
+ // this is tested by the `library-tests/parent/no_double_parents.ql` test
44
46
result = unique(Element x | e = getAnImmediateChild(x) | x)
45
47
}
Original file line number Diff line number Diff line change @@ -238,5 +238,7 @@ Element getAnImmediateChild(Element e) {
238
238
* if `e` has conversions, `getImmediateParent(e)` will give the bottom conversion in the hidden AST.
239
239
*/
240
240
Element getImmediateParent ( Element e ) {
241
+ // `unique` is used here to tell the optimizer that there is in fact only one result
242
+ // this is tested by the `library-tests/parent/no_double_parents.ql` test
241
243
result = unique( Element x | e = getAnImmediateChild ( x ) | x )
242
244
}
You can’t perform that action at this time.
0 commit comments