From 71cd5be513e09d36bcffa0ebee44c7284e121b1b Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 28 Apr 2026 15:06:30 +0000 Subject: [PATCH 01/85] Python: Add self-validating CFG tests These tests consist of various Python constructions (hopefully a somewhat comprehensive set) with specific timestamp annotations scattered throughout. When the tests are run using the Python 3 interpreter, these annotations are checked and compared to the "current timestamp" to see that they are in agreement. This is what makes the tests "self-validating". There are a few different kinds of annotations: the basic `t[4]` style (meaning this is executed at timestamp 4), the `t[dead(4)]` variant (meaning this _would_ happen at timestamp 4, but it is in a dead branch), and `t[never]` (meaning this is never executed at all). In addition to this, there is a query, MissingAnnotations, which checks whether we have applied these annotations maximally. Many expression nodes are not actually annotatable, so there is a sizeable list of excluded nodes for that query. --- .../MissingAnnotations.expected | 0 .../evaluation-order/MissingAnnotations.ql | 15 + .../evaluation-order/OldCfgImpl.qll | 16 + .../evaluation-order/TimerUtils.qll | 613 ++++++++++++++++++ .../evaluation-order/test_assert_raise.py | 56 ++ .../evaluation-order/test_async.py | 97 +++ .../evaluation-order/test_augassign.py | 53 ++ .../evaluation-order/test_basic.py | 223 +++++++ .../evaluation-order/test_boolean.py | 76 +++ .../evaluation-order/test_classes.py | 74 +++ .../evaluation-order/test_comprehensions.py | 46 ++ .../evaluation-order/test_conditional.py | 44 ++ .../evaluation-order/test_fstring.py | 34 + .../evaluation-order/test_functions.py | 85 +++ .../ControlFlow/evaluation-order/test_if.py | 108 +++ .../evaluation-order/test_lambda.py | 46 ++ .../evaluation-order/test_loops.py | 146 +++++ .../evaluation-order/test_match.py | 173 +++++ .../ControlFlow/evaluation-order/test_try.py | 182 ++++++ .../evaluation-order/test_unpacking.py | 48 ++ .../ControlFlow/evaluation-order/test_with.py | 58 ++ .../evaluation-order/test_yield.py | 105 +++ .../ControlFlow/evaluation-order/timer.py | 189 ++++++ 23 files changed, 2487 insertions(+) create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_assert_raise.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_async.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_augassign.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_classes.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_comprehensions.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_conditional.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_fstring.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_functions.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_if.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_lambda.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_loops.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_match.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_try.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_unpacking.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_with.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/test_yield.py create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.ql new file mode 100644 index 00000000000..51f324e9399 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/MissingAnnotations.ql @@ -0,0 +1,15 @@ +/** + * Finds expressions in test functions that lack a timer annotation + * and are not part of the timer mechanism or otherwise excluded. + * An empty result means every annotatable expression is covered. + */ + +import python +import TimerUtils + +from TestFunction f, Expr e +where + e.getScope().getEnclosingScope*() = f and + not isTimerMechanism(e, f) and + not isUnannotatable(e) +select e, "Missing annotation in $@", f, f.getName() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll b/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll new file mode 100644 index 00000000000..fc52c8dd3ed --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll @@ -0,0 +1,16 @@ +/** + * Implementation of the evaluation-order CFG signature using the existing + * Python control flow graph. + */ + +private import python as Py +import TimerUtils + +/** Existing Python CFG implementation of the evaluation-order signature. */ +module OldCfg implements EvalOrderCfgSig { + class CfgNode = Py::ControlFlowNode; + + class BasicBlock = Py::BasicBlock; + + CfgNode scopeGetEntryNode(Py::Scope s) { result = s.getEntryNode() } +} diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll b/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll new file mode 100644 index 00000000000..9782152b8cf --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll @@ -0,0 +1,613 @@ +/** + * Utility library for identifying timer annotations in evaluation-order tests. + * + * Identifies `expr @ t[n]` (matmul), `t(expr, n)` (call), and + * `expr @ t.dead[n]` (dead-code) patterns, extracts timestamp values, + * and provides predicates for traversing consecutive annotated CFG nodes. + */ + +import python + +/** + * A function decorated with `@test` from the timer module. + * The first parameter is the timer object. + */ +class TestFunction extends Function { + TestFunction() { + this.getADecorator().(Name).getId() = "test" and + this.getPositionalParameterCount() >= 1 + } + + /** Gets the name of the timer parameter (first parameter). */ + string getTimerParamName() { result = this.getArgName(0) } +} + +/** + * Gets an element from a timestamp subscript index. Each element is either + * an `IntegerLiteral` (live), a `Call` to `dead` (dead), a `Name("never")` + * (never), or a tuple containing any mix of these. + */ +private Expr timestampElement(Expr timestamps) { + result = timestamps and not timestamps instanceof Tuple + or + result = timestamps.(Tuple).getAnElt() +} + +/** Gets a live timestamp value from a subscript index expression. */ +private IntegerLiteral liveTimestampLiteral(Expr timestamps) { + result = timestampElement(timestamps) and + not result = any(Call c).getAnArg() +} + +/** Gets a dead timestamp value from a subscript index expression. */ +private IntegerLiteral deadTimestampLiteral(Expr timestamps) { + exists(Call c | + c = timestampElement(timestamps) and + c.getFunc().(Name).getId() = "dead" and + result = c.getArg(0) + ) +} + +/** Holds if the subscript index contains `never`. */ +private predicate hasNever(Expr timestamps) { + timestampElement(timestamps).(Name).getId() = "never" +} + +/** A timer annotation in the AST. */ +private newtype TTimerAnnotation = + /** `expr @ t[n]` or `expr @ t[n, m, ...]` or `expr @ t[dead(n), m, never]` */ + TMatmulAnnotation(TestFunction func, Expr annotated, Expr timestamps) { + exists(BinaryExpr be | + be.getOp() instanceof MatMult and + be.getRight().(Subscript).getObject().(Name).getId() = func.getTimerParamName() and + be.getScope().getEnclosingScope*() = func and + annotated = be.getLeft() and + timestamps = be.getRight().(Subscript).getIndex() + ) + } or + /** `t(expr, n)` */ + TCallAnnotation(TestFunction func, Expr annotated, Expr timestamps) { + exists(Call call | + call.getFunc().(Name).getId() = func.getTimerParamName() and + call.getScope().getEnclosingScope*() = func and + annotated = call.getArg(0) and + timestamps = call.getArg(1) + ) + } + +/** A timer annotation (wrapping the newtype for a clean API). */ +class TimerAnnotation extends TTimerAnnotation { + /** Gets a live timestamp value from this annotation. */ + int getATimestamp() { exists(this.getTimestampExpr(result)) } + + /** Gets the source expression for live timestamp value `ts`. */ + IntegerLiteral getTimestampExpr(int ts) { + result = liveTimestampLiteral(this.getTimestampsExpr()) and + result.getValue() = ts + } + + /** Gets a dead timestamp value from this annotation. */ + int getADeadTimestamp() { exists(this.getDeadTimestampExpr(result)) } + + /** Gets the source expression for dead timestamp value `ts`. */ + IntegerLiteral getDeadTimestampExpr(int ts) { + result = deadTimestampLiteral(this.getTimestampsExpr()) and + result.getValue() = ts + } + + /** Gets the raw timestamp expression (single element or tuple). */ + abstract Expr getTimestampsExpr(); + + /** Gets the test function this annotation belongs to. */ + abstract TestFunction getTestFunction(); + + /** Gets the annotated expression (the LHS of `@` or the first arg of `t(...)`). */ + abstract Expr getAnnotatedExpr(); + + /** Gets the enclosing annotation expression (the `BinaryExpr` or `Call`). */ + abstract Expr getTimerExpr(); + + /** Holds if timestamp `ts` is marked as dead in this annotation. */ + predicate isDeadTimestamp(int ts) { ts = this.getADeadTimestamp() } + + /** Holds if all timestamps in this annotation are dead (no live timestamps). */ + predicate isDead() { + not exists(this.getATimestamp()) and + not this.isNever() and + exists(this.getADeadTimestamp()) + } + + /** Holds if this is a never-evaluated annotation (contains `never`). */ + predicate isNever() { hasNever(this.getTimestampsExpr()) } + + string toString() { result = this.getAnnotatedExpr().toString() } + + Location getLocation() { result = this.getAnnotatedExpr().getLocation() } +} + +/** A matmul-based timer annotation: `expr @ t[...]`. */ +class MatmulTimerAnnotation extends TMatmulAnnotation, TimerAnnotation { + TestFunction func; + Expr annotated; + Expr timestamps; + + MatmulTimerAnnotation() { this = TMatmulAnnotation(func, annotated, timestamps) } + + override Expr getTimestampsExpr() { result = timestamps } + + override TestFunction getTestFunction() { result = func } + + override Expr getAnnotatedExpr() { result = annotated } + + override BinaryExpr getTimerExpr() { result.getLeft() = annotated } +} + +/** A call-based timer annotation: `t(expr, n)`. */ +class CallTimerAnnotation extends TCallAnnotation, TimerAnnotation { + TestFunction func; + Expr annotated; + Expr timestamps; + + CallTimerAnnotation() { this = TCallAnnotation(func, annotated, timestamps) } + + override Expr getTimestampsExpr() { result = timestamps } + + override TestFunction getTestFunction() { result = func } + + override Expr getAnnotatedExpr() { result = annotated } + + override Call getTimerExpr() { result.getArg(0) = annotated } +} + +/** + * Signature module defining the CFG interface needed by evaluation-order tests. + * This allows the test utilities to be instantiated with different CFG implementations. + */ +signature module EvalOrderCfgSig { + /** A control flow node. */ + class CfgNode { + /** Gets a textual representation of this node. */ + string toString(); + + /** Gets the location of this node. */ + Location getLocation(); + + /** Gets the AST node corresponding to this CFG node, if any. */ + AstNode getNode(); + + /** Gets a successor of this CFG node (including exceptional). */ + CfgNode getASuccessor(); + + /** Gets a true-branch successor of this CFG node, if any. */ + CfgNode getATrueSuccessor(); + + /** Gets a false-branch successor of this CFG node, if any. */ + CfgNode getAFalseSuccessor(); + + /** Gets an exceptional successor of this CFG node. */ + CfgNode getAnExceptionalSuccessor(); + + /** Gets the scope containing this CFG node. */ + Scope getScope(); + + /** Gets the basic block containing this CFG node. */ + BasicBlock getBasicBlock(); + } + + /** A basic block in the control flow graph. */ + class BasicBlock { + /** Gets the CFG node at position `n` in this basic block. */ + CfgNode getNode(int n); + + /** Holds if this basic block reaches `bb` (reflexive). */ + predicate reaches(BasicBlock bb); + + /** Holds if this basic block strictly reaches `bb` (non-reflexive). */ + predicate strictlyReaches(BasicBlock bb); + + /** Holds if this basic block strictly dominates `bb`. */ + predicate strictlyDominates(BasicBlock bb); + } + + /** Gets the entry CFG node for scope `s`. */ + CfgNode scopeGetEntryNode(Scope s); +} + +/** + * Parameterised module providing CFG-dependent utilities for evaluation-order tests. + * Instantiate with a specific CFG implementation to get `TimerCfgNode` and related predicates. + */ +module EvalOrderCfgUtils { + /** The CFG node type from the underlying implementation. */ + final class CfgNode = Input::CfgNode; + + /** The basic block type from the underlying implementation (named to avoid clash with `python::BasicBlock`). */ + final class CfgBasicBlock = Input::BasicBlock; + + /** Gets the entry CFG node for scope `s`. */ + CfgNode scopeGetEntryNode(Scope s) { result = Input::scopeGetEntryNode(s) } + + /** + * A CFG node corresponding to a timer annotation. + */ + class TimerCfgNode extends CfgNode { + private TimerAnnotation annot; + + TimerCfgNode() { annot.getAnnotatedExpr() = this.getNode() } + + /** Gets a timestamp value from this annotation. */ + int getATimestamp() { result = annot.getATimestamp() } + + /** Gets the source expression for timestamp value `ts`. */ + IntegerLiteral getTimestampExpr(int ts) { result = annot.getTimestampExpr(ts) } + + /** Gets the test function this annotation belongs to. */ + TestFunction getTestFunction() { result = annot.getTestFunction() } + + /** Holds if timestamp `ts` is marked as dead. */ + predicate isDeadTimestamp(int ts) { annot.isDeadTimestamp(ts) } + + /** Holds if all timestamps in this annotation are dead. */ + predicate isDead() { annot.isDead() } + + /** Holds if this is a never-evaluated annotation. */ + predicate isNever() { annot.isNever() } + } + + /** + * Holds if `next` is the next timer annotation reachable from `n` via + * CFG successors (both normal and exceptional), skipping non-annotated + * intermediaries within the same scope. + */ + predicate nextTimerAnnotation(CfgNode n, TimerCfgNode next) { + next = n.getASuccessor() and + next.getScope() = n.getScope() + or + exists(CfgNode mid | + mid = n.getASuccessor() and + not mid instanceof TimerCfgNode and + mid.getScope() = n.getScope() and + nextTimerAnnotation(mid, next) + ) + } + + /** + * Holds if `next` is the next timer annotation reachable from `n` via + * the true branch, skipping non-annotated intermediaries and after-value + * nodes for the same AST node. + */ + predicate nextTimerAnnotationFromTrue(CfgNode n, TimerCfgNode next) { + exists(CfgNode trueSucc | + trueSucc = n.getATrueSuccessor() and + trueSucc.getScope() = n.getScope() + | + // If the true successor is a different annotated node, use it + next = trueSucc and next.getNode() != n.getNode() + or + // Otherwise skip through it (it's an after-value node for the same expr) + nextTimerAnnotation(trueSucc, next) + ) + } + + /** + * Holds if `next` is the next timer annotation reachable from `n` via + * the false branch, skipping non-annotated intermediaries and after-value + * nodes for the same AST node. + */ + predicate nextTimerAnnotationFromFalse(CfgNode n, TimerCfgNode next) { + exists(CfgNode falseSucc | + falseSucc = n.getAFalseSuccessor() and + falseSucc.getScope() = n.getScope() + | + // If the false successor is a different annotated node, use it + next = falseSucc and next.getNode() != n.getNode() + or + // Otherwise skip through it (it's an after-value node for the same expr) + nextTimerAnnotation(falseSucc, next) + ) + } + + /** CFG-dependent test predicates, one per evaluation-order query. */ + module CfgTests { + /** + * Holds if live annotation `a` in function `f` is unreachable from + * the function entry in the CFG. + */ + predicate allLiveReachable(TimerCfgNode a, TestFunction f) { + not a.isDead() and + f = a.getTestFunction() and + a.getScope() = f and + not scopeGetEntryNode(f).getBasicBlock().reaches(a.getBasicBlock()) + } + + /** + * Holds if annotated node `a` is followed by unannotated `succ` in the + * same basic block. + */ + predicate basicBlockAnnotationGap(TimerCfgNode a, CfgNode succ) { + exists(CfgBasicBlock bb, int i | + a = bb.getNode(i) and + succ = bb.getNode(i + 1) + ) and + not succ instanceof TimerCfgNode and + not isUnannotatable(succ.getNode()) and + not isTimerMechanism(succ.getNode(), a.getTestFunction()) and + not exists(a.getAnExceptionalSuccessor()) and + succ.getNode() instanceof Expr + } + + /** + * Holds if annotations `a` and `b` appear in the same basic block with + * `a` before `b`, but `a`'s minimum timestamp is not less than `b`'s. + */ + predicate basicBlockOrdering(TimerCfgNode a, TimerCfgNode b, int minA, int minB) { + exists(CfgBasicBlock bb, int i, int j | a = bb.getNode(i) and b = bb.getNode(j) and i < j) and + minA = min(a.getATimestamp()) and + minB = min(b.getATimestamp()) and + minA >= minB + } + + /** + * Holds if function `f` has an annotation in a nested scope + * (generator, async function, comprehension, lambda). + */ + private predicate hasNestedScopeAnnotation(TestFunction f) { + exists(TimerAnnotation a | + a.getTestFunction() = f and + a.getAnnotatedExpr().getScope() != f + ) + } + + /** + * Holds if annotation `ann` with timestamp `a` has no consecutive + * successor (expected `a + 1`) in the CFG. + */ + predicate consecutiveTimestamps(TimerAnnotation ann, int a) { + not hasNestedScopeAnnotation(ann.getTestFunction()) and + not ann.isDead() and + a = ann.getATimestamp() and + not exists(TimerCfgNode x, TimerCfgNode y | + ann.getAnnotatedExpr() = x.getNode() and + nextTimerAnnotation(x, y) and + (a + 1) = y.getATimestamp() + ) and + // Exclude the maximum timestamp in the function (it has no successor) + not a = + max(TimerAnnotation other | + other.getTestFunction() = ann.getTestFunction() + | + other.getATimestamp() + ) + } + + /** + * Holds if the expression annotated with `t.never` is reachable from + * its scope's entry. + */ + predicate neverReachable(TimerAnnotation ann) { + ann.isNever() and + exists(CfgNode n, Scope s | + n.getNode() = ann.getAnnotatedExpr() and + s = n.getScope() and + ( + // Reachable via inter-block path (includes same block) + scopeGetEntryNode(s).getBasicBlock().reaches(n.getBasicBlock()) + or + // In same block as entry but at a later index + exists(CfgBasicBlock bb, int i, int j | + bb.getNode(i) = scopeGetEntryNode(s) and bb.getNode(j) = n and i < j + ) + ) + ) + } + + /** + * Holds if consecutive annotated nodes `a` -> `b` have backward time + * flow (`minA >= maxB`). + */ + predicate noBackwardFlow(TimerCfgNode a, TimerCfgNode b, int minA, int maxB) { + nextTimerAnnotation(a, b) and + not a.isDead() and + not b.isDead() and + minA = min(a.getATimestamp()) and + maxB = max(b.getATimestamp()) and + minA >= maxB + } + + /** + * Holds if annotations `a` and `b` share timestamp `ts` but `a` + * can reach `b` in the CFG. + */ + predicate noSharedReachable(TimerCfgNode a, TimerCfgNode b, int ts) { + a != b and + not a.isDead() and + not b.isDead() and + a.getTestFunction() = b.getTestFunction() and + ts = a.getATimestamp() and + ts = b.getATimestamp() and + ( + a.getBasicBlock().strictlyReaches(b.getBasicBlock()) + or + exists(CfgBasicBlock bb, int i, int j | a = bb.getNode(i) and b = bb.getNode(j) and i < j) + ) + } + + /** + * Holds if consecutive single-timestamp annotations `a` -> `b` on a + * forward edge have `maxA >= minB`. + */ + predicate strictForward(TimerCfgNode a, TimerCfgNode b, int maxA, int minB) { + nextTimerAnnotation(a, b) and + not a.isDead() and + not b.isDead() and + // Only apply to non-loop code (single timestamps on both sides) + strictcount(a.getATimestamp()) = 1 and + strictcount(b.getATimestamp()) = 1 and + // Forward edge: B does not strictly dominate A (excludes loop back-edges + // but still checks same-basic-block pairs) + not b.getBasicBlock().strictlyDominates(a.getBasicBlock()) and + maxA = max(a.getATimestamp()) and + minB = min(b.getATimestamp()) and + maxA >= minB + } + + /** + * Holds if CFG node `n` in test function `f` does not belong to any basic block. + */ + predicate noBasicBlock(CfgNode n, TestFunction f) { + n.getScope() = f and + not exists(n.getBasicBlock()) + } + + /** + * Holds if non-dead annotation `ann` has no corresponding CFG node. + */ + predicate annotationWithoutCfgNode(TimerAnnotation ann) { + not ann.isDead() and + not ann.isNever() and + not exists(CfgNode n | n.getNode() = ann.getAnnotatedExpr()) + } + + predicate annotationWithCfgNode(TimerAnnotation ann) { + exists(CfgNode n | n.getNode() = ann.getAnnotatedExpr()) + } + + /** + * Holds if annotation `ann` with timestamp `a` has no consecutive + * predecessor (expected `a - 1`) in the CFG. + */ + predicate consecutivePredecessorTimestamps(TimerAnnotation ann, int a) { + not hasNestedScopeAnnotation(ann.getTestFunction()) and + not ann.isDead() and + a = ann.getATimestamp() and + not exists(TimerCfgNode x, TimerCfgNode y | + ann.getAnnotatedExpr() = y.getNode() and + nextTimerAnnotation(x, y) and + (a - 1) = x.getATimestamp() + ) and + // Exclude the minimum timestamp in the function (it has no predecessor) + not a = + min(TimerAnnotation other | + other.getTestFunction() = ann.getTestFunction() and + not other.isDead() + | + other.getATimestamp() + ) + } + + /** + * Holds if `node` has both a true and false successor, but the true + * successor's timestamp `ts` is not marked as dead on the false + * successor (or vice versa). + * + * This checks that boolean branches are properly annotated: when a + * condition splits into true/false paths, the next annotated node + * on each side should account for the other side's timestamps as dead. + */ + predicate missingBranchTimestamp(TimerCfgNode node, int ts, string branch) { + not hasNestedScopeAnnotation(node.getTestFunction()) and + exists(TimerCfgNode trueNext, TimerCfgNode falseNext | + nextTimerAnnotationFromTrue(node, trueNext) and + nextTimerAnnotationFromFalse(node, falseNext) and + trueNext != falseNext + | + // True successor has live timestamp ts, but false successor + // doesn't have it as dead + ts = trueNext.getATimestamp() and + not falseNext.isDeadTimestamp(ts) and + not ts = falseNext.getATimestamp() and + branch = "false" + or + // False successor has live timestamp ts, but true successor + // doesn't have it as dead + ts = falseNext.getATimestamp() and + not trueNext.isDeadTimestamp(ts) and + not ts = trueNext.getATimestamp() and + branch = "true" + ) + } + } +} + +/** + * Holds if `e` is part of the timer mechanism: a top-level timer + * expression or a (transitive) sub-expression of one. + */ +predicate isTimerMechanism(Expr e, TestFunction f) { + exists(TimerAnnotation a | + a.getTestFunction() = f and + e = a.getTimerExpr().getASubExpression*() + ) +} + +/** + * Holds if expression `e` cannot be annotated due to Python syntax + * limitations (e.g., it is a definition target, a pattern, or part + * of a decorator application). + */ +predicate isUnannotatable(Expr e) { + // Function/class definitions + e instanceof FunctionExpr + or + e instanceof ClassExpr + or + // Docstrings are string literals used as expression statements + e instanceof StringLiteral and e.getParent() instanceof ExprStmt + or + // Function parameters are bound by the call, not evaluated in the body + e instanceof Parameter + or + // Name nodes that are definitions or deletions (assignment targets, def/class + // name bindings, augmented assignment targets, for-loop targets, del targets) + e.(Name).isDefinition() + or + e.(Name).isDeletion() + or + // Tuple/List/Starred nodes in assignment or for-loop targets are + // structural unpack patterns, not evaluations + (e instanceof Tuple or e instanceof List or e instanceof Starred) and + e = any(AssignStmt a).getATarget().getASubExpression*() + or + (e instanceof Tuple or e instanceof List or e instanceof Starred) and + e = any(For f).getTarget().getASubExpression*() + or + // The decorator call node wrapping a function/class definition, + // and its sub-expressions (the decorator name itself) + e = any(FunctionExpr func).getADecoratorCall().getASubExpression*() + or + e = any(ClassExpr cls).getADecoratorCall().getASubExpression*() + or + // Augmented assignment (x += e): the implicit BinaryExpr for the operation + e = any(AugAssign aug).getOperation() + or + // with-statement `as` variables are bindings + (e instanceof Name or e instanceof Tuple or e instanceof List) and + e = any(With w).getOptionalVars().getASubExpression*() + or + // except-clause exception type and `as` variable are part of except syntax + exists(ExceptStmt ex | e = ex.getType() or e = ex.getName()) + or + // match/case pattern expressions are part of pattern syntax + e.getParent+() instanceof Pattern + or + // Subscript/Attribute nodes on the LHS of an assignment are store + // operations, not value expressions (including nested ones like d["a"][1]) + (e instanceof Subscript or e instanceof Attribute) and + e = any(AssignStmt a).getATarget().getASubExpression*() + or + // Match/case guard nodes are part of case syntax + e instanceof Guard + or + // Yield/YieldFrom in statement position — the return value is + // discarded and cannot be meaningfully annotated + (e instanceof Yield or e instanceof YieldFrom) and + e.getParent() instanceof ExprStmt + or + // Synthetic nodes inside desugared comprehensions + e.getScope() = any(Comp c).getFunction() and + ( + e.(Name).getId() = ".0" + or + e instanceof Tuple and e.getParent() instanceof Yield + ) +} diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_assert_raise.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_assert_raise.py new file mode 100644 index 00000000000..692a9c6e407 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_assert_raise.py @@ -0,0 +1,56 @@ +"""Assert and raise statement evaluation order.""" + +from timer import test, dead + + +@test +def test_assert_true(t): + x = True @ t[0] + assert x @ t[1] + y = 1 @ t[2] + + +@test +def test_assert_true_with_message(t): + x = True @ t[0] + assert x @ t[1], "msg" @ t[dead(2)] + y = 1 @ t[2] + + +@test +def test_assert_false_caught(t): + try: + x = False @ t[0] + assert x @ t[1], "fail" @ t[2] + except AssertionError: + y = 1 @ t[3] + + +@test +def test_raise_caught(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])("test" @ t[2]) @ t[3]) + except ValueError: + y = 2 @ t[4] + + +@test +def test_raise_from_caught(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])("test" @ t[2]) @ t[3]) from ((RuntimeError @ t[4])("cause" @ t[5]) @ t[6]) + except ValueError: + y = 2 @ t[7] + + +@test +def test_bare_reraise(t): + try: + try: + raise ((ValueError @ t[0])("test" @ t[1]) @ t[2]) + except ValueError: + x = 1 @ t[3] + raise + except ValueError: + y = 2 @ t[4] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_async.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_async.py new file mode 100644 index 00000000000..0c9b08e3e9e --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_async.py @@ -0,0 +1,97 @@ +"""Async/await evaluation order tests. + +Coroutine bodies are lazy — like generators, the body runs only when +awaited (or driven by the event loop). asyncio.run() drives the +coroutine to completion synchronously from the caller's perspective. +""" + +import asyncio +from contextlib import asynccontextmanager +from timer import test + + +@test +def test_simple_async(t): + """Simple async function: body runs inside asyncio.run().""" + async def coro(): + x = 1 @ t[4] + return x @ t[5] + + result = ((asyncio @ t[0]).run @ t[1])((coro @ t[2])() @ t[3]) @ t[6] + + +@test +def test_await_expression(t): + """await suspends the caller until the inner coroutine completes.""" + async def helper(): + return 1 @ t[4] + + async def main(): + x = await helper() @ t[5] + return x @ t[6] + + result = ((asyncio @ t[0]).run @ t[1])((main @ t[2])() @ t[3]) @ t[7] + + +@test +def test_async_for(t): + """async for iterates an async generator.""" + async def agen(): + yield 1 @ t[5] + yield 2 @ t[7] + + async def main(): + async for val in agen() @ t[4]: + val @ t[6, 8] + + ((asyncio @ t[0]).run @ t[1])((main @ t[2])() @ t[3]) @ t[9] + + +@test +def test_async_with(t): + """async with enters/exits an async context manager.""" + @asynccontextmanager + async def ctx(): + yield 1 @ t[5] + + async def main(): + async with ctx() @ t[4] as val: + val @ t[6] + + ((asyncio @ t[0]).run @ t[1])((main @ t[2])() @ t[3]) @ t[7] + + +@test +def test_multiple_awaits(t): + """Sequential awaits in one coroutine.""" + async def task_a(): + return 10 @ t[4] + + async def task_b(): + return 20 @ t[6] + + async def main(): + a = await task_a() @ t[5] + b = await task_b() @ t[7] + return (a @ t[8] + b @ t[9]) @ t[10] + + result = ((asyncio @ t[0]).run @ t[1])((main @ t[2])() @ t[3]) @ t[11] + + +@test +def test_gather(t): + """asyncio.gather schedules coroutines as concurrent tasks.""" + async def task_a(): + return 1 @ t[6] + + async def task_b(): + return 2 @ t[7] + + async def main(): + results = await asyncio.gather( + task_a() @ t[4], + task_b() @ t[5], + ) @ t[8] + return results @ t[9] + + result = ((asyncio @ t[0]).run @ t[1])((main @ t[2])() @ t[3]) @ t[10] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_augassign.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_augassign.py new file mode 100644 index 00000000000..2f1d5eb5c3e --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_augassign.py @@ -0,0 +1,53 @@ +"""Augmented assignment evaluation order.""" + +from timer import test + + +@test +def test_plus_equals(t): + x = 1 @ t[0] + x += 2 @ t[1] + y = x @ t[2] + + +@test +def test_sub_mul_div(t): + x = 20 @ t[0] + x -= 5 @ t[1] + x *= 2 @ t[2] + x /= 6 @ t[3] + x = 17 @ t[4] + x //= 3 @ t[5] + x %= 3 @ t[6] + y = x @ t[7] + + +@test +def test_power_equals(t): + x = 2 @ t[0] + x **= 3 @ t[1] + y = x @ t[2] + + +@test +def test_bitwise_equals(t): + x = 0b1111 @ t[0] + x &= 0b1010 @ t[1] + x |= 0b0101 @ t[2] + x ^= 0b0011 @ t[3] + y = x @ t[4] + + +@test +def test_shift_equals(t): + x = 1 @ t[0] + x <<= 4 @ t[1] + x >>= 2 @ t[2] + y = x @ t[3] + + +@test +def test_list_extend(t): + x = [1 @ t[0], 2 @ t[1]] @ t[2] + x += [3 @ t[3], 4 @ t[4]] @ t[5] + y = x @ t[6] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py new file mode 100644 index 00000000000..3e8ee925d91 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py @@ -0,0 +1,223 @@ +"""Basic expression evaluation order. + +These tests verify that sub-expressions within a single expression +are evaluated in the expected order (typically left to right for +operands of binary operators, elements of collection literals, etc.) + +Every evaluated expression has a timestamp annotation, except the +timer mechanism itself (t[n], t.dead[n]). +""" + +from timer import test, never + + +@test +def test_sequential_statements(t): + """Statements execute top to bottom.""" + x = 1 @ t[0] + y = 2 @ t[1] + z = 3 @ t[2] + + +@test +def test_binary_add(t): + """In a + b, left operand evaluates before right.""" + x = (1 @ t[0] + 2 @ t[1]) @ t[2] + + +@test +def test_binary_subtract(t): + """In a - b, left operand evaluates before right.""" + x = (10 @ t[0] - 3 @ t[1]) @ t[2] + + +@test +def test_binary_multiply(t): + """In a * b, left operand evaluates before right.""" + x = ((3 @ t[0]) * (4 @ t[1])) @ t[2] + + +@test +def test_nested_binary(t): + """Sub-expressions evaluate before their containing expression.""" + x = ((1 @ t[0] + 2 @ t[1]) @ t[2] + (3 @ t[3] + 4 @ t[4]) @ t[5]) @ t[6] + + +@test +def test_chained_add(t): + """a + b + c is (a + b) + c: left to right.""" + x = ((1 @ t[0] + 2 @ t[1]) @ t[2] + 3 @ t[3]) @ t[4] + + +@test +def test_mixed_precedence(t): + """In a + b * c, all operands still evaluate left to right.""" + x = (1 @ t[0] + ((2 @ t[1]) * (3 @ t[2])) @ t[3]) @ t[4] + + +@test +def test_string_concat(t): + """String concatenation operands: left to right.""" + x = (("hello" @ t[0] + " " @ t[1]) @ t[2] + "world" @ t[3]) @ t[4] + + +@test +def test_comparison(t): + """In a < b, left operand evaluates before right.""" + x = (1 @ t[0] < 2 @ t[1]) @ t[2] + + +@test +def test_chained_comparison(t): + """Chained a < b < c: all evaluated left to right (b only once).""" + x = (1 @ t[0] < 2 @ t[1] < 3 @ t[2]) @ t[3] + + +@test +def test_list_elements(t): + """List elements evaluate left to right.""" + x = [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3] + + +@test +def test_dict_entries(t): + """Dict: key before value, entries left to right.""" + d = {1 @ t[0]: "a" @ t[1], 2 @ t[2]: "b" @ t[3]} @ t[4] + + +@test +def test_tuple_elements(t): + """Tuple elements evaluate left to right.""" + x = (1 @ t[0], 2 @ t[1], 3 @ t[2]) @ t[3] + + +@test +def test_set_elements(t): + """Set elements evaluate left to right.""" + x = {1 @ t[0], 2 @ t[1], 3 @ t[2]} @ t[3] + + +@test +def test_subscript(t): + """In obj[idx], object evaluates before index.""" + x = ([10 @ t[0], 20 @ t[1], 30 @ t[2]] @ t[3])[1 @ t[4]] @ t[5] + + +@test +def test_slice(t): + """Slice parameters: object, then start, then stop.""" + x = ([1 @ t[0], 2 @ t[1], 3 @ t[2], 4 @ t[3], 5 @ t[4]] @ t[5])[1 @ t[6]:3 @ t[7]] @ t[8] + + +@test +def test_method_call(t): + """Object evaluated, then attribute lookup, then arguments left to right, then call.""" + x = (("hello world" @ t[0]).replace @ t[1])("world" @ t[2], "there" @ t[3]) @ t[4] + + +@test +def test_method_chaining(t): + """Chained method calls: left to right.""" + x = ((((" hello " @ t[0]).strip @ t[1])() @ t[2]).upper @ t[3])() @ t[4] + + +@test +def test_unary_not(t): + """Unary not: operand evaluated first.""" + x = (not True @ t[0]) @ t[1] + + +@test +def test_unary_neg(t): + """Unary negation: operand evaluated first.""" + x = (-(3 @ t[0])) @ t[1] + + +@test +def test_multiple_assignment(t): + """RHS evaluated once in x = y = expr.""" + x = y = (1 @ t[0] + 2 @ t[1]) @ t[2] + + +@test +def test_callable_syntax(t): + """t(value, n) is equivalent to value @ t[n].""" + x = (1 @ t[0] + 2 @ t[1]) @ t[2] + y = (x @ t[3] * 3 @ t[4]) @ t[5] + + +@test +def test_subscript_assign(t): + """In obj[idx] = val, value is evaluated before target sub-expressions.""" + lst = [0 @ t[0], 0 @ t[1], 0 @ t[2]] @ t[3] + (lst @ t[5])[1 @ t[6]] = 42 @ t[4] + x = lst @ t[7] + + +@test +def test_attribute_assign(t): + """In obj.attr = val, value is evaluated before the object.""" + class Obj: + pass + o = (Obj @ t[0])() @ t[1] + (o @ t[3]).x = 42 @ t[2] + y = (o @ t[4]).x @ t[5] + + +@test +def test_nested_subscript_assign(t): + """Nested subscript assignment: val, then outer obj, then keys.""" + d = {"a" @ t[0]: [0 @ t[1], 0 @ t[2]] @ t[3]} @ t[4] + (d @ t[6])["a" @ t[7]][1 @ t[8]] = 99 @ t[5] + x = d @ t[9] + + +@test +def test_unreachable_after_return(t): + """Code after return has no CFG node.""" + def f(): + x = 1 @ t[1] + return x @ t[2] + y = 2 @ t[never] + result = (f @ t[0])() @ t[3] + + +@test +def test_none_literal(t): + """None is a name constant.""" + x = None @ t[0] + y = (x @ t[1] is None @ t[2]) @ t[3] + + +@test +def test_delete(t): + """del statement removes a variable binding.""" + x = 1 @ t[0] + del x + y = 2 @ t[1] + + +@test +def test_global(t): + """global statement allows writing to module-level variable.""" + global _test_global_var + _test_global_var = 1 @ t[0] + x = _test_global_var @ t[1] + + +@test +def test_nonlocal(t): + """nonlocal statement allows inner function to rebind outer variable.""" + x = 0 @ t[0] + def inner(): + nonlocal x + x = 1 @ t[2] + (inner @ t[1])() @ t[3] + y = x @ t[4] + + +@test +def test_walrus(t): + """Walrus operator := evaluates the RHS and binds it.""" + if (y := 1 @ t[0]) @ t[1]: + z = y @ t[2] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py new file mode 100644 index 00000000000..a3b2268a831 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py @@ -0,0 +1,76 @@ +"""Short-circuit boolean operators and evaluation order.""" + +from timer import test, dead + + +@test +def test_and_both_sides(t): + # True and X — both operands evaluated, result is X + x = (True @ t[0] and 42 @ t[1, dead(2)]) @ t[dead(1), 2] + + +@test +def test_and_short_circuit(t): + # False and ... — right side never evaluated + x = (False @ t[0] and True @ t[dead(1)]) @ t[1, dead(2)] + + +@test +def test_or_short_circuit(t): + # True or ... — right side never evaluated + x = (True @ t[0] or False @ t[dead(1)]) @ t[1, dead(2)] + + +@test +def test_or_both_sides(t): + # False or X — both operands evaluated, result is X + x = (False @ t[0] or 42 @ t[1, dead(2)]) @ t[dead(1), 2] + + +@test +def test_not(t): + # not evaluates its operand, then negates + x = (not True @ t[0]) @ t[1] + y = (not False @ t[2]) @ t[3] + + +@test +def test_chained_and(t): + # 1 and 2 and 3 — all truthy, all evaluated left-to-right + x = (1 @ t[0] and 2 @ t[1, dead(3)] and 3 @ t[2, dead(3)]) @ t[dead(1), dead(2), 3] + + +@test +def test_chained_or(t): + # 0 or "" or 42 — first two falsy, all evaluated until truthy found + x = (0 @ t[0] or "" @ t[1, dead(3)] or 42 @ t[2, dead(3)]) @ t[dead(1), dead(2), 3] + + +@test +def test_mixed_and_or(t): + # True and False or 42 => (True and False) or 42 => False or 42 => 42 + x = ((True @ t[0] and False @ t[1, dead(2)]) @ t[dead(1), 2, dead(4)] or 42 @ t[3, dead(4)]) @ t[dead(2), dead(3), 4] + + +@test +def test_and_side_effects(t): + # Both functions called when left side is truthy + def f(): + return 10 @ t[1] + + def g(): + return 20 @ t[4] + + x = ((f @ t[0])() @ t[2] and (g @ t[3])() @ t[5]) @ t[6] + + +@test +def test_or_side_effects(t): + # Both functions called when left side is falsy + def f(): + return 0 @ t[1] + + def g(): + return 20 @ t[4] + + x = ((f @ t[0])() @ t[2] or (g @ t[3])() @ t[5]) @ t[6] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_classes.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_classes.py new file mode 100644 index 00000000000..92313b5073c --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_classes.py @@ -0,0 +1,74 @@ +"""Class definitions — evaluation order.""" + +from timer import test + + +@test +def test_simple_class(t): + """Simple class definition and instantiation.""" + class Foo: + pass + obj = (Foo @ t[0])() @ t[1] + + +@test +def test_class_with_bases(t): + """Base class expressions evaluated at class definition time.""" + class Base: + pass + class Derived(Base @ t[0]): + pass + obj = (Derived @ t[1])() @ t[2] + + +@test +def test_class_with_methods(t): + """Object evaluated before method is called.""" + class Foo: + def greet(self, name): + return ("hello " @ t[5] + name @ t[6]) @ t[7] + obj = (Foo @ t[0])() @ t[1] + msg = ((obj @ t[2]).greet @ t[3])("world" @ t[4]) @ t[8] + + +@test +def test_class_instantiation(t): + """Arguments to __init__ evaluate before instantiation completes.""" + class Foo: + def __init__(self, x): + (self @ t[3]).x = x @ t[2] + obj = (Foo @ t[0])(42 @ t[1]) @ t[4] + val = (obj @ t[5]).x @ t[6] + + +@test +def test_method_call(t): + """Method arguments evaluate left-to-right before the call.""" + class Calculator: + def __init__(self, value): + (self @ t[3]).value = value @ t[2] + def add(self, x): + return ((self @ t[8]).value @ t[9] + x @ t[10]) @ t[11] + calc = (Calculator @ t[0])(10 @ t[1]) @ t[4] + result = ((calc @ t[5]).add @ t[6])(5 @ t[7]) @ t[12] + + +@test +def test_class_level_attribute(t): + """Multiple attribute accesses in a single expression.""" + class Config: + debug = True @ t[0] + version = 1 @ t[1] + x = ((Config @ t[2]).debug @ t[3], (Config @ t[4]).version @ t[5]) @ t[6] + + +@test +def test_class_decorator(t): + """Decorator expression evaluated, class defined, then decorator called.""" + def add_marker(cls): + (cls @ t[2]).marked = True @ t[1] + return cls @ t[3] + @(add_marker @ t[0]) + class Foo: + pass + result = (Foo @ t[4]).marked @ t[5] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_comprehensions.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_comprehensions.py new file mode 100644 index 00000000000..8ce8ca6e4c4 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_comprehensions.py @@ -0,0 +1,46 @@ +"""Evaluation order tests for comprehensions and generator expressions.""" + +from timer import test + + +@test +def test_list_comprehension(t): + items = [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3] + result = [x @ t[5, 6, 7] for x in items @ t[4]] @ t[8] + + +@test +def test_filtered_comprehension(t): + items = [1 @ t[0], 2 @ t[1], 3 @ t[2], 4 @ t[3]] @ t[4] + result = [x @ t[14, 23] for x in items @ t[5] if (x @ t[6, 10, 15, 19] % 2 @ t[7, 11, 16, 20] == 0 @ t[8, 12, 17, 21]) @ t[9, 13, 18, 22]] @ t[24] + + +@test +def test_dict_comprehension(t): + items = [("a" @ t[0], 1 @ t[1]) @ t[2], ("b" @ t[3], 2 @ t[4]) @ t[5]] @ t[6] + result = {k @ t[8, 10]: v @ t[9, 11] for k, v in items @ t[7]} @ t[12] + + +@test +def test_set_comprehension(t): + items = [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3] + result = {x @ t[5, 6, 7] for x in items @ t[4]} @ t[8] + + +@test +def test_generator_expression(t): + items = [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3] + gen = (x @ t[8, 9, 10] for x in items @ t[4]) @ t[5] + result = (list @ t[6])(gen @ t[7]) @ t[11] + + +@test +def test_nested_comprehension(t): + matrix = [[1 @ t[0], 2 @ t[1]] @ t[2], [3 @ t[3], 4 @ t[4]] @ t[5]] @ t[6] + result = [x @ t[9, 10, 12, 13] for row in matrix @ t[7] for x in row @ t[8, 11]] @ t[14] + + +@test +def test_comprehension_with_call(t): + items = [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3] + result = [(str @ t[5, 8, 11])(x @ t[6, 9, 12]) @ t[7, 10, 13] for x in items @ t[4]] @ t[14] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_conditional.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_conditional.py new file mode 100644 index 00000000000..48d45a77958 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_conditional.py @@ -0,0 +1,44 @@ +"""Ternary conditional expressions and evaluation order.""" + +from timer import test, dead + + +@test +def test_ternary_true(t): + # Condition is True — consequent evaluated, alternative skipped + x = (1 @ t[1] if True @ t[0] else 2 @ t[dead(1)]) @ t[2] + + +@test +def test_ternary_false(t): + # Condition is False — alternative evaluated, consequent skipped + x = (1 @ t[dead(1)] if False @ t[0] else 2 @ t[1]) @ t[2] + + +@test +def test_ternary_nested(t): + # Nested: outer condition True, inner condition True + # ((10 if C1 else 20) if C2 else 30) — C2 first, then C1, then 10 + x = ((10 @ t[2] if True @ t[1] else 20 @ t[dead(2)]) @ t[3] if True @ t[0] else 30 @ t[dead(1)]) @ t[4] + + +@test +def test_ternary_assignment(t): + # Ternary result assigned, then used in later expression + value = (100 @ t[1] if True @ t[0] else 200 @ t[dead(1)]) @ t[2] + result = (value @ t[3] + 1 @ t[4]) @ t[5] + + +@test +def test_ternary_complex_expressions(t): + # Complex sub-expressions in condition and consequent + x = ((1 @ t[3] + 2 @ t[4]) @ t[5] if (3 @ t[0] > 2 @ t[1]) @ t[2] else (4 @ t[dead(3)] + 5 @ t[dead(4)]) @ t[dead(5)]) @ t[6] + + +@test +def test_ternary_as_argument(t): + # Ternary used as a function argument + def f(a): + return a @ t[4] + + result = (f @ t[0])((1 @ t[2] if True @ t[1] else 2 @ t[dead(2)]) @ t[3]) @ t[5] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_fstring.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_fstring.py new file mode 100644 index 00000000000..2dd36f6ef36 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_fstring.py @@ -0,0 +1,34 @@ +"""F-string evaluation order.""" + +from timer import test + + +@test +def test_simple_fstring(t): + name = "world" @ t[0] + s = f"hello {name @ t[1]}" @ t[2] + + +@test +def test_multi_expr_fstring(t): + a = "hello" @ t[0] + b = "world" @ t[1] + s = f"{a @ t[2]} {b @ t[3]}" @ t[4] + + +@test +def test_nested_fstring(t): + inner = "world" @ t[0] + s = f"hello {f'dear {inner @ t[1]}' @ t[2]}" @ t[3] + + +@test +def test_format_spec(t): + x = 3.14159 @ t[0] + s = f"{x @ t[1]:.2f}" @ t[2] + + +@test +def test_method_in_fstring(t): + name = "world" @ t[0] + s = f"hello {((name @ t[1]).upper @ t[2])() @ t[3]}" @ t[4] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_functions.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_functions.py new file mode 100644 index 00000000000..e19b944c4ce --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_functions.py @@ -0,0 +1,85 @@ +"""Function calls and definitions — evaluation order.""" + +from timer import test + + +@test +def test_argument_order(t): + """Arguments evaluate left-to-right before the call.""" + def add(a, b): + return (a @ t[3] + b @ t[4]) @ t[5] + result = (add @ t[0])(1 @ t[1], 2 @ t[2]) @ t[6] + + +@test +def test_multiple_arguments(t): + """All arguments left-to-right, then the call.""" + def f(a, b, c): + return ((a @ t[4] + b @ t[5]) @ t[6] + c @ t[7]) @ t[8] + result = (f @ t[0])(1 @ t[1], 2 @ t[2], 3 @ t[3]) @ t[9] + + +@test +def test_default_arguments(t): + """Default expressions are evaluated at definition time.""" + val = 5 @ t[0] + def f(a, b=val @ t[1]): + return (a @ t[4] + b @ t[5]) @ t[6] + result = (f @ t[2])(10 @ t[3]) @ t[7] + + +@test +def test_args_kwargs(t): + """*args and **kwargs — expressions evaluated before the call.""" + def f(*args, **kwargs): + return ((sum @ t[9])(args @ t[10]) @ t[11] + (sum @ t[12])(((kwargs @ t[13]).values @ t[14])() @ t[15]) @ t[16]) @ t[17] + args = [1 @ t[0], 2 @ t[1]] @ t[2] + kwargs = {"c" @ t[3]: 3 @ t[4]} @ t[5] + result = (f @ t[6])(*args @ t[7], **kwargs @ t[8]) @ t[18] + + +@test +def test_nested_calls(t): + """Inner call completes before becoming an argument to outer call.""" + def f(x): + return (x @ t[7] + 1 @ t[8]) @ t[9] + def g(x): + return (x @ t[3] * 2 @ t[4]) @ t[5] + result = (f @ t[0])((g @ t[1])(1 @ t[2]) @ t[6]) @ t[10] + + +@test +def test_function_as_argument(t): + """Function object is just another argument, evaluated left-to-right.""" + def apply(fn, x): + return (fn @ t[3])(x @ t[4]) @ t[8] + def double(x): + return (x @ t[5] * 2 @ t[6]) @ t[7] + result = (apply @ t[0])(double @ t[1], 5 @ t[2]) @ t[9] + + +@test +def test_decorator(t): + """Decorator: expression evaluated, function defined, decorator called.""" + def my_decorator(fn): + return fn @ t[1] + @(my_decorator @ t[0]) + def f(): + return 42 @ t[3] + result = (f @ t[2])() @ t[4] + + +@test +def test_keyword_arguments(t): + """Keyword argument values evaluate left-to-right.""" + def f(a, b): + return (a @ t[3] + b @ t[4]) @ t[5] + result = (f @ t[0])(a=1 @ t[1], b=2 @ t[2]) @ t[6] + + +@test +def test_return_value(t): + """The return value is just the result of the call expression.""" + def f(x): + return (x @ t[2] * 2 @ t[3]) @ t[4] + result = (f @ t[0])(3 @ t[1]) @ t[5] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_if.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_if.py new file mode 100644 index 00000000000..8880aaaef34 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_if.py @@ -0,0 +1,108 @@ +"""If/elif/else control flow evaluation order.""" + +from timer import test, dead + + +@test +def test_if_true(t): + x = True @ t[0] + if x @ t[1]: + y = 1 @ t[2] + z = 0 @ t[3] + + +@test +def test_if_false(t): + x = False @ t[0] + if x @ t[1]: + y = 1 @ t[dead(2)] + z = 0 @ t[2] + + +@test +def test_if_else_true(t): + x = True @ t[0] + if x @ t[1]: + y = 1 @ t[2] + else: + y = 2 @ t[dead(2)] + z = 0 @ t[3] + + +@test +def test_if_else_false(t): + x = False @ t[0] + if x @ t[1]: + y = 1 @ t[dead(2)] + else: + y = 2 @ t[2] + z = 0 @ t[3] + + +@test +def test_if_elif_else_first(t): + x = 1 @ t[0] + if (x @ t[1] == 1 @ t[2]) @ t[3]: + y = "first" @ t[4] + elif (x @ t[dead(4)] == 2 @ t[dead(5)]) @ t[dead(6)]: + y = "second" @ t[dead(4)] + else: + y = "third" @ t[dead(4)] + z = 0 @ t[5] + + +@test +def test_if_elif_else_second(t): + x = 2 @ t[0] + if (x @ t[1] == 1 @ t[2]) @ t[3]: + y = "first" @ t[dead(7)] + elif (x @ t[4] == 2 @ t[5]) @ t[6]: + y = "second" @ t[7] + else: + y = "third" @ t[dead(7)] + z = 0 @ t[8] + + +@test +def test_if_elif_else_third(t): + x = 3 @ t[0] + if (x @ t[1] == 1 @ t[2]) @ t[3]: + y = "first" @ t[dead(7)] + elif (x @ t[4] == 2 @ t[5]) @ t[6]: + y = "second" @ t[dead(7)] + else: + y = "third" @ t[7] + z = 0 @ t[8] + + +@test +def test_nested_if_else(t): + x = True @ t[0] + y = True @ t[1] + if x @ t[2]: + if y @ t[3]: + z = 1 @ t[4] + else: + z = 2 @ t[dead(4)] + else: + z = 3 @ t[dead(4)] + w = 0 @ t[5] + + +@test +def test_if_compound_condition(t): + x = True @ t[0] + y = False @ t[1] + if (x @ t[2] and y @ t[3]) @ t[4]: + z = 1 @ t[dead(5)] + else: + z = 2 @ t[5] + w = 0 @ t[6] + + +@test +def test_if_pass(t): + x = True @ t[0] + if x @ t[1]: + pass + z = 0 @ t[2] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_lambda.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_lambda.py new file mode 100644 index 00000000000..c60cbb5b317 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_lambda.py @@ -0,0 +1,46 @@ +"""Lambda expressions — evaluation order.""" + +from timer import test + + +@test +def test_simple_lambda(t): + """Lambda creates a function object in one step.""" + f = (lambda x: (x @ t[3] + 1 @ t[4]) @ t[5]) @ t[0] + result = (f @ t[1])(10 @ t[2]) @ t[6] + + +@test +def test_lambda_multiple_args(t): + """Lambda call: arguments evaluate left to right.""" + f = (lambda a, b, c: ((a @ t[5] + b @ t[6]) @ t[7] + c @ t[8]) @ t[9]) @ t[0] + result = (f @ t[1])(1 @ t[2], 2 @ t[3], 3 @ t[4]) @ t[10] + + +@test +def test_lambda_default(t): + """Default argument evaluated at lambda creation time.""" + val = 5 @ t[0] + f = (lambda x, y=val @ t[1]: (x @ t[5] + y @ t[6]) @ t[7]) @ t[2] + result = (f @ t[3])(10 @ t[4]) @ t[8] + + +@test +def test_lambda_map(t): + """Lambda body runs once per element when consumed by list(map(...)).""" + f = (lambda x: (x @ t[9, 12, 15] * 2 @ t[10, 13, 16]) @ t[11, 14, 17]) @ t[0] + result = (list @ t[1])((map @ t[2])(f @ t[3], [1 @ t[4], 2 @ t[5], 3 @ t[6]] @ t[7]) @ t[8]) @ t[18] + + +@test +def test_immediately_invoked(t): + """Arguments evaluated, then immediately-invoked lambda called.""" + result = ((lambda x: (x @ t[2] + 1 @ t[3]) @ t[4]) @ t[0])(10 @ t[1]) @ t[5] + + +@test +def test_lambda_closure(t): + """Lambda captures enclosing scope; body runs at call time.""" + x = 10 @ t[0] + f = (lambda: x @ t[3]) @ t[1] + result = (f @ t[2])() @ t[4] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_loops.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_loops.py new file mode 100644 index 00000000000..17df7a4703a --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_loops.py @@ -0,0 +1,146 @@ +"""Loop control flow evaluation order tests.""" + +from timer import test, dead + + +# 1. Simple while loop (fixed iterations) +@test +def test_while_loop(t): + i = 0 @ t[0] + while (i @ t[1, 7, 13, 19] < 3 @ t[2, 8, 14, 20]) @ t[3, 9, 15, 21]: # 4 checks: 3 true + 1 false + i = (i @ t[4, 10, 16] + 1 @ t[5, 11, 17]) @ t[6, 12, 18] + done = True @ t[22] + + +# 2. While loop with break +@test +def test_while_break(t): + i = 0 @ t[0] + while (i @ t[1, 10, 19] < 5 @ t[2, 11, 20]) @ t[3, 12, 21]: + if (i @ t[4, 13, 22] == 2 @ t[5, 14, 23]) @ t[6, 15, 24]: + break + i = (i @ t[7, 16] + 1 @ t[8, 17]) @ t[9, 18] + done = True @ t[25] + + +# 3. While loop with continue +@test +def test_while_continue(t): + i = 0 @ t[0] + total = 0 @ t[1] + while (i @ t[2, 14, 23, 35] < 3 @ t[3, 15, 24, 36]) @ t[4, 16, 25, 37]: + i = (i @ t[5, 17, 26] + 1 @ t[6, 18, 27]) @ t[7, 19, 28] + if (i @ t[8, 20, 29] == 2 @ t[9, 21, 30]) @ t[10, 22, 31]: + continue + total = (total @ t[11, 32] + i @ t[12, 33]) @ t[13, 34] + done = True @ t[38] + + +# 4. While/else (no break — else executes) +@test +def test_while_else(t): + i = 0 @ t[0] + while (i @ t[1, 7, 13] < 2 @ t[2, 8, 14]) @ t[3, 9, 15]: + i = (i @ t[4, 10] + 1 @ t[5, 11]) @ t[6, 12] + else: + done = True @ t[16] + + +# 5. While/else (with break — else skipped) +@test +def test_while_else_break(t): + i = 0 @ t[0] + while (i @ t[1, 10] < 5 @ t[2, 11]) @ t[3, 12]: + if (i @ t[4, 13] == 1 @ t[5, 14]) @ t[6, 15]: + break + i = (i @ t[7] + 1 @ t[8]) @ t[9] + else: + never = True @ t[dead(16)] + after = True @ t[16] + + +# 6. Simple for loop over a list +@test +def test_for_list(t): + for x in [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3]: + x @ t[4, 5, 6] + done = True @ t[7] + + +# 7. For loop with range +@test +def test_for_range(t): + for i in (range @ t[0])(3 @ t[1]) @ t[2]: + i @ t[3, 4, 5] + done = True @ t[6] + + +# 8. For loop with break +@test +def test_for_break(t): + for x in [1 @ t[0], 2 @ t[1], 3 @ t[2], 4 @ t[3]] @ t[4]: + if (x @ t[5, 9, 13] == 3 @ t[6, 10, 14]) @ t[7, 11, 15]: + break + x @ t[8, 12] + done = True @ t[16] + + +# 9. For loop with continue +@test +def test_for_continue(t): + total = 0 @ t[0] + for x in [1 @ t[1], 2 @ t[2], 3 @ t[3]] @ t[4]: + if (x @ t[5, 11, 14] == 2 @ t[6, 12, 15]) @ t[7, 13, 16]: + continue + total = (total @ t[8, 17] + x @ t[9, 18]) @ t[10, 19] + done = True @ t[20] + + +# 10. For/else (no break — else executes) +@test +def test_for_else(t): + for x in [1 @ t[0], 2 @ t[1]] @ t[2]: + x @ t[3, 4] + else: + done = True @ t[5] + + +# 11. For/else (with break — else skipped) +@test +def test_for_else_break(t): + for x in [1 @ t[0], 2 @ t[1], 3 @ t[2]] @ t[3]: + if (x @ t[4, 8] == 2 @ t[5, 9]) @ t[6, 10]: + break + x @ t[7] + else: + never = True @ t[dead(11)] + after = True @ t[11] + + +# 12. Nested loops +@test +def test_nested_loops(t): + for i in [1 @ t[0], 2 @ t[1]] @ t[2]: + for j in [10 @ t[3, 12], 20 @ t[4, 13]] @ t[5, 14]: + (i @ t[6, 9, 15, 18, dead(21)] + j @ t[7, 10, 16, 19]) @ t[8, 11, 17, 20] + done = True @ t[dead(3), dead(6), dead(9), dead(12), dead(15), dead(18), 21] + + +# 13. While True with conditional break +@test +def test_while_true_break(t): + i = 0 @ t[0] + while True @ t[1, 8, 15]: + i = (i @ t[2, 9, 16] + 1 @ t[3, 10, 17]) @ t[4, 11, 18] + if (i @ t[5, 12, 19] == 3 @ t[6, 13, 20]) @ t[7, 14, 21]: + break + done = True @ t[22] + + +# 14. For with enumerate +@test +def test_for_enumerate(t): + for idx, val in (enumerate @ t[0])(["a" @ t[1], "b" @ t[2], "c" @ t[3]] @ t[4]) @ t[5]: + idx @ t[6, 8, 10] + val @ t[7, 9, 11] + done = True @ t[12] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_match.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_match.py new file mode 100644 index 00000000000..ba15a2d7c85 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_match.py @@ -0,0 +1,173 @@ +"""Evaluation order for match/case (structural pattern matching, Python 3.10+).""" + +import sys +if sys.version_info < (3, 10): + print("Skipping match/case tests (requires Python 3.10+)") + print("---") + print("0/0 tests passed") + sys.exit(0) + +from timer import test, dead, never + + +@test +def test_match_literal(t): + x = 1 @ t[0] + match x @ t[1]: + case 1: + y = "one" @ t[2] + case 2: + y = "two" @ t[dead(2)] + z = y @ t[3] + + +@test +def test_match_literal_fallthrough(t): + x = 3 @ t[0] + match x @ t[1]: + case 1: + y = "one" @ t[dead(2)] + case 2: + y = "two" @ t[dead(2)] + case 3: + y = "three" @ t[2] + z = y @ t[3] + + +@test +def test_match_wildcard(t): + x = 42 @ t[0] + match x @ t[1]: + case 1: + y = "one" @ t[dead(2)] + case _: + y = "other" @ t[2] + z = y @ t[3] + + +@test +def test_match_capture(t): + x = 42 @ t[0] + match x @ t[1]: + case n: + y = n @ t[2] + z = y @ t[3] + + +@test +def test_match_or_pattern(t): + x = 2 @ t[0] + match x @ t[1]: + case 1 | 2: + y = "low" @ t[2] + case _: + y = "other" @ t[dead(2)] + z = y @ t[3] + + +@test +def test_match_guard(t): + x = 5 @ t[0] + match x @ t[1]: + case n if (n @ t[2] > 3 @ t[3]) @ t[4]: + y = n @ t[5] + case _: + y = 0 @ t[dead(5)] + z = y @ t[6] + + +@test +def test_match_class_pattern(t): + x = 42 @ t[0] + match x @ t[1]: + case int(): + y = "integer" @ t[2] + case str(): + y = "string" @ t[dead(2)] + z = y @ t[3] + + +@test +def test_match_sequence(t): + x = [1 @ t[0], 2 @ t[1]] @ t[2] + match x @ t[3]: + case [a, b]: + y = (a @ t[4] + b @ t[5]) @ t[6] + case _: + y = 0 @ t[dead(6)] + z = y @ t[7] + + +@test +def test_match_mapping(t): + x = {"key" @ t[0]: 42 @ t[1]} @ t[2] + match x @ t[3]: + case {"key": value}: + y = value @ t[4] + case _: + y = 0 @ t[dead(4)] + z = y @ t[5] + + +@test +def test_match_nested(t): + x = {"users" @ t[0]: [{"name" @ t[1]: "Alice" @ t[2]} @ t[3]] @ t[4]} @ t[5] + match x @ t[6]: + case {"users": [{"name": name}]}: + y = name @ t[7] + case _: + y = "unknown" @ t[dead(7)] + z = y @ t[8] + + +@test +def test_match_or_pattern_with_as(t): + """OR pattern with `as` binding and method call on the result.""" + clause = "foo@bar" @ t[0] + match clause @ t[1]: + case (str() as uses) | {"uses": uses}: + result = ((uses @ t[2]).partition @ t[3])("@" @ t[4]) @ t[5] + x = (result @ t[6])[0 @ t[7]] @ t[8] + case _: + raise ((ValueError @ t[dead(2)])(clause @ t[dead(3)]) @ t[dead(4)]) + y = x @ t[9] + + +@test +def test_match_wildcard_raise(t): + """Wildcard case that raises, with OR pattern on the other branch.""" + clause = 42 @ t[0] + try: + match clause @ t[1]: + case (str() as uses) | {"uses": uses}: + result = uses @ t[dead(2)] + case _: + raise ((ValueError @ t[2])(f"Invalid: {clause @ t[3]}" @ t[4]) @ t[5]) + except ValueError: + y = 0 @ t[6] + + +@test +def test_match_exhaustive_return_first(t): + """Every case returns; code after match is unreachable (first case taken).""" + def f(x): + match x @ t[2]: + case 1: + return "one" @ t[3] + case _: + return "other" @ t[dead(3)] + y = 0 @ t[never] + result = (f @ t[0])(1 @ t[1]) @ t[4] + + +@test +def test_match_exhaustive_return_wildcard(t): + """Every case returns; code after match is unreachable (wildcard taken).""" + def f(x): + match x @ t[2]: + case 1: + return "one" @ t[dead(3)] + case _: + return "other" @ t[3] + y = 0 @ t[never] + result = (f @ t[0])(99 @ t[1]) @ t[4] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_try.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_try.py new file mode 100644 index 00000000000..dd0b15457d6 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_try.py @@ -0,0 +1,182 @@ +"""Exception handling control flow: try/except/else/finally evaluation order.""" + +from timer import test, dead, never + + +# 1. try/except — no exception raised (except block skipped) +@test +def test_try_no_exception(t): + try: + x = 1 @ t[0] + y = 2 @ t[1] + except ValueError: + z = 3 @ t[dead(2)] + after = 0 @ t[2] + + +# 2. try/except — exception raised and caught +@test +def test_try_with_exception(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + y = 2 @ t[never] + except ValueError: + z = 3 @ t[3] + after = 0 @ t[4] + + +# 3. try/except/else — no exception (else runs) +@test +def test_try_except_else_no_exception(t): + try: + x = 1 @ t[0] + except ValueError: + y = 2 @ t[dead(1)] + else: + z = 3 @ t[1] + after = 0 @ t[2] + + +# 4. try/except/else — exception raised (else skipped) +@test +def test_try_except_else_with_exception(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + except ValueError: + y = 2 @ t[3] + else: + z = 3 @ t[dead(3)] + after = 0 @ t[4] + + +# 5. try/finally — no exception +@test +def test_try_finally_no_exception(t): + try: + x = 1 @ t[0] + y = 2 @ t[1] + finally: + z = 3 @ t[2] + after = 0 @ t[3] + + +# 6. try/finally — exception raised (finally runs, then exception propagates) +@test +def test_try_finally_exception(t): + try: + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + finally: + y = 2 @ t[3] + except ValueError: + z = 3 @ t[4] + + +# 7. try/except/finally — no exception +@test +def test_try_except_finally_no_exception(t): + try: + x = 1 @ t[0] + except ValueError: + y = 2 @ t[dead(1)] + finally: + z = 3 @ t[1] + after = 0 @ t[2] + + +# 8. try/except/finally — exception caught +@test +def test_try_except_finally_exception(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + except ValueError: + y = 2 @ t[3] + finally: + z = 3 @ t[4] + after = 0 @ t[5] + + +# 9. Multiple except clauses — first matching +@test +def test_multiple_except_first(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + except ValueError: + y = 2 @ t[3] + except TypeError: + z = 3 @ t[dead(3)] + after = 0 @ t[4] + + +# 10. Multiple except clauses — second matching +@test +def test_multiple_except_second(t): + try: + x = 1 @ t[0] + raise ((TypeError @ t[1])() @ t[2]) + except ValueError: + y = 2 @ t[dead(3)] + except TypeError: + z = 3 @ t[3] + after = 0 @ t[4] + + +# 11. except with `as` binding +@test +def test_except_as_binding(t): + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])("msg" @ t[2]) @ t[3]) + except ValueError as e: + y = (str @ t[4])(e @ t[5]) @ t[6] + after = 0 @ t[7] + + +# 12. Nested try/except +@test +def test_nested_try_except(t): + try: + x = 1 @ t[0] + try: + y = 2 @ t[1] + raise ((ValueError @ t[2])() @ t[3]) + except ValueError: + z = 3 @ t[4] + w = 4 @ t[5] + except TypeError: + v = 5 @ t[dead(6)] + after = 0 @ t[6] + + +# 13. try/except in a loop +@test +def test_try_in_loop(t): + total = 0 @ t[0] + for i in (range @ t[1])(3 @ t[2]) @ t[3]: + try: + if (i @ t[4, 11, 20] == 1 @ t[5, 12, 21]) @ t[6, 13, 22]: + raise ((ValueError @ t[14])() @ t[15]) + total = (total @ t[7, 23] + 1 @ t[8, 24]) @ t[9, 25] + except ValueError: + total = (total @ t[16] + 10 @ t[17]) @ t[18] + r = 0 @ t[10, 19, 26] + + +# 14. Re-raise with bare `raise` +@test +def test_reraise(t): + try: + try: + x = 1 @ t[0] + raise ((ValueError @ t[1])() @ t[2]) + except ValueError: + y = 2 @ t[3] + raise + except ValueError: + z = 3 @ t[4] + after = 0 @ t[5] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_unpacking.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_unpacking.py new file mode 100644 index 00000000000..45f292cb0b7 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_unpacking.py @@ -0,0 +1,48 @@ +"""Unpacking and star expressions evaluation order.""" + +from timer import test + + +@test +def test_tuple_unpack(t): + """RHS expression evaluates, then unpacking assigns targets.""" + a, b = (1 @ t[0], 2 @ t[1]) @ t[2] + x = (a @ t[3] + b @ t[4]) @ t[5] + + +@test +def test_list_unpack(t): + """List unpacking: RHS elements left to right, then unpack.""" + [a, b] = [1 @ t[0], 2 @ t[1]] @ t[2] + x = (a @ t[3] + b @ t[4]) @ t[5] + + +@test +def test_star_unpack(t): + """Star unpacking: RHS evaluates first.""" + a, *b = [1 @ t[0], 2 @ t[1], 3 @ t[2], 4 @ t[3]] @ t[4] + x = (a @ t[5], b @ t[6]) @ t[7] + + +@test +def test_nested_unpack(t): + """Nested unpacking: RHS evaluates first.""" + (a, b), c = ((1 @ t[0], 2 @ t[1]) @ t[2], 3 @ t[3]) @ t[4] + x = ((a @ t[5] + b @ t[6]) @ t[7] + c @ t[8]) @ t[9] + + +@test +def test_swap(t): + a = 1 @ t[0] + b = 2 @ t[1] + a, b = (b @ t[2], a @ t[3]) @ t[4] + x = a @ t[5] + y = b @ t[6] + + +@test +def test_unpack_for(t): + pairs = [(1 @ t[0], 2 @ t[1]) @ t[2], (3 @ t[3], 4 @ t[4]) @ t[5]] @ t[6] + for a, b in pairs @ t[7]: + x = a @ t[8, 10] + y = b @ t[9, 11] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_with.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_with.py new file mode 100644 index 00000000000..1dcc7169092 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_with.py @@ -0,0 +1,58 @@ +"""Evaluation order tests for with statements.""" + +from contextlib import contextmanager +from timer import test + + +@contextmanager +def ctx(value=None): + yield value + + +@test +def test_simple_with(t): + x = 1 @ t[0] + with (ctx @ t[1])() @ t[2]: + y = 2 @ t[3] + z = 3 @ t[4] + + +@test +def test_with_as(t): + with (ctx @ t[0])(42 @ t[1]) @ t[2] as v: + x = v @ t[3] + y = 0 @ t[4] + + +@test +def test_nested_with(t): + with (ctx @ t[0])() @ t[1]: + with (ctx @ t[2])() @ t[3]: + x = 1 @ t[4] + y = 2 @ t[5] + + +@test +def test_multiple_context_managers(t): + with (ctx @ t[0])(1 @ t[1]) @ t[2] as a, (ctx @ t[3])(2 @ t[4]) @ t[5] as b: + x = (a @ t[6], b @ t[7]) @ t[8] + y = 0 @ t[9] + + +@test +def test_with_exception_handling(t): + try: + with (ctx @ t[0])() @ t[1]: + x = 1 @ t[2] + raise ((ValueError @ t[3])() @ t[4]) + except ValueError: + y = 2 @ t[5] + z = 3 @ t[6] + + +@test +def test_with_in_loop(t): + for i in [1 @ t[0], 2 @ t[1]] @ t[2]: + with (ctx @ t[3, 6])() @ t[4, 7]: + x = i @ t[5, 8] + y = 0 @ t[9] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_yield.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_yield.py new file mode 100644 index 00000000000..b2a28d793bc --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_yield.py @@ -0,0 +1,105 @@ +"""Generator and yield evaluation order tests. + +Generator bodies are lazy — code runs only when iterated. The timer +annotations inside generator bodies fire interleaved with the caller's +annotations, reflecting the suspend/resume semantics of yield. +""" + +from timer import test + + +@test +def test_simple_generator(t): + """Basic generator: body runs on next(), not on gen().""" + def gen(): + yield 1 @ t[4] + yield 2 @ t[8] + + g = (gen @ t[0])() @ t[1] + x = (next @ t[2])(g @ t[3]) @ t[5] + y = (next @ t[6])(g @ t[7]) @ t[9] + + +@test +def test_multiple_yields(t): + """Three yields interleave with three next() calls.""" + def gen(): + yield 1 @ t[4] + yield 2 @ t[8] + yield 3 @ t[12] + + g = (gen @ t[0])() @ t[1] + a = (next @ t[2])(g @ t[3]) @ t[5] + b = (next @ t[6])(g @ t[7]) @ t[9] + c = (next @ t[10])(g @ t[11]) @ t[13] + + +@test +def test_generator_for_loop(t): + """for-loop consumes generator, interleaving body and loop.""" + def gen(): + yield 1 @ t[2] + yield 2 @ t[4] + + for val in (gen @ t[0])() @ t[1]: + val @ t[3, 5] + + +@test +def test_generator_list(t): + """list() consumes the entire generator without interleaving.""" + def gen(): + yield 10 @ t[3] + yield 20 @ t[4] + yield 30 @ t[5] + + result = (list @ t[0])((gen @ t[1])() @ t[2]) @ t[6] + + +@test +def test_yield_from(t): + """yield from delegates to an inner generator transparently.""" + def inner(): + yield 1 @ t[6] + yield 2 @ t[10] + + def outer(): + yield from (inner @ t[4])() @ t[5] + + g = (outer @ t[0])() @ t[1] + x = (next @ t[2])(g @ t[3]) @ t[7] + y = (next @ t[8])(g @ t[9]) @ t[11] + + +@test +def test_generator_return(t): + """Generator return value accessed via yield from.""" + def gen(): + yield 1 @ t[6] + return 42 @ t[10] + + def wrapper(): + result = (yield from (gen @ t[4])() @ t[5]) @ t[11] + yield result @ t[12] + + g = (wrapper @ t[0])() @ t[1] + x = (next @ t[2])(g @ t[3]) @ t[7] + y = (next @ t[8])(g @ t[9]) @ t[13] + + +@test +def test_generator_send(t): + """send() passes a value into the generator at the yield point.""" + def gen(): + x = (yield 1 @ t[4]) @ t[9] + yield (x @ t[10] + 10 @ t[11]) @ t[12] + + g = (gen @ t[0])() @ t[1] + first = (next @ t[2])(g @ t[3]) @ t[5] + second = ((g @ t[6]).send @ t[7])(42 @ t[8]) @ t[13] + + +@test +def test_generator_expression(t): + """Inline generator expression consumed by list().""" + result = (list @ t[0])(x @ t[5, 6, 7] for x in [10 @ t[1], 20 @ t[2], 30 @ t[3]] @ t[4]) @ t[8] diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py new file mode 100644 index 00000000000..e10dde2592a --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py @@ -0,0 +1,189 @@ +"""Abstract timer for self-validating CFG evaluation-order tests. + +Provides a Timer context manager and a @test decorator for writing tests +that verify the order in which Python evaluates expressions. + +Usage with @test decorator (preferred): + + from timer import test, dead, never + + @test + def test_sequential(t): + x = 1 @ t[0] + y = 2 @ t[1] + z = (x + y) @ t[2] + +Annotation forms: + t[n] - assert current timestamp is n, return marker + t[n, m, ...] - assert current timestamp is one of {n, m, ...} + t[dead(n)] - mark timestamp n as dead (fails if evaluated) + t[dead(n), m] - dead at n, live at m + t[never] - mark as never evaluated (fails if evaluated) + t["label"] - record current timestamp under label (development aid) + t(value, n) - equivalent to: value @ t[n] + +Run a test file directly to self-validate: python test_file.py +""" + +import atexit +import sys + +_results = [] + + +class _Check: + """Marker returned by t[n] — asserts the current timestamp. + + Receives the raw subscript elements: plain ints are live timestamps, + dead(n) markers are dead timestamps, and `never` means any evaluation + is an error. + """ + + __slots__ = ("_timer", "_live", "_dead", "_never") + + def __init__(self, timer, elements): + self._timer = timer + self._live = set() + self._dead = set() + self._never = False + for e in elements: + if isinstance(e, int): + self._live.add(e) + elif isinstance(e, _DeadMarker): + self._dead.add(e.timestamp) + elif isinstance(e, _NeverSentinel): + self._never = True + + def __rmatmul__(self, value): + ts = self._timer._tick() + if self._never: + self._timer._error( + f"expression annotated with t[never] was evaluated (timestamp {ts})" + ) + elif ts in self._dead: + self._timer._error( + f"timestamp {ts} is marked dead but was evaluated" + ) + elif ts not in self._live: + self._timer._error( + f"expected {sorted(self._live)}, got {ts}" + ) + return value + + +class _Label: + """Marker returned by t["name"] — records the timestamp under a label.""" + + __slots__ = ("_timer", "_name") + + def __init__(self, timer, name): + self._timer = timer + self._name = name + + def __rmatmul__(self, value): + ts = self._timer._tick() + self._timer._labels.setdefault(self._name, []).append(ts) + return value + + +class _DeadMarker: + """Marker returned by dead(n) — used inside t[...] to mark a timestamp as dead.""" + + def __init__(self, timestamp): + self.timestamp = timestamp + + +def dead(n): + """Mark timestamp `n` as dead code inside a timer subscript: t[dead(1), 2].""" + return _DeadMarker(n) + + +class _NeverSentinel: + """Sentinel for never-evaluated annotations: t[never].""" + pass + + +never = _NeverSentinel() + + +class Timer: + """Context manager tracking abstract evaluation timestamps. + + Each Timer instance maintains a counter starting at 0. Every time an + annotation (@ t[n] or t(value, n)) is encountered, the counter is + compared against the expected value and then incremented. + """ + + def __init__(self, name=""): + self._name = name + self._counter = 0 + self._errors = [] + self._labels = {} + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + if self._labels: + for name, timestamps in sorted(self._labels.items()): + print(f" {name}: {', '.join(map(str, timestamps))}") + _results.append((self._name, list(self._errors))) + if self._errors: + print(f"{self._name}: FAIL") + for err in self._errors: + print(f" {err}") + else: + print(f"{self._name}: ok") + return False + + def _tick(self): + ts = self._counter + self._counter += 1 + return ts + + def _error(self, msg): + self._errors.append(msg) + + def __getitem__(self, key): + if isinstance(key, str): + return _Label(self, key) + elif isinstance(key, tuple): + return _Check(self, key) + else: + return _Check(self, [key]) + + def __call__(self, value, key): + """Alternative to @ operator: t(value, 4) or t(value, [1, 2, 3]).""" + if isinstance(key, list): + key = tuple(key) + marker = self[key] + return marker.__rmatmul__(value) + + +def test(fn): + """Decorator that creates a Timer and runs the test function immediately. + + The function receives a fresh Timer as its sole argument. Errors are + collected (not raised) and reported after the function completes. + """ + with Timer(fn.__name__) as t: + try: + fn(t) + except Exception as e: + t._error(f"exception: {type(e).__name__}: {e}") + return fn + + +def _report(): + """Print summary at interpreter exit.""" + if not _results: + return + total = len(_results) + passed = sum(1 for _, errors in _results if not errors) + print("---") + print(f"{passed}/{total} tests passed") + if passed < total: + sys.exit(1) + + +atexit.register(_report) From 3a979ac2f84814d7f427f762b128876cc0216cea Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 28 Apr 2026 15:06:50 +0000 Subject: [PATCH 02/85] Python: Add some CFG-validation queries These use the annotated, self-verifying test files to check various consistency requirements. Some of these may be expressing the same thing in different ways, but it's fairly cheap to keep them around, so I have not attempted to produce a minimal set of queries for this. --- .../AllLiveReachable.expected | 0 .../evaluation-order/AllLiveReachable.ql | 17 +++++++++++++++ .../AnnotationHasCfgNode.expected | 1 + .../evaluation-order/AnnotationHasCfgNode.ql | 14 +++++++++++++ .../BasicBlockAnnotationGap.expected | 0 .../BasicBlockAnnotationGap.ql | 21 +++++++++++++++++++ .../ContiguousTimestamps.expected | 0 .../evaluation-order/ContiguousTimestamps.ql | 17 +++++++++++++++ .../evaluation-order/NoBackwardFlow.expected | 11 ++++++++++ .../evaluation-order/NoBackwardFlow.ql | 17 +++++++++++++++ .../evaluation-order/NoBasicBlock.expected | 1 + .../evaluation-order/NoBasicBlock.ql | 14 +++++++++++++ .../NoSharedReachable.expected | 0 .../evaluation-order/NoSharedReachable.ql | 16 ++++++++++++++ .../evaluation-order/OldCfgImpl.qll | 8 +++---- .../evaluation-order/StrictForward.expected | 11 ++++++++++ .../evaluation-order/StrictForward.ql | 17 +++++++++++++++ 17 files changed, 161 insertions(+), 4 deletions(-) create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.ql create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.ql diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.ql new file mode 100644 index 00000000000..886ccb4c348 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/AllLiveReachable.ql @@ -0,0 +1,17 @@ +/** + * Checks that every live (non-dead) annotation in the test function's + * own scope is reachable from the function entry in the CFG. + * Annotations in nested scopes (generators, async, lambdas, comprehensions) + * have separate CFGs and are excluded from this check. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, TestFunction f +where allLiveReachable(a, f) +select a, "Unreachable live annotation; entry of $@ does not reach this node", f, f.getName() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.expected new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.expected @@ -0,0 +1 @@ + diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.ql new file mode 100644 index 00000000000..04c01abf8a6 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/AnnotationHasCfgNode.ql @@ -0,0 +1,14 @@ +/** + * Checks that every timer annotation has a corresponding CFG node. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils::CfgTests + +from TimerAnnotation ann +where annotationWithoutCfgNode(ann) +select ann, "Annotation in $@ has no CFG node", ann.getTestFunction(), + ann.getTestFunction().getName() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.ql new file mode 100644 index 00000000000..691144e06e4 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockAnnotationGap.ql @@ -0,0 +1,21 @@ +/** + * Checks that within a basic block, if a node is annotated then its + * successor is also annotated (or excluded). A gap in annotations + * within a basic block indicates a missing annotation, since there + * are no branches to justify the gap. + * + * Nodes with exceptional successors are excluded, as the exception + * edge leaves the basic block and the normal successor may be dead. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, CfgNode succ +where basicBlockAnnotationGap(a, succ) +select a, "Annotated node followed by unannotated $@ in the same basic block", succ, + succ.getNode().toString() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.ql new file mode 100644 index 00000000000..f18c52750b5 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/ContiguousTimestamps.ql @@ -0,0 +1,17 @@ +/** + * Checks that timestamps form a contiguous sequence {0, 1, ..., max} + * within each test function. Every integer in the range must appear + * in at least one annotation (live or dead). + */ + +import TimerUtils + +from TestFunction f, int missing, int maxTs, TimerAnnotation maxAnn +where + maxTs = max(TimerAnnotation a | a.getTestFunction() = f | a.getATimestamp()) and + maxAnn.getTestFunction() = f and + maxAnn.getATimestamp() = maxTs and + missing = [0 .. maxTs] and + not exists(TimerAnnotation a | a.getTestFunction() = f and a.getATimestamp() = missing) +select f, "Missing timestamp " + missing + " (max is $@)", maxAnn.getTimestampExpr(maxTs), + maxTs.toString() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected new file mode 100644 index 00000000000..775cc7bdbbf --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected @@ -0,0 +1,11 @@ +| test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:9:59:9:59 | IntegerLiteral | 2 | test_boolean.py:9:10:9:13 | ControlFlowNode for True | True | test_boolean.py:9:19:9:19 | IntegerLiteral | 0 | +| test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:15:50:15:50 | IntegerLiteral | 1 | test_boolean.py:15:10:15:14 | ControlFlowNode for False | False | test_boolean.py:15:20:15:20 | IntegerLiteral | 0 | +| test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:21:49:21:49 | IntegerLiteral | 1 | test_boolean.py:21:10:21:13 | ControlFlowNode for True | True | test_boolean.py:21:19:21:19 | IntegerLiteral | 0 | +| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:27:59:27:59 | IntegerLiteral | 2 | test_boolean.py:27:10:27:14 | ControlFlowNode for False | False | test_boolean.py:27:20:27:20 | IntegerLiteral | 0 | +| test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:40:86:40:86 | IntegerLiteral | 3 | test_boolean.py:40:10:40:10 | ControlFlowNode for IntegerLiteral | IntegerLiteral | test_boolean.py:40:16:40:16 | IntegerLiteral | 0 | +| test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:46:86:46:86 | IntegerLiteral | 3 | test_boolean.py:46:10:46:10 | ControlFlowNode for IntegerLiteral | IntegerLiteral | test_boolean.py:46:16:46:16 | IntegerLiteral | 0 | +| test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:52:120:52:120 | IntegerLiteral | 4 | test_boolean.py:52:11:52:47 | ControlFlowNode for BoolExpr | BoolExpr | test_boolean.py:52:63:52:63 | IntegerLiteral | 2 | +| test_boolean.py:52:11:52:47 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:52:63:52:63 | IntegerLiteral | 2 | test_boolean.py:52:11:52:14 | ControlFlowNode for True | True | test_boolean.py:52:20:52:20 | IntegerLiteral | 0 | +| test_boolean.py:64:10:64:52 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:64:59:64:59 | IntegerLiteral | 6 | test_boolean.py:64:11:64:11 | ControlFlowNode for f | f | test_boolean.py:64:17:64:17 | IntegerLiteral | 0 | +| test_boolean.py:76:10:76:51 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:76:58:76:58 | IntegerLiteral | 6 | test_boolean.py:76:11:76:11 | ControlFlowNode for f | f | test_boolean.py:76:17:76:17 | IntegerLiteral | 0 | +| test_if.py:96:9:96:29 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_if.py:96:36:96:36 | IntegerLiteral | 4 | test_if.py:96:9:96:9 | ControlFlowNode for x | x | test_if.py:96:15:96:15 | IntegerLiteral | 2 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.ql new file mode 100644 index 00000000000..e9926284295 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.ql @@ -0,0 +1,17 @@ +/** + * Checks that time never flows backward between consecutive timer annotations + * in the CFG. For each pair of consecutive annotated nodes (A -> B), there must + * exist timestamps a in A and b in B with a < b. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, TimerCfgNode b, int minA, int maxB +where noBackwardFlow(a, b, minA, maxB) +select a, "Backward flow: $@ flows to $@ (max timestamp $@)", a.getTimestampExpr(minA), + minA.toString(), b, b.getNode().toString(), b.getTimestampExpr(maxB), maxB.toString() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.expected new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.expected @@ -0,0 +1 @@ + diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.ql new file mode 100644 index 00000000000..82d9589a975 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBasicBlock.ql @@ -0,0 +1,14 @@ +/** + * Checks that every annotated CFG node belongs to a basic block. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from CfgNode n, TestFunction f +where noBasicBlock(n, f) +select n, "CFG node in $@ does not belong to any basic block", f, f.getName() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.ql new file mode 100644 index 00000000000..e9f685e8ffa --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoSharedReachable.ql @@ -0,0 +1,16 @@ +/** + * Checks that two annotations sharing a timestamp value are on + * mutually exclusive CFG paths (neither can reach the other). + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, TimerCfgNode b, int ts +where noSharedReachable(a, b, ts) +select a, "Shared timestamp $@ but this node reaches $@", a.getTimestampExpr(ts), ts.toString(), b, + b.getNode().toString() diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll b/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll index fc52c8dd3ed..cb7bbb495b8 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/OldCfgImpl.qll @@ -3,14 +3,14 @@ * Python control flow graph. */ -private import python as Py +private import python as PY import TimerUtils /** Existing Python CFG implementation of the evaluation-order signature. */ module OldCfg implements EvalOrderCfgSig { - class CfgNode = Py::ControlFlowNode; + class CfgNode = PY::ControlFlowNode; - class BasicBlock = Py::BasicBlock; + class BasicBlock = PY::BasicBlock; - CfgNode scopeGetEntryNode(Py::Scope s) { result = s.getEntryNode() } + CfgNode scopeGetEntryNode(PY::Scope s) { result = s.getEntryNode() } } diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected new file mode 100644 index 00000000000..34e050b0f8a --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected @@ -0,0 +1,11 @@ +| test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:9:59:9:59 | IntegerLiteral | timestamp 2 | test_boolean.py:9:19:9:19 | IntegerLiteral | timestamp 0 | +| test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:15:50:15:50 | IntegerLiteral | timestamp 1 | test_boolean.py:15:20:15:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:21:49:21:49 | IntegerLiteral | timestamp 1 | test_boolean.py:21:19:21:19 | IntegerLiteral | timestamp 0 | +| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:27:59:27:59 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:40:86:40:86 | IntegerLiteral | timestamp 3 | test_boolean.py:40:16:40:16 | IntegerLiteral | timestamp 0 | +| test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:46:86:46:86 | IntegerLiteral | timestamp 3 | test_boolean.py:46:16:46:16 | IntegerLiteral | timestamp 0 | +| test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:52:120:52:120 | IntegerLiteral | timestamp 4 | test_boolean.py:52:63:52:63 | IntegerLiteral | timestamp 2 | +| test_boolean.py:52:11:52:47 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:52:63:52:63 | IntegerLiteral | timestamp 2 | test_boolean.py:52:20:52:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:64:10:64:52 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:64:59:64:59 | IntegerLiteral | timestamp 6 | test_boolean.py:64:17:64:17 | IntegerLiteral | timestamp 0 | +| test_boolean.py:76:10:76:51 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:76:58:76:58 | IntegerLiteral | timestamp 6 | test_boolean.py:76:17:76:17 | IntegerLiteral | timestamp 0 | +| test_if.py:96:9:96:29 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_if.py:96:36:96:36 | IntegerLiteral | timestamp 4 | test_if.py:96:15:96:15 | IntegerLiteral | timestamp 2 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.ql new file mode 100644 index 00000000000..79b383a4acf --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.ql @@ -0,0 +1,17 @@ +/** + * Stronger version of NoBackwardFlow: for consecutive annotated nodes + * A -> B that both have a single timestamp (non-loop code) and B does + * NOT dominate A (forward edge), requires max(A) < min(B). + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, TimerCfgNode b, int maxA, int minB +where strictForward(a, b, maxA, minB) +select a, "Strict forward violation: $@ flows to $@", a.getTimestampExpr(maxA), "timestamp " + maxA, + b.getTimestampExpr(minB), "timestamp " + minB From fc2bc26f36f2250ce53dc46ea7b383dbee6c12ff Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 28 Apr 2026 15:06:56 +0000 Subject: [PATCH 03/85] Python: Add BasicBlockOrdering test This one demonstrates a bug in the current CFG. In a dictionary comprehension `{k: v for k, v in d.items()}`, we evaluate the value before the key, which is incorrect. (A fix for this bug has been implemented in a separate PR.) --- .../evaluation-order/BasicBlockOrdering.expected | 14 ++++++++++++++ .../evaluation-order/BasicBlockOrdering.ql | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.ql diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected new file mode 100644 index 00000000000..c5ef1ba9394 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected @@ -0,0 +1,14 @@ +| test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:9:59:9:59 | IntegerLiteral | timestamp 2 | test_boolean.py:9:19:9:19 | IntegerLiteral | timestamp 0 | +| test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:15:50:15:50 | IntegerLiteral | timestamp 1 | test_boolean.py:15:20:15:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:21:49:21:49 | IntegerLiteral | timestamp 1 | test_boolean.py:21:19:21:19 | IntegerLiteral | timestamp 0 | +| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:27:59:27:59 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:40:86:40:86 | IntegerLiteral | timestamp 3 | test_boolean.py:40:16:40:16 | IntegerLiteral | timestamp 0 | +| test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:46:86:46:86 | IntegerLiteral | timestamp 3 | test_boolean.py:46:16:46:16 | IntegerLiteral | timestamp 0 | +| test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:52:120:52:120 | IntegerLiteral | timestamp 4 | test_boolean.py:52:20:52:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:52:120:52:120 | IntegerLiteral | timestamp 4 | test_boolean.py:52:63:52:63 | IntegerLiteral | timestamp 2 | +| test_boolean.py:52:11:52:47 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:52:63:52:63 | IntegerLiteral | timestamp 2 | test_boolean.py:52:20:52:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:64:10:64:52 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:64:59:64:59 | IntegerLiteral | timestamp 6 | test_boolean.py:64:17:64:17 | IntegerLiteral | timestamp 0 | +| test_boolean.py:64:10:64:52 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:64:59:64:59 | IntegerLiteral | timestamp 6 | test_boolean.py:64:27:64:27 | IntegerLiteral | timestamp 2 | +| test_boolean.py:76:10:76:51 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:76:58:76:58 | IntegerLiteral | timestamp 6 | test_boolean.py:76:17:76:17 | IntegerLiteral | timestamp 0 | +| test_boolean.py:76:10:76:51 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:76:58:76:58 | IntegerLiteral | timestamp 6 | test_boolean.py:76:27:76:27 | IntegerLiteral | timestamp 2 | +| test_if.py:96:9:96:29 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_if.py:96:36:96:36 | IntegerLiteral | timestamp 4 | test_if.py:96:15:96:15 | IntegerLiteral | timestamp 2 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.ql new file mode 100644 index 00000000000..6c08d44a5a5 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.ql @@ -0,0 +1,16 @@ +/** + * Checks that within a single basic block, annotations appear in + * increasing minimum-timestamp order. + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerCfgNode a, TimerCfgNode b, int minA, int minB +where basicBlockOrdering(a, b, minA, minB) +select a, "Basic block ordering: $@ appears before $@", a.getTimestampExpr(minA), + "timestamp " + minA, b.getTimestampExpr(minB), "timestamp " + minB From c30d6ae3aa156f460177959152bce299fdc6061c Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 28 Apr 2026 15:07:04 +0000 Subject: [PATCH 04/85] Python: Add NeverReachable test This looks for nodes annotated with `t[never]` in the test that are reachable in the CFG. This should not happen (it messes with various queries, e.g. the "mixed returns" query), but the test shows that in a few particular cases (involving the `match` statement where all cases contain `return`s), we _do_ have reachable nodes that shouldn't be. --- .../evaluation-order/NeverReachable.expected | 2 ++ .../evaluation-order/NeverReachable.ql | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.ql diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.expected new file mode 100644 index 00000000000..874a7dfb096 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.expected @@ -0,0 +1,2 @@ +| test_match.py:159:13:159:13 | IntegerLiteral | Node annotated with t.never is reachable in $@ | test_match.py:151:1:151:42 | Function test_match_exhaustive_return_first | test_match_exhaustive_return_first | +| test_match.py:172:13:172:13 | IntegerLiteral | Node annotated with t.never is reachable in $@ | test_match.py:164:1:164:45 | Function test_match_exhaustive_return_wildcard | test_match_exhaustive_return_wildcard | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.ql new file mode 100644 index 00000000000..9fbb9115814 --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NeverReachable.ql @@ -0,0 +1,16 @@ +/** + * Checks that expressions annotated with `t.never` either have no CFG + * node, or if they do, that the node is not reachable from its scope's + * entry (including within the same basic block). + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils::CfgTests + +from TimerAnnotation ann +where neverReachable(ann) +select ann, "Node annotated with t.never is reachable in $@", ann.getTestFunction(), + ann.getTestFunction().getName() From f5c3b63a4aab45009976cda132f36564f5db3a34 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 28 Apr 2026 15:07:15 +0000 Subject: [PATCH 05/85] Python: Add ConsecutiveTimestamps test This one is potentially a bit iffy -- it checks for a very powerful property (that implies many of the other queries), but as the test results show, it can produce false positives when there is in fact no problem. We may want to get rid of it entirely, if it becomes too noisy. --- .../ConsecutiveTimestamps.expected | 12 ++++++++++ .../evaluation-order/ConsecutiveTimestamps.ql | 24 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.expected create mode 100644 python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.ql diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.expected new file mode 100644 index 00000000000..ed22c971ecb --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.expected @@ -0,0 +1,12 @@ +| test_boolean.py:9:26:9:27 | IntegerLiteral | $@ in $@ has no consecutive successor (expected 2) | test_boolean.py:9:33:9:33 | IntegerLiteral | Timestamp 1 | test_boolean.py:7:1:7:27 | Function test_and_both_sides | test_and_both_sides | +| test_boolean.py:15:10:15:14 | False | $@ in $@ has no consecutive successor (expected 1) | test_boolean.py:15:20:15:20 | IntegerLiteral | Timestamp 0 | test_boolean.py:13:1:13:30 | Function test_and_short_circuit | test_and_short_circuit | +| test_boolean.py:21:10:21:13 | True | $@ in $@ has no consecutive successor (expected 1) | test_boolean.py:21:19:21:19 | IntegerLiteral | Timestamp 0 | test_boolean.py:19:1:19:29 | Function test_or_short_circuit | test_or_short_circuit | +| test_boolean.py:27:26:27:27 | IntegerLiteral | $@ in $@ has no consecutive successor (expected 2) | test_boolean.py:27:33:27:33 | IntegerLiteral | Timestamp 1 | test_boolean.py:25:1:25:26 | Function test_or_both_sides | test_or_both_sides | +| test_boolean.py:40:45:40:45 | IntegerLiteral | $@ in $@ has no consecutive successor (expected 3) | test_boolean.py:40:51:40:51 | IntegerLiteral | Timestamp 2 | test_boolean.py:38:1:38:24 | Function test_chained_and | test_chained_and | +| test_boolean.py:46:44:46:45 | IntegerLiteral | $@ in $@ has no consecutive successor (expected 3) | test_boolean.py:46:51:46:51 | IntegerLiteral | Timestamp 2 | test_boolean.py:44:1:44:23 | Function test_chained_or | test_chained_or | +| test_boolean.py:52:11:52:47 | BoolExpr | $@ in $@ has no consecutive successor (expected 3) | test_boolean.py:52:63:52:63 | IntegerLiteral | Timestamp 2 | test_boolean.py:50:1:50:25 | Function test_mixed_and_or | test_mixed_and_or | +| test_boolean.py:52:27:52:31 | False | $@ in $@ has no consecutive successor (expected 2) | test_boolean.py:52:37:52:37 | IntegerLiteral | Timestamp 1 | test_boolean.py:50:1:50:25 | Function test_mixed_and_or | test_mixed_and_or | +| test_boolean.py:52:78:52:79 | IntegerLiteral | $@ in $@ has no consecutive successor (expected 4) | test_boolean.py:52:85:52:85 | IntegerLiteral | Timestamp 3 | test_boolean.py:50:1:50:25 | Function test_mixed_and_or | test_mixed_and_or | +| test_if.py:95:9:95:13 | False | $@ in $@ has no consecutive successor (expected 2) | test_if.py:95:19:95:19 | IntegerLiteral | Timestamp 1 | test_if.py:93:1:93:34 | Function test_if_compound_condition | test_if_compound_condition | +| test_if.py:96:9:96:29 | BoolExpr | $@ in $@ has no consecutive successor (expected 5) | test_if.py:96:36:96:36 | IntegerLiteral | Timestamp 4 | test_if.py:93:1:93:34 | Function test_if_compound_condition | test_if_compound_condition | +| test_if.py:96:22:96:22 | y | $@ in $@ has no consecutive successor (expected 4) | test_if.py:96:28:96:28 | IntegerLiteral | Timestamp 3 | test_if.py:93:1:93:34 | Function test_if_compound_condition | test_if_compound_condition | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.ql b/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.ql new file mode 100644 index 00000000000..01ff59b49bf --- /dev/null +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/ConsecutiveTimestamps.ql @@ -0,0 +1,24 @@ +/** + * Checks that consecutive annotated nodes have consecutive timestamps: + * for each annotation with timestamp `a`, some CFG node for that annotation + * must have a next annotation containing `a + 1`. + * + * Handles CFG splitting (e.g., finally blocks duplicated for normal/exceptional + * flow) by checking that at least one split has the required successor. + * + * Only applies to functions where all annotations are in the function's + * own scope (excludes tests with generators, async, comprehensions, or + * lambdas that have annotations in nested scopes). + */ + +import OldCfgImpl + +private module Utils = EvalOrderCfgUtils; + +private import Utils +private import Utils::CfgTests + +from TimerAnnotation ann, int a +where consecutiveTimestamps(ann, a) +select ann, "$@ in $@ has no consecutive successor (expected " + (a + 1) + ")", + ann.getTimestampExpr(a), "Timestamp " + a, ann.getTestFunction(), ann.getTestFunction().getName() From 9dddd93460cf70dd2802101bb9fc68b3d26d7769 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:40:53 +0000 Subject: [PATCH 06/85] unified: add field declarations for statements and members Part 1 of N of "getting rid of $children" in node-types.yml Note: in one of the cases the affected node still has the $children field present. This is because there's some weirdness about recording multiline comments as class member separators that I did not want to figure out how to address right now. --- unified/extractor/tree-sitter-swift/grammar.js | 16 ++++++++-------- .../extractor/tree-sitter-swift/node-types.yml | 12 +++++++----- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 5dbfd7fdbbf..76e8020b0b8 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -255,11 +255,11 @@ module.exports = grammar({ //////////////////////////////// source_file: ($) => seq( - optional($.shebang_line), + optional(field("shebang", $.shebang_line)), optional( seq( - $._top_level_statement, - repeat(seq($._semi, $._top_level_statement)), + field("statement", $._top_level_statement), + repeat(seq($._semi, field("statement", $._top_level_statement))), optional($._semi) ) ) @@ -1182,8 +1182,8 @@ module.exports = grammar({ prec.left( // Left precedence is required in switch statements seq( - $._local_statement, - repeat(seq($._semi, $._local_statement)), + field("statement", $._local_statement), + repeat(seq($._semi, field("statement", $._local_statement))), optional($._semi) ) ), @@ -1605,7 +1605,7 @@ module.exports = grammar({ _class_member_separator: ($) => choice($._semi, $.multiline_comment), _class_member_declarations: ($) => seq( - sep1($.type_level_declaration, $._class_member_separator), + sep1(field("member", $.type_level_declaration), $._class_member_separator), optional($._class_member_separator) ), _function_value_parameters: ($) => @@ -1673,7 +1673,7 @@ module.exports = grammar({ throws_clause: ($) => seq($._throws_keyword, "(", field("type", $.unannotated_type), ")"), enum_class_body: ($) => - seq("{", repeat(choice($.enum_entry, $.type_level_declaration)), "}"), + seq("{", repeat(field("member", choice($.enum_entry, $.type_level_declaration))), "}"), enum_entry: ($) => seq( optional($.modifiers), @@ -1725,7 +1725,7 @@ module.exports = grammar({ protocol_body: ($) => seq("{", optional($._protocol_member_declarations), "}"), _protocol_member_declarations: ($) => - seq(sep1($.protocol_member_declaration, $._semi), optional($._semi)), + seq(sep1(field("member", $.protocol_member_declaration), $._semi), optional($._semi)), protocol_member_declaration: ($) => choice( $.protocol_function_declaration, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index c4bf650944b..7d9d096d9c9 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -166,7 +166,8 @@ named: target: expression type: type class_body: - $children*: [multiline_comment, type_level_declaration] + $children*: multiline_comment + member*: type_level_declaration class_declaration: $children*: [attribute, inheritance_modifier, inheritance_specifier, modifiers, ownership_modifier, property_behavior_modifier, type_constraints, type_parameters] body: [class_body, enum_class_body] @@ -226,7 +227,7 @@ named: $children*: [catch_block, statements] else: enum_class_body: - $children*: [enum_entry, type_level_declaration] + member*: [enum_entry, type_level_declaration] enum_entry: $children?: modifiers data_contents*: enum_type_parameters @@ -410,7 +411,7 @@ named: value*: expression property_modifier: protocol_body: - $children*: protocol_member_declaration + member*: protocol_member_declaration protocol_composition_type: $children+: unannotated_type protocol_declaration: @@ -459,11 +460,12 @@ named: shebang_line: simple_identifier: source_file: - $children*: [do_statement, expression, for_statement, global_declaration, guard_statement, repeat_while_statement, shebang_line, statement_label, throw_keyword, while_statement] + shebang?: shebang_line + statement*: [do_statement, expression, for_statement, global_declaration, guard_statement, repeat_while_statement, statement_label, throw_keyword, while_statement] special_literal: statement_label: statements: - $children+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] + statement+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] str_escaped_char: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] From 75c07996f38184cbbc0467f35a4f8b05c3afd804 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:42:21 +0000 Subject: [PATCH 07/85] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 38 +++++++++++++++++---------- unified/ql/lib/unified.dbscheme | 36 ++++++++++++++++--------- 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 5b9491fdb9f..dbe217fb951 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -436,11 +436,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ClassBody" } + /** Gets the node corresponding to the field `member`. */ + final TypeLevelDeclaration getMember(int i) { swift_class_body_member(this, i, result) } + /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_class_body_child(this, i, result) } + final MultilineComment getChild(int i) { swift_class_body_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_class_body_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_class_body_member(this, _, result) or swift_class_body_child(this, _, result) + } } /** A class representing `class_declaration` nodes. */ @@ -818,11 +823,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EnumClassBody" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_enum_class_body_child(this, i, result) } + /** Gets the node corresponding to the field `member`. */ + final AstNode getMember(int i) { swift_enum_class_body_member(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_enum_class_body_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_enum_class_body_member(this, _, result) } } /** A class representing `enum_entry` nodes. */ @@ -1927,11 +1932,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolBody" } - /** Gets the `i`th child of this node. */ - final ProtocolMemberDeclaration getChild(int i) { swift_protocol_body_child(this, i, result) } + /** Gets the node corresponding to the field `member`. */ + final ProtocolMemberDeclaration getMember(int i) { swift_protocol_body_member(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_protocol_body_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_protocol_body_member(this, _, result) } } /** A class representing `protocol_composition_type` nodes. */ @@ -2231,11 +2236,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SourceFile" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_source_file_child(this, i, result) } + /** Gets the node corresponding to the field `shebang`. */ + final ShebangLine getShebang() { swift_source_file_shebang(this, result) } + + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_source_file_statement(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_source_file_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_source_file_shebang(this, result) or swift_source_file_statement(this, _, result) + } } /** A class representing `special_literal` tokens. */ @@ -2255,11 +2265,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Statements" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_statements_child(this, i, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_statements_statement(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_statements_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_statements_statement(this, _, result) } } /** A class representing `str_escaped_char` tokens. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index b50bc56eaa2..5d9826b69a8 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -356,13 +356,18 @@ swift_check_expression_def( int type__: @swift_type__ ref ); -@swift_class_body_child_type = @swift_token_multiline_comment | @swift_type_level_declaration +#keyset[swift_class_body, index] +swift_class_body_member( + int swift_class_body: @swift_class_body ref, + int index: int ref, + unique int member: @swift_type_level_declaration ref +); #keyset[swift_class_body, index] swift_class_body_child( int swift_class_body: @swift_class_body ref, int index: int ref, - unique int child: @swift_class_body_child_type ref + unique int child: @swift_token_multiline_comment ref ); swift_class_body_def( @@ -626,13 +631,13 @@ swift_do_statement_def( unique int id: @swift_do_statement ); -@swift_enum_class_body_child_type = @swift_enum_entry | @swift_type_level_declaration +@swift_enum_class_body_member_type = @swift_enum_entry | @swift_type_level_declaration #keyset[swift_enum_class_body, index] -swift_enum_class_body_child( +swift_enum_class_body_member( int swift_enum_class_body: @swift_enum_class_body ref, int index: int ref, - unique int child: @swift_enum_class_body_child_type ref + unique int member: @swift_enum_class_body_member_type ref ); swift_enum_class_body_def( @@ -1443,10 +1448,10 @@ swift_property_declaration_def( ); #keyset[swift_protocol_body, index] -swift_protocol_body_child( +swift_protocol_body_member( int swift_protocol_body: @swift_protocol_body ref, int index: int ref, - unique int child: @swift_protocol_member_declaration ref + unique int member: @swift_protocol_member_declaration ref ); swift_protocol_body_def( @@ -1642,26 +1647,31 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); -@swift_source_file_child_type = @swift_do_statement | @swift_expression | @swift_for_statement | @swift_global_declaration | @swift_guard_statement | @swift_repeat_while_statement | @swift_token_shebang_line | @swift_token_statement_label | @swift_token_throw_keyword | @swift_while_statement +swift_source_file_shebang( + unique int swift_source_file: @swift_source_file ref, + unique int shebang: @swift_token_shebang_line ref +); + +@swift_source_file_statement_type = @swift_do_statement | @swift_expression | @swift_for_statement | @swift_global_declaration | @swift_guard_statement | @swift_repeat_while_statement | @swift_token_statement_label | @swift_token_throw_keyword | @swift_while_statement #keyset[swift_source_file, index] -swift_source_file_child( +swift_source_file_statement( int swift_source_file: @swift_source_file ref, int index: int ref, - unique int child: @swift_source_file_child_type ref + unique int statement: @swift_source_file_statement_type ref ); swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_child_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement +@swift_statements_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement #keyset[swift_statements, index] -swift_statements_child( +swift_statements_statement( int swift_statements: @swift_statements ref, int index: int ref, - unique int child: @swift_statements_child_type ref + unique int statement: @swift_statements_statement_type ref ); swift_statements_def( From c75d819a928d8ca4b3a7c486e05d9f3abf387567 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 13:46:25 +0000 Subject: [PATCH 08/85] unified: Add `effect` field I ended up also aliasing `_async_keyword` to a named node to make it more consistent with the other node kinds that can be in this field (as it would be awkward to have two named types and a token here). Elsewhere in the node types, we'll still have `async?: "async"`, and I think that's okay. --- unified/extractor/tree-sitter-swift/grammar.js | 2 +- unified/extractor/tree-sitter-swift/node-types.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 76e8020b0b8..75d7c450bf0 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1804,7 +1804,7 @@ module.exports = grammar({ setter_specifier: ($) => seq(optional($.mutation_modifier), "set"), modify_specifier: ($) => seq(optional($.mutation_modifier), "_modify"), _getter_effects: ($) => - repeat1(choice($._async_keyword, $.throws_clause, $.throws)), + repeat1(field("effect", choice(alias($._async_keyword, $.async_keyword), $.throws_clause, $.throws))), operator_declaration: ($) => seq( choice("prefix", "infix", "postfix"), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 7d9d096d9c9..219904ae939 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -132,6 +132,7 @@ named: default_value?: type must_inherit?: type name: type_identifier + async_keyword: attribute: $children+: [expression, user_type] availability_condition: @@ -266,7 +267,8 @@ named: params: unannotated_type return_type: type getter_specifier: - $children*: [mutation_modifier, throws, throws_clause] + $children?: mutation_modifier + effect*: [async_keyword, throws, throws_clause] guard_statement: $children+: [else, statements] condition+: if_condition From d6ef467fba82e0ddab0f86e0458a1ad413a8501c Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 13:59:56 +0000 Subject: [PATCH 09/85] unified: Add more fields A lot of changes, but for the most part these are just adding named fields in places where they make sense. After this, there are still ~20 instances of unnamed children appearing. --- .../extractor/tree-sitter-swift/grammar.js | 318 +++++++++--------- .../tree-sitter-swift/node-types.yml | 276 ++++++++++----- 2 files changed, 343 insertions(+), 251 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 75d7c450bf0..9137fb94cee 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -291,7 +291,7 @@ module.exports = grammar({ "package", $._parameter_ownership_modifier ), - identifier: ($) => sep1($.simple_identifier, $._dot), + identifier: ($) => sep1(field("part", $.simple_identifier), $._dot), // Literals _basic_literal: ($) => choice( @@ -355,13 +355,13 @@ module.exports = grammar({ seq( field("text", $.raw_str_part), field("interpolation", $.raw_str_interpolation), - optional($.raw_str_continuing_indicator) + field("continuing", optional($.raw_str_continuing_indicator)) ) ), field("text", $.raw_str_end_part) ), raw_str_interpolation: ($) => - seq($.raw_str_interpolation_start, $._interpolation_contents, ")"), + seq(field("start", $.raw_str_interpolation_start), $._interpolation_contents, ")"), raw_str_interpolation_start: ($) => /\\#*\(/, _multi_line_string_content: ($) => choice($.multi_line_str_text, $.str_escaped_char, '"'), @@ -410,7 +410,7 @@ module.exports = grammar({ _possibly_implicitly_unwrapped_type: ($) => choice($.type, $.implicitly_unwrapped_type), implicitly_unwrapped_type: ($) => - seq($.type, token.immediate("!")), + seq(field("name", $.type), token.immediate("!")), type: ($) => prec.right( PRECS.ty, @@ -436,7 +436,7 @@ module.exports = grammar({ ) ), // The grammar just calls this whole thing a `type-identifier` but that's a bit confusing. - user_type: ($) => sep1($._simple_user_type, $._dot), + user_type: ($) => sep1(field("part", $._simple_user_type), $._dot), _simple_user_type: ($) => prec.right( PRECS.ty, @@ -459,7 +459,7 @@ module.exports = grammar({ PRECS.expr, seq( optional($._tuple_type_item_identifier), - optional($.parameter_modifiers), + field("modifiers", optional($.parameter_modifiers)), field("type", $.type) ) ), @@ -475,8 +475,8 @@ module.exports = grammar({ function_type: ($) => seq( field("params", choice($.tuple_type, $.unannotated_type)), - optional($._async_keyword), - optional(choice($.throws_clause, $.throws)), + field("async", optional($._async_keyword)), + field("throws", optional(choice($.throws_clause, $.throws))), $._arrow_operator, field("return_type", $.type) ), @@ -493,18 +493,18 @@ module.exports = grammar({ repeat1(alias($._immediate_quest, "?")) ) ), - metatype: ($) => seq($.unannotated_type, ".", choice("Type", "Protocol")), + metatype: ($) => seq(field("name", $.unannotated_type), ".", choice("Type", "Protocol")), _quest: ($) => "?", _immediate_quest: ($) => token.immediate("?"), - opaque_type: ($) => prec.right(seq("some", $.unannotated_type)), - existential_type: ($) => prec.right(seq("any", $.unannotated_type)), - type_parameter_pack: ($) => prec.left(seq("each", $.unannotated_type)), - type_pack_expansion: ($) => prec.left(seq("repeat", $.unannotated_type)), + opaque_type: ($) => prec.right(seq("some", field("name", $.unannotated_type))), + existential_type: ($) => prec.right(seq("any", field("name", $.unannotated_type))), + type_parameter_pack: ($) => prec.left(seq("each", field("name", $.unannotated_type))), + type_pack_expansion: ($) => prec.left(seq("repeat", field("name", $.unannotated_type))), protocol_composition_type: ($) => prec.left( seq( - $.unannotated_type, - repeat1(seq("&", prec.right($.unannotated_type))) + field("type", $.unannotated_type), + repeat1(seq("&", prec.right(field("type", $.unannotated_type)))) ) ), suppressed_constraint: ($) => @@ -535,7 +535,7 @@ module.exports = grammar({ ) ), optional_chain_marker: ($) => - seq($.expression, alias($._immediate_quest, "?")), + seq(field("expr", $.expression), alias($._immediate_quest, "?")), // Unary expressions _unary_expression: ($) => choice( @@ -568,7 +568,7 @@ module.exports = grammar({ "constructed_type", choice($.array_type, $.dictionary_type, $.user_type) ), - $.constructor_suffix + field("suffix", $.constructor_suffix) ) ), _parenthesized_type: ($) => @@ -626,7 +626,7 @@ module.exports = grammar({ as_expression: ($) => prec.left( PRECS.as, - seq(field("expr", $.expression), $.as_operator, field("type", $.type)) + seq(field("expr", $.expression), field("operator", $.as_operator), field("type", $.type)) ), selector_expression: ($) => seq( @@ -634,7 +634,7 @@ module.exports = grammar({ "selector", "(", optional(choice("getter:", "setter:")), - $.expression, + field("expr", $.expression), ")" ), // Binary expressions @@ -778,15 +778,15 @@ module.exports = grammar({ ) ), _constructor_value_arguments: ($) => - seq("(", optional(sep1Opt($.value_argument, ",")), ")"), + seq("(", optional(sep1Opt(field("argument", $.value_argument), ",")), ")"), _fn_call_lambda_arguments: ($) => sep1($.lambda_literal, seq(field("name", $.simple_identifier), ":")), - type_arguments: ($) => prec.left(seq("<", sep1Opt($.type, ","), ">")), + type_arguments: ($) => prec.left(seq("<", sep1Opt(field("argument", $.type), ","), ">")), value_arguments: ($) => seq( choice( - seq("(", optional(sep1Opt($.value_argument, ",")), ")"), - seq("[", optional(sep1Opt($.value_argument, ",")), "]") + seq("(", optional(sep1Opt(field("argument", $.value_argument), ",")), ")"), + seq("[", optional(sep1Opt(field("argument", $.value_argument), ",")), "]") ) ), value_argument_label: ($) => @@ -802,7 +802,7 @@ module.exports = grammar({ value_argument: ($) => prec.left( seq( - optional($.type_modifiers), + field("type_modifiers", optional($.type_modifiers)), choice( repeat1( seq(field("reference_specifier", $.value_argument_label), ":") @@ -818,7 +818,7 @@ module.exports = grammar({ prec.right( PRECS["try"], seq( - $.try_operator, + field("operator", $.try_operator), field( "expr", choice( @@ -885,7 +885,7 @@ module.exports = grammar({ call_expression: ($) => prec( PRECS.call, - prec.dynamic(DYNAMIC_PRECS.call, seq($.expression, $.call_suffix)) + prec.dynamic(DYNAMIC_PRECS.call, seq(field("function", $.expression), field("suffix", $.call_suffix))) ), macro_invocation: ($) => prec( @@ -894,9 +894,9 @@ module.exports = grammar({ DYNAMIC_PRECS.call, seq( $._hash_symbol, - $.simple_identifier, - optional($.type_parameters), - $.call_suffix + field("name", $.simple_identifier), + field("type_parameters", optional($.type_parameters)), + field("suffix", $.call_suffix) ) ) ), @@ -965,7 +965,7 @@ module.exports = grammar({ $._hash_symbol, choice("colorLiteral", "fileLiteral", "imageLiteral"), "(", - sep1Opt(seq($.simple_identifier, ":", $.expression), ","), + sep1Opt(seq(field("name", $.simple_identifier), ":", field("value", $.expression)), ","), ")" ), lambda_literal: ($) => @@ -974,25 +974,25 @@ module.exports = grammar({ seq( choice("{", "^{"), optional($._lambda_type_declaration), - optional($.statements), + field("body", optional($.statements)), "}" ) ), _lambda_type_declaration: ($) => seq( - repeat($.attribute), + repeat(field("attribute", $.attribute)), prec(PRECS.expr, optional(field("captures", $.capture_list))), optional(field("type", $.lambda_function_type)), "in" ), - capture_list: ($) => seq("[", sep1Opt($.capture_list_item, ","), "]"), + capture_list: ($) => seq("[", sep1Opt(field("item", $.capture_list_item), ","), "]"), capture_list_item: ($) => choice( field("name", $.self_expression), prec( PRECS.expr, seq( - optional($.ownership_modifier), + field("ownership", optional($.ownership_modifier)), field("name", $.simple_identifier), optional(seq($._equal_sign, field("value", $.expression))) ) @@ -1003,11 +1003,11 @@ module.exports = grammar({ PRECS.expr, seq( choice( - $.lambda_function_type_parameters, - seq("(", optional($.lambda_function_type_parameters), ")") + field("params", $.lambda_function_type_parameters), + seq("(", field("params", optional($.lambda_function_type_parameters)), ")") ), - optional($._async_keyword), - optional(choice($.throws_clause, $.throws)), + field("async", optional($._async_keyword)), + field("throws", optional(choice($.throws_clause, $.throws))), optional( seq( $._arrow_operator, @@ -1016,11 +1016,11 @@ module.exports = grammar({ ) ) ), - lambda_function_type_parameters: ($) => sep1Opt($.lambda_parameter, ","), + lambda_function_type_parameters: ($) => sep1Opt(field("parameter", $.lambda_parameter), ","), lambda_parameter: ($) => seq( choice( - $.self_expression, + field("name", $.self_expression), prec(PRECS.expr, field("name", $.simple_identifier)), prec( PRECS.expr, @@ -1028,7 +1028,7 @@ module.exports = grammar({ optional(field("external_name", $.simple_identifier)), field("name", $.simple_identifier), ":", - optional($.parameter_modifiers), + field("modifiers", optional($.parameter_modifiers)), field("type", $._possibly_implicitly_unwrapped_type) ) ) @@ -1036,7 +1036,7 @@ module.exports = grammar({ ), self_expression: ($) => "self", super_expression: ($) => seq("super"), - _else_options: ($) => choice($._block, $.if_statement), + _else_options: ($) => choice($._block, field("else_branch", $.if_statement)), if_statement: ($) => prec.right( PRECS["if"], @@ -1044,16 +1044,16 @@ module.exports = grammar({ "if", sep1(field("condition", $.if_condition), ","), $._block, - optional(seq($["else"], $._else_options)) + optional(seq(field("else_keyword", $["else"]), $._else_options)) ) ), if_condition: ($) => - choice($.if_let_binding, $.expression, $.availability_condition), + field("kind", choice($.if_let_binding, $.expression, $.availability_condition)), if_let_binding: ($) => seq( $._direct_or_indirect_binding, - optional(seq($._equal_sign, $.expression)), - optional($.where_clause) + optional(seq($._equal_sign, field("value", $.expression))), + field("where", optional($.where_clause)) ), guard_statement: ($) => prec.right( @@ -1061,7 +1061,7 @@ module.exports = grammar({ seq( "guard", sep1(field("condition", $.if_condition), ","), - $["else"], + field("else_keyword", $["else"]), $._block ) ), @@ -1072,7 +1072,7 @@ module.exports = grammar({ "switch", field("expr", $.expression), "{", - repeat($.switch_entry), + repeat(field("entry", $.switch_entry)), "}" ) ), @@ -1096,15 +1096,15 @@ module.exports = grammar({ ), switch_pattern: ($) => alias($._binding_pattern_with_expr, $.pattern), do_statement: ($) => - prec.right(PRECS["do"], seq("do", $._block, repeat($.catch_block))), + prec.right(PRECS["do"], seq("do", $._block, repeat(field("catch", $.catch_block)))), catch_block: ($) => seq( - $.catch_keyword, + field("keyword", $.catch_keyword), field("error", optional(alias($._binding_pattern_no_expr, $.pattern))), - optional($.where_clause), + field("where", optional($.where_clause)), $._block ), - where_clause: ($) => prec.left(seq($.where_keyword, $.expression)), + where_clause: ($) => prec.left(seq(field("keyword", $.where_keyword), field("expr", $.expression))), key_path_expression: ($) => prec.right( PRECS.keypath, @@ -1117,7 +1117,7 @@ module.exports = grammar({ ) ), key_path_string_expression: ($) => - prec.left(seq($._hash_symbol, "keyPath", "(", $.expression, ")")), + prec.left(seq($._hash_symbol, "keyPath", "(", field("expr", $.expression), ")")), _key_path_component: ($) => prec.left( choice( @@ -1173,7 +1173,7 @@ module.exports = grammar({ ), _bitwise_binary_operator: ($) => choice("&", "|", "^", "<<", ">>"), _postfix_unary_operator: ($) => choice("++", "--", $.bang), - directly_assignable_expression: ($) => $.expression, + directly_assignable_expression: ($) => field("expr", $.expression), //////////////////////////////// // Statements - https://docs.swift.org/swift-book/ReferenceManual/Statements.html @@ -1201,7 +1201,7 @@ module.exports = grammar({ $._labeled_statement, $._throw_statement ), - _block: ($) => prec(PRECS.block, seq("{", optional($.statements), "}")), + _block: ($) => prec(PRECS.block, seq("{", field("body", optional($.statements)), "}")), _labeled_statement: ($) => seq( optional($.statement_label), @@ -1221,13 +1221,13 @@ module.exports = grammar({ PRECS.loop, seq( "for", - optional($.try_operator), + field("try", optional($.try_operator)), optional($._await_operator), field("item", alias($._binding_pattern_no_expr, $.pattern)), - optional($.type_annotation), + field("type", optional($.type_annotation)), "in", field("collection", $._for_statement_collection), - optional($.where_clause), + field("where", optional($.where_clause)), $._block ) ), @@ -1246,7 +1246,7 @@ module.exports = grammar({ "while", sep1(field("condition", $.if_condition), ","), "{", - optional($.statements), + field("body", optional($.statements)), "}" ) ), @@ -1256,7 +1256,7 @@ module.exports = grammar({ seq( "repeat", "{", - optional($.statements), + field("body", optional($.statements)), "}", // Make sure we make it to the `while` before assuming this is a parameter pack. repeat($._implicit_semi), @@ -1270,7 +1270,7 @@ module.exports = grammar({ prec.right( PRECS.control_transfer, seq( - $._optionally_valueful_control_keyword, + field("kind", $._optionally_valueful_control_keyword), field("result", optional($.expression)) ) ) @@ -1289,9 +1289,9 @@ module.exports = grammar({ ) ), value_parameter_pack: ($) => - prec.left(PRECS.parameter_pack, seq("each", $.expression)), + prec.left(PRECS.parameter_pack, seq("each", field("expr", $.expression))), value_pack_expansion: ($) => - prec.left(PRECS.parameter_pack, seq("repeat", $.expression)), + prec.left(PRECS.parameter_pack, seq("repeat", field("expr", $.expression))), availability_condition: ($) => seq( $._hash_symbol, @@ -1343,30 +1343,30 @@ module.exports = grammar({ ), _local_property_declaration: ($) => seq( - optional($._locally_permitted_modifiers), + field("modifiers", optional($._locally_permitted_modifiers)), $._modifierless_property_declaration ), _local_typealias_declaration: ($) => seq( - optional($._locally_permitted_modifiers), + field("modifiers", optional($._locally_permitted_modifiers)), $._modifierless_typealias_declaration ), _local_function_declaration: ($) => seq( - optional($._locally_permitted_modifiers), + field("modifiers", optional($._locally_permitted_modifiers)), $._modifierless_function_declaration ), _local_class_declaration: ($) => seq( - optional($._locally_permitted_modifiers), + field("modifiers", optional($._locally_permitted_modifiers)), $._modifierless_class_declaration ), import_declaration: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), "import", optional($._import_kind), - $.identifier + field("name", $.identifier) ), _import_kind: ($) => choice( @@ -1382,17 +1382,17 @@ module.exports = grammar({ protocol_property_declaration: ($) => prec.right( seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), field("name", alias($._binding_kind_and_pattern, $.pattern)), - optional($.type_annotation), - optional($.type_constraints), - $.protocol_property_requirements + field("type", optional($.type_annotation)), + field("type_constraints", optional($.type_constraints)), + field("requirements", $.protocol_property_requirements) ) ), protocol_property_requirements: ($) => - seq("{", repeat(choice($.getter_specifier, $.setter_specifier)), "}"), + seq("{", repeat(field("accessor", choice($.getter_specifier, $.setter_specifier))), "}"), property_declaration: ($) => - seq(optional($.modifiers), $._modifierless_property_declaration), + seq(field("modifiers", optional($.modifiers)), $._modifierless_property_declaration), _modifierless_property_declaration: ($) => prec.right( seq( @@ -1429,30 +1429,30 @@ module.exports = grammar({ seq($._equal_sign, field("value", $.expression)), willset_didset_block: ($) => choice( - seq("{", $.willset_clause, optional($.didset_clause), "}"), - seq("{", $.didset_clause, optional($.willset_clause), "}") + seq("{", field("willset", $.willset_clause), field("didset", optional($.didset_clause)), "}"), + seq("{", field("didset", $.didset_clause), field("willset", optional($.willset_clause)), "}") ), willset_clause: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), "willSet", - optional(seq("(", $.simple_identifier, ")")), + optional(seq("(", field("parameter", $.simple_identifier), ")")), $._block ), didset_clause: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), "didSet", - optional(seq("(", $.simple_identifier, ")")), + optional(seq("(", field("parameter", $.simple_identifier), ")")), $._block ), typealias_declaration: ($) => - seq(optional($.modifiers), $._modifierless_typealias_declaration), + seq(field("modifiers", optional($.modifiers)), $._modifierless_typealias_declaration), _modifierless_typealias_declaration: ($) => seq( "typealias", field("name", alias($.simple_identifier, $.type_identifier)), - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), $._equal_sign, field("value", $.type) ), @@ -1469,7 +1469,7 @@ module.exports = grammar({ ), _bodyless_function_declaration: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), optional("class"), // XXX: This should be possible in non-last position, but that creates parsing ambiguity $._modifierless_function_declaration_no_body ), @@ -1477,17 +1477,17 @@ module.exports = grammar({ prec.right( seq( $._non_constructor_function_decl, - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), $._function_value_parameters, - optional($._async_keyword), - optional(choice($.throws_clause, $.throws)), + field("async", optional($._async_keyword)), + field("throws", optional(choice($.throws_clause, $.throws))), optional( seq( $._arrow_operator, field("return_type", $._possibly_implicitly_unwrapped_type) ) ), - optional($.type_constraints) + field("type_constraints", optional($.type_constraints)) ) ), function_body: ($) => $._block, @@ -1513,36 +1513,36 @@ module.exports = grammar({ ), external_macro_definition: ($) => - seq($._hash_symbol, "externalMacro", $.value_arguments), + seq($._hash_symbol, "externalMacro", field("arguments", $.value_arguments)), class_declaration: ($) => - seq(optional($.modifiers), $._modifierless_class_declaration), + seq(field("modifiers", optional($.modifiers)), $._modifierless_class_declaration), _modifierless_class_declaration: ($) => prec.right( choice( seq( field("declaration_kind", choice("class", "struct", "actor")), field("name", alias($.simple_identifier, $.type_identifier)), - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), optional(seq(":", $._inheritance_specifiers)), - optional($.type_constraints), + field("type_constraints", optional($.type_constraints)), field("body", $.class_body) ), seq( field("declaration_kind", "extension"), field("name", $.unannotated_type), - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), optional(seq(":", $._inheritance_specifiers)), - optional($.type_constraints), + field("type_constraints", optional($.type_constraints)), field("body", $.class_body) ), seq( optional("indirect"), field("declaration_kind", "enum"), field("name", alias($.simple_identifier, $.type_identifier)), - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), optional(seq(":", $._inheritance_specifiers)), - optional($.type_constraints), + field("type_constraints", optional($.type_constraints)), field("body", $.enum_class_body) ) ) @@ -1550,6 +1550,8 @@ module.exports = grammar({ class_body: ($) => seq("{", optional($._class_member_declarations), "}"), _inheritance_specifiers: ($) => prec.left(sep1($._annotated_inheritance_specifier, choice(",", "&"))), + _annotated_inheritance_specifier: ($) => + seq(repeat(field("attribute", $.attribute)), $.inheritance_specifier), inheritance_specifier: ($) => prec.left( field( @@ -1557,20 +1559,18 @@ module.exports = grammar({ choice($.user_type, $.function_type, $.suppressed_constraint) ) ), - _annotated_inheritance_specifier: ($) => - seq(repeat($.attribute), $.inheritance_specifier), type_parameters: ($) => seq( "<", - sep1Opt($.type_parameter, ","), - optional($.type_constraints), + sep1Opt(field("parameter", $.type_parameter), ","), + field("constraints", optional($.type_constraints)), ">" ), type_parameter: ($) => seq( - optional($.type_parameter_modifiers), - $._type_parameter_possibly_packed, - optional(seq(":", $.type)) + field("modifiers", optional($.type_parameter_modifiers)), + field("name", $._type_parameter_possibly_packed), + optional(seq(":", field("type", $.type))) ), _type_parameter_possibly_packed: ($) => choice( @@ -1579,19 +1579,19 @@ module.exports = grammar({ ), type_constraints: ($) => - prec.right(seq($.where_keyword, sep1Opt($.type_constraint, ","))), + prec.right(seq(field("keyword", $.where_keyword), sep1Opt(field("constraint", $.type_constraint), ","))), type_constraint: ($) => - choice($.inheritance_constraint, $.equality_constraint), + field("constraint", choice($.inheritance_constraint, $.equality_constraint)), inheritance_constraint: ($) => seq( - repeat($.attribute), + repeat(field("attribute", $.attribute)), field("constrained_type", $._constrained_type), ":", field("inherits_from", $._possibly_implicitly_unwrapped_type) ), equality_constraint: ($) => seq( - repeat($.attribute), + repeat(field("attribute", $.attribute)), field("constrained_type", $._constrained_type), choice($._equal_sign, $._eq_eq), field("must_equal", $.type) @@ -1599,8 +1599,8 @@ module.exports = grammar({ _constrained_type: ($) => choice($.identifier, $.nested_type_identifier), nested_type_identifier: ($) => seq( - $.unannotated_type, - optional(seq(".", sep1($.simple_identifier, "."))) + field("base", $.unannotated_type), + optional(seq(".", sep1(field("member", $.simple_identifier), "."))) ), _class_member_separator: ($) => choice($._semi, $.multiline_comment), _class_member_declarations: ($) => @@ -1614,8 +1614,8 @@ module.exports = grammar({ ), _function_value_parameter: ($) => seq( - optional($.attribute), - $.parameter, + field("attribute", optional($.attribute)), + field("parameter", $.parameter), optional(seq($._equal_sign, field("default_value", $.expression))) ), parameter: ($) => @@ -1623,7 +1623,7 @@ module.exports = grammar({ optional(field("external_name", $.simple_identifier)), field("name", $.simple_identifier), ":", - optional($.parameter_modifiers), + field("modifiers", optional($.parameter_modifiers)), field("type", $._possibly_implicitly_unwrapped_type), optional($._three_dot_operator) ), @@ -1633,7 +1633,7 @@ module.exports = grammar({ field("name", choice($.simple_identifier, $.referenceable_operator)) ), referenceable_operator: ($) => - choice( + field("operator", choice( $.custom_operator, $._comparison_operator, $._additive_operator, @@ -1649,7 +1649,7 @@ module.exports = grammar({ "<<", ">>", "&" - ), + )), // Hide the fact that certain symbols come from the custom scanner by aliasing them to their // string variants. This keeps us from having to see them in the syntax tree (which would be // noisy) but allows callers to refer to them as nodes by their text form like with any @@ -1676,7 +1676,7 @@ module.exports = grammar({ seq("{", repeat(field("member", choice($.enum_entry, $.type_level_declaration))), "}"), enum_entry: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), optional("indirect"), "case", sep1( @@ -1713,12 +1713,12 @@ module.exports = grammar({ protocol_declaration: ($) => prec.right( seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), field("declaration_kind", "protocol"), field("name", alias($.simple_identifier, $.type_identifier)), - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), optional(seq(":", $._inheritance_specifiers)), - optional($.type_constraints), + field("type_constraints", optional($.type_constraints)), field("body", $.protocol_body) ) ), @@ -1744,28 +1744,28 @@ module.exports = grammar({ init_declaration: ($) => prec.right( seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), optional("class"), field("name", "init"), - optional(choice($._quest, $.bang)), - optional($.type_parameters), + optional(choice($._quest, field("bang", $.bang))), + field("type_parameters", optional($.type_parameters)), $._function_value_parameters, - optional($._async_keyword), - optional(choice($.throws_clause, $.throws)), - optional($.type_constraints), + field("async", optional($._async_keyword)), + field("throws", optional(choice($.throws_clause, $.throws))), + field("type_constraints", optional($.type_constraints)), optional(field("body", $.function_body)) ) ), deinit_declaration: ($) => prec.right( - seq(optional($.modifiers), "deinit", field("body", $.function_body)) + seq(field("modifiers", optional($.modifiers)), "deinit", field("body", $.function_body)) ), subscript_declaration: ($) => prec.right( seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), "subscript", - optional($.type_parameters), + field("type_parameters", optional($.type_parameters)), $._function_value_parameters, optional( seq( @@ -1773,45 +1773,45 @@ module.exports = grammar({ field("return_type", $._possibly_implicitly_unwrapped_type) ) ), - optional($.type_constraints), - $.computed_property + field("type_constraints", optional($.type_constraints)), + field("body", $.computed_property) ) ), computed_property: ($) => seq( "{", choice( - optional($.statements), + field("body", optional($.statements)), repeat( - choice($.computed_getter, $.computed_setter, $.computed_modify) + field("accessor", choice($.computed_getter, $.computed_setter, $.computed_modify)) ) ), "}" ), computed_getter: ($) => - seq(repeat($.attribute), $.getter_specifier, optional($._block)), + seq(repeat(field("attribute", $.attribute)), field("specifier", $.getter_specifier), optional($._block)), computed_modify: ($) => - seq(repeat($.attribute), $.modify_specifier, optional($._block)), + seq(repeat(field("attribute", $.attribute)), field("specifier", $.modify_specifier), optional($._block)), computed_setter: ($) => seq( - repeat($.attribute), - $.setter_specifier, - optional(seq("(", $.simple_identifier, ")")), + repeat(field("attribute", $.attribute)), + field("specifier", $.setter_specifier), + optional(seq("(", field("parameter", $.simple_identifier), ")")), optional($._block) ), getter_specifier: ($) => - seq(optional($.mutation_modifier), "get", optional($._getter_effects)), - setter_specifier: ($) => seq(optional($.mutation_modifier), "set"), - modify_specifier: ($) => seq(optional($.mutation_modifier), "_modify"), + seq(field("mutation", optional($.mutation_modifier)), "get", optional($._getter_effects)), + setter_specifier: ($) => seq(field("mutation", optional($.mutation_modifier)), "set"), + modify_specifier: ($) => seq(field("mutation", optional($.mutation_modifier)), "_modify"), _getter_effects: ($) => repeat1(field("effect", choice(alias($._async_keyword, $.async_keyword), $.throws_clause, $.throws))), operator_declaration: ($) => seq( - choice("prefix", "infix", "postfix"), + field("kind", choice("prefix", "infix", "postfix")), "operator", - $.referenceable_operator, - optional(seq(":", $.simple_identifier)), - optional($.deprecated_operator_declaration_body) + field("name", $.referenceable_operator), + optional(seq(":", field("precedence_group", $.simple_identifier))), + field("body", optional($.deprecated_operator_declaration_body)) ), // The Swift compiler no longer accepts these, but some very old code still uses it. deprecated_operator_declaration_body: ($) => @@ -1819,25 +1819,25 @@ module.exports = grammar({ precedence_group_declaration: ($) => seq( "precedencegroup", - $.simple_identifier, + field("name", $.simple_identifier), "{", - optional($.precedence_group_attributes), + field("attributes", optional($.precedence_group_attributes)), "}" ), - precedence_group_attributes: ($) => repeat1($.precedence_group_attribute), + precedence_group_attributes: ($) => repeat1(field("attribute", $.precedence_group_attribute)), precedence_group_attribute: ($) => seq( - $.simple_identifier, + field("name", $.simple_identifier), ":", - choice($.simple_identifier, $.boolean_literal) + field("value", choice($.simple_identifier, $.boolean_literal)) ), associatedtype_declaration: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), "associatedtype", field("name", alias($.simple_identifier, $.type_identifier)), optional(seq(":", field("must_inherit", $.type))), - optional($.type_constraints), + field("type_constraints", optional($.type_constraints)), optional(seq($._equal_sign, field("default_value", $.type))) ), //////////////////////////////// @@ -1846,20 +1846,20 @@ module.exports = grammar({ attribute: ($) => seq( "@", - $.user_type, + field("name", $.user_type), // attribute arguments are a mess of special cases, maybe this is good enough? optional(seq("(", sep1Opt($._attribute_argument, ","), ")")) ), _attribute_argument: ($) => choice( // labeled function parameters, used in custom property wrappers - seq($.simple_identifier, ":", $.expression), + seq(field("argument_name", $.simple_identifier), ":", field("argument", $.expression)), // Unlabeled function parameters, simple identifiers, or `*` - $.expression, + field("argument", $.expression), // References to param names (used in `@objc(foo:bar:)`) - repeat1(seq($.simple_identifier, ":")), + repeat1(seq(field("param_ref", $.simple_identifier), ":")), // Version restrictions (iOS 3.4.5, Swift 5.0.0) - seq(repeat1($.simple_identifier), sep1($.integer_literal, ".")) + seq(repeat1(field("platform", $.simple_identifier)), sep1(field("version", $.integer_literal), ".")) ), //////////////////////////////// // Patterns - https://docs.swift.org/swift-book/ReferenceManual/Patterns.html @@ -1952,12 +1952,12 @@ module.exports = grammar({ modifiers: ($) => repeat1( prec.left( - choice($._non_local_scope_modifier, $._locally_permitted_modifiers) + field("modifier", choice($._non_local_scope_modifier, $._locally_permitted_modifiers)) ) ), _locally_permitted_modifiers: ($) => repeat1(choice($.attribute, $._locally_permitted_modifier)), - parameter_modifiers: ($) => repeat1($.parameter_modifier), + parameter_modifiers: ($) => repeat1(field("modifier", $.parameter_modifier)), _modifier: ($) => choice($._non_local_scope_modifier, $._locally_permitted_modifier), _non_local_scope_modifier: ($) => @@ -1976,7 +1976,7 @@ module.exports = grammar({ $.property_behavior_modifier ), property_behavior_modifier: ($) => "lazy", - type_modifiers: ($) => repeat1($.attribute), + type_modifiers: ($) => repeat1(field("attribute", $.attribute)), member_modifier: ($) => choice("override", "convenience", "required", "nonisolated"), visibility_modifier: ($) => @@ -1991,7 +1991,7 @@ module.exports = grammar({ ), optional(seq("(", "set", ")")) ), - type_parameter_modifiers: ($) => repeat1($.attribute), + type_parameter_modifiers: ($) => repeat1(field("attribute", $.attribute)), function_modifier: ($) => choice("infix", "postfix", "prefix"), mutation_modifier: ($) => choice("mutating", "nonmutating"), property_modifier: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 219904ae939..4d4faf641d1 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -119,8 +119,8 @@ named: array_type: element: type as_expression: - $children: as_operator expr: expression + operator: as_operator type: type as_operator: assignment: @@ -128,13 +128,19 @@ named: result: expression target: directly_assignable_expression associatedtype_declaration: - $children*: [modifiers, type_constraints] default_value?: type + modifiers?: modifiers must_inherit?: type name: type_identifier + type_constraints?: type_constraints async_keyword: attribute: - $children+: [expression, user_type] + argument*: expression + argument_name*: simple_identifier + name: user_type + param_ref*: simple_identifier + platform*: simple_identifier + version*: integer_literal availability_condition: $children*: [identifier, integer_literal] await_expression: @@ -148,19 +154,23 @@ named: rhs: expression boolean_literal: call_expression: - $children+: [call_suffix, expression] + $children*: [call_suffix, expression] + function?: expression + suffix?: call_suffix call_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier capture_list: - $children+: capture_list_item + item+: capture_list_item capture_list_item: - $children?: ownership_modifier name: [self_expression, simple_identifier] + ownership?: ownership_modifier value?: expression catch_block: - $children+: [catch_keyword, statements, where_clause] + body?: statements error?: pattern + keyword: catch_keyword + where?: where_clause catch_keyword: check_expression: op: "is" @@ -170,41 +180,54 @@ named: $children*: multiline_comment member*: type_level_declaration class_declaration: - $children*: [attribute, inheritance_modifier, inheritance_specifier, modifiers, ownership_modifier, property_behavior_modifier, type_constraints, type_parameters] + $children*: inheritance_specifier + attribute*: attribute body: [class_body, enum_class_body] declaration_kind: ["actor", "class", "enum", "extension", "struct"] + modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: [type_identifier, unannotated_type] + type_constraints?: type_constraints + type_parameters?: type_parameters comment: comparison_expression: lhs: expression op: ["<", "<=", ">", ">="] rhs: expression computed_getter: - $children+: [attribute, getter_specifier, statements] + attribute*: attribute + body?: statements + specifier: getter_specifier computed_modify: - $children+: [attribute, modify_specifier, statements] + attribute*: attribute + body?: statements + specifier: modify_specifier computed_property: - $children*: [computed_getter, computed_modify, computed_setter, statements] + accessor*: [computed_getter, computed_modify, computed_setter] + body?: statements computed_setter: - $children+: [attribute, setter_specifier, simple_identifier, statements] + attribute*: attribute + body?: statements + parameter?: simple_identifier + specifier: setter_specifier conjunction_expression: lhs: expression op: "&&" rhs: expression constructor_expression: - $children: constructor_suffix constructed_type: [array_type, dictionary_type, user_type] + suffix: constructor_suffix constructor_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier control_transfer_statement: $children*: [expression, throw_keyword] + kind?: ["break", "continue", "return", "yield"] result?: expression custom_operator: default_keyword: deinit_declaration: - $children?: modifiers body: function_body + modifiers?: modifiers deprecated_operator_declaration_body: $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: @@ -215,29 +238,32 @@ named: key: type value: type didset_clause: - $children*: [modifiers, simple_identifier, statements] + body?: statements + modifiers?: modifiers + parameter?: simple_identifier directive: $children*: [boolean_literal, integer_literal, simple_identifier] directly_assignable_expression: - $children: expression + expr: expression disjunction_expression: lhs: expression op: "||" rhs: expression do_statement: - $children*: [catch_block, statements] + body?: statements + catch*: catch_block else: enum_class_body: member*: [enum_entry, type_level_declaration] enum_entry: - $children?: modifiers data_contents*: enum_type_parameters + modifiers?: modifiers name+: simple_identifier raw_value*: expression enum_type_parameters: $children*: [expression, type, wildcard_pattern] equality_constraint: - $children*: attribute + attribute*: attribute constrained_type: [identifier, nested_type_identifier] must_equal: type equality_expression: @@ -245,107 +271,137 @@ named: op: ["!=", "!==", "==", "==="] rhs: expression existential_type: - $children: unannotated_type + name: unannotated_type external_macro_definition: - $children: value_arguments + arguments: value_arguments for_statement: - $children*: [statements, try_operator, type_annotation, where_clause] + body?: statements collection: expression item: pattern + try?: try_operator + type?: type_annotation + where?: where_clause fully_open_range: function_body: - $children?: statements + body?: statements function_declaration: - $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] + async?: "async" + attribute*: attribute body: function_body default_value*: expression + modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: [referenceable_operator, simple_identifier] + parameter*: parameter return_type?: [implicitly_unwrapped_type, type] + throws?: [throws, throws_clause] + type_constraints?: type_constraints + type_parameters?: type_parameters function_modifier: function_type: - $children?: [throws, throws_clause] + async?: "async" params: unannotated_type return_type: type + throws?: [throws, throws_clause] getter_specifier: - $children?: mutation_modifier effect*: [async_keyword, throws, throws_clause] + mutation?: mutation_modifier guard_statement: - $children+: [else, statements] + body?: statements condition+: if_condition + else_keyword: else hex_literal: identifier: - $children+: simple_identifier + part+: simple_identifier if_condition: - $children: [availability_condition, expression, if_let_binding] + kind: [availability_condition, expression, if_let_binding] if_let_binding: - $children*: [expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern] + $children*: [pattern, simple_identifier, type, type_annotation, user_type, value_binding_pattern, wildcard_pattern] bound_identifier?: simple_identifier + value?: expression + where?: where_clause if_statement: - $children*: [else, if_statement, statements] + body*: statements condition+: if_condition + else_branch?: if_statement + else_keyword?: else implicitly_unwrapped_type: - $children: type + name: type import_declaration: - $children+: [identifier, modifiers] + modifiers?: modifiers + name: identifier infix_expression: lhs: expression op: custom_operator rhs: expression inheritance_constraint: - $children*: attribute + attribute*: attribute constrained_type: [identifier, nested_type_identifier] inherits_from: [implicitly_unwrapped_type, type] inheritance_modifier: inheritance_specifier: inherits_from: [function_type, suppressed_constraint, user_type] init_declaration: - $children*: [attribute, bang, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] + async?: "async" + attribute*: attribute + bang?: bang body?: function_body default_value*: expression + modifiers?: modifiers name: "init" + parameter*: parameter + throws?: [throws, throws_clause] + type_constraints?: type_constraints + type_parameters?: type_parameters integer_literal: interpolated_expression: - $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label + type_modifiers?: type_modifiers value?: expression key_path_expression: $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] key_path_string_expression: - $children: expression + expr: expression lambda_function_type: - $children*: [lambda_function_type_parameters, throws, throws_clause] + async?: "async" + params?: lambda_function_type_parameters return_type?: [implicitly_unwrapped_type, type] + throws?: [throws, throws_clause] lambda_function_type_parameters: - $children+: lambda_parameter + parameter+: lambda_parameter lambda_literal: - $children*: [attribute, statements] + attribute*: attribute + body?: statements captures?: capture_list type?: lambda_function_type lambda_parameter: - $children?: [parameter_modifiers, self_expression] external_name?: simple_identifier - name?: simple_identifier + modifiers?: parameter_modifiers + name: [self_expression, simple_identifier] type?: [implicitly_unwrapped_type, type] line_str_text: line_string_literal: interpolation*: interpolated_expression text*: [line_str_text, str_escaped_char] macro_declaration: - $children+: [attribute, modifiers, parameter, simple_identifier, type_constraints, type_parameters, unannotated_type] + $children+: [modifiers, simple_identifier, type_constraints, type_parameters, unannotated_type] + attribute*: attribute default_value*: expression definition?: macro_definition + parameter*: parameter macro_definition: body: [expression, external_macro_definition] macro_invocation: - $children+: [call_suffix, simple_identifier, type_parameters] + name: simple_identifier + suffix: call_suffix + type_parameters?: type_parameters member_modifier: metatype: - $children: unannotated_type + name: unannotated_type modifiers: - $children+: [attribute, function_modifier, inheritance_modifier, member_modifier, mutation_modifier, ownership_modifier, parameter_modifier, property_behavior_modifier, property_modifier, visibility_modifier] + modifier+: [attribute, function_modifier, inheritance_modifier, member_modifier, mutation_modifier, ownership_modifier, parameter_modifier, property_behavior_modifier, property_modifier, visibility_modifier] modify_specifier: - $children?: mutation_modifier + mutation?: mutation_modifier multi_line_str_text: multi_line_string_literal: interpolation*: interpolated_expression @@ -362,76 +418,97 @@ named: navigation_suffix: suffix: [integer_literal, simple_identifier] nested_type_identifier: - $children+: [simple_identifier, unannotated_type] + base: unannotated_type + member*: simple_identifier nil_coalescing_expression: if_nil: expression value: expression oct_literal: opaque_type: - $children: unannotated_type + name: unannotated_type open_end_range_expression: start: expression open_start_range_expression: end: expression operator_declaration: - $children+: [deprecated_operator_declaration_body, referenceable_operator, simple_identifier] + body?: deprecated_operator_declaration_body + kind: ["infix", "postfix", "prefix"] + name: referenceable_operator + precedence_group?: simple_identifier optional_chain_marker: - $children: expression + expr: expression optional_type: wrapped: [array_type, dictionary_type, tuple_type, user_type] ownership_modifier: parameter: - $children?: parameter_modifiers external_name?: simple_identifier + modifiers?: parameter_modifiers name: simple_identifier type: [implicitly_unwrapped_type, type] parameter_modifier: parameter_modifiers: - $children+: parameter_modifier + modifier+: parameter_modifier pattern: $children*: [expression, pattern, type, user_type, value_binding_pattern, wildcard_pattern] bound_identifier?: simple_identifier playground_literal: - $children+: expression + name+: simple_identifier + value+: expression postfix_expression: operation: ["++", "--", bang] target: expression precedence_group_attribute: - $children+: [boolean_literal, simple_identifier] + name: simple_identifier + value: [boolean_literal, simple_identifier] precedence_group_attributes: - $children+: precedence_group_attribute + attribute+: precedence_group_attribute precedence_group_declaration: - $children+: [precedence_group_attributes, simple_identifier] + attributes?: precedence_group_attributes + name: simple_identifier prefix_expression: operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] target: expression property_behavior_modifier: property_declaration: - $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_annotation, type_constraints, value_binding_pattern, willset_didset_block] + $children*: [type_annotation, type_constraints, value_binding_pattern, willset_didset_block] computed_value*: computed_property + modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name+: pattern value*: expression property_modifier: protocol_body: member*: protocol_member_declaration protocol_composition_type: - $children+: unannotated_type + type+: unannotated_type protocol_declaration: - $children*: [attribute, inheritance_specifier, modifiers, type_constraints, type_parameters] + $children*: inheritance_specifier + attribute*: attribute body: protocol_body declaration_kind: "protocol" + modifiers?: modifiers name: type_identifier + type_constraints?: type_constraints + type_parameters?: type_parameters protocol_function_declaration: - $children*: [attribute, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] + async?: "async" + attribute*: attribute body?: function_body default_value*: expression + modifiers?: modifiers name: [referenceable_operator, simple_identifier] + parameter*: parameter return_type?: [implicitly_unwrapped_type, type] + throws?: [throws, throws_clause] + type_constraints?: type_constraints + type_parameters?: type_parameters protocol_property_declaration: - $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] + modifiers?: modifiers name: pattern + requirements: protocol_property_requirements + type?: type_annotation + type_constraints?: type_constraints protocol_property_requirements: - $children*: [getter_specifier, setter_specifier] + accessor*: [getter_specifier, setter_specifier] range_expression: end: expression op: ["...", "..<"] @@ -439,26 +516,26 @@ named: raw_str_continuing_indicator: raw_str_end_part: raw_str_interpolation: - $children: raw_str_interpolation_start interpolation+: interpolated_expression + start: raw_str_interpolation_start raw_str_interpolation_start: raw_str_part: raw_string_literal: - $children*: raw_str_continuing_indicator + continuing*: raw_str_continuing_indicator interpolation*: raw_str_interpolation text+: [raw_str_end_part, raw_str_part] real_literal: referenceable_operator: - $children?: [bang, custom_operator] + operator: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", bang, custom_operator, "|", "~"] regex_literal: repeat_while_statement: - $children?: statements + body?: statements condition+: if_condition selector_expression: - $children: expression + expr: expression self_expression: setter_specifier: - $children?: mutation_modifier + mutation?: mutation_modifier shebang_line: simple_identifier: source_file: @@ -470,9 +547,14 @@ named: statement+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] str_escaped_char: subscript_declaration: - $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] + attribute*: attribute + body: computed_property default_value*: expression + modifiers?: modifiers + parameter*: parameter return_type?: [implicitly_unwrapped_type, type] + type_constraints?: type_constraints + type_parameters?: type_parameters super_expression: suppressed_constraint: suppressed: type_identifier @@ -481,7 +563,7 @@ named: switch_pattern: $children: pattern switch_statement: - $children*: switch_entry + entry*: switch_entry expr: expression ternary_expression: condition: expression @@ -492,8 +574,8 @@ named: throws_clause: type: unannotated_type try_expression: - $children: try_operator expr: expression + operator: try_operator try_operator: tuple_expression: name*: simple_identifier @@ -502,7 +584,8 @@ named: $children?: tuple_type_item element*: tuple_type_item tuple_type_item: - $children*: [dictionary_type, existential_type, opaque_type, parameter_modifiers, wildcard_pattern] + $children?: [dictionary_type, existential_type, opaque_type, wildcard_pattern] + modifiers?: parameter_modifiers name?: simple_identifier type?: type type: @@ -511,57 +594,66 @@ named: type_annotation: type: [implicitly_unwrapped_type, type] type_arguments: - $children+: type + argument+: type type_constraint: - $children: [equality_constraint, inheritance_constraint] + constraint: [equality_constraint, inheritance_constraint] type_constraints: - $children+: [type_constraint, where_keyword] + constraint+: type_constraint + keyword: where_keyword type_identifier: type_modifiers: - $children+: attribute + attribute+: attribute type_pack_expansion: - $children: unannotated_type + name: unannotated_type type_parameter: - $children+: [type, type_identifier, type_parameter_modifiers, type_parameter_pack] + modifiers?: type_parameter_modifiers + name: [type_identifier, type_parameter_pack] + type?: type type_parameter_modifiers: - $children+: attribute + attribute+: attribute type_parameter_pack: - $children: unannotated_type + name: unannotated_type type_parameters: - $children+: [type_constraints, type_parameter] + constraints?: type_constraints + parameter+: type_parameter typealias_declaration: - $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_parameters] + modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: type_identifier + type_parameters?: type_parameters value: type user_type: - $children+: [type_arguments, type_identifier] + part+: [type_arguments, type_identifier] value_argument: - $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label + type_modifiers?: type_modifiers value?: expression value_argument_label: $children: simple_identifier value_arguments: - $children*: value_argument + argument*: value_argument value_binding_pattern: mutability: ["let", "var"] value_pack_expansion: - $children: expression + expr: expression value_parameter_pack: - $children: expression + expr: expression visibility_modifier: where_clause: - $children+: [expression, where_keyword] + expr: expression + keyword: where_keyword where_keyword: while_statement: - $children?: statements + body?: statements condition+: if_condition wildcard_pattern: willset_clause: - $children*: [modifiers, simple_identifier, statements] + body?: statements + modifiers?: modifiers + parameter?: simple_identifier willset_didset_block: - $children+: [didset_clause, willset_clause] + didset?: didset_clause + willset?: willset_clause unnamed: - "?" From 853a98842da041bb251355111f9521a88972f9ba Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:00:14 +0000 Subject: [PATCH 10/85] unified: Regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 1029 +++++++++++++++++------ unified/ql/lib/unified.dbscheme | 1121 ++++++++++++++++--------- 2 files changed, 1481 insertions(+), 669 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index dbe217fb951..bf3b98f582e 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -146,11 +146,11 @@ module Swift { /** Gets the node corresponding to the field `expr`. */ final Expression getExpr() { swift_as_expression_def(this, result, _, _) } - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_as_expression_def(this, _, result, _) } + /** Gets the node corresponding to the field `operator`. */ + final AsOperator getOperator() { swift_as_expression_def(this, _, result, _) } - /** Gets the child of this node. */ - final AsOperator getChild() { swift_as_expression_def(this, _, _, result) } + /** Gets the node corresponding to the field `type`. */ + final Type getType() { swift_as_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -208,34 +208,68 @@ module Swift { /** Gets the node corresponding to the field `default_value`. */ final Type getDefaultValue() { swift_associatedtype_declaration_default_value(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_associatedtype_declaration_modifiers(this, result) } + /** Gets the node corresponding to the field `must_inherit`. */ final Type getMustInherit() { swift_associatedtype_declaration_must_inherit(this, result) } /** Gets the node corresponding to the field `name`. */ final TypeIdentifier getName() { swift_associatedtype_declaration_def(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_associatedtype_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_associatedtype_declaration_type_constraints(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_associatedtype_declaration_default_value(this, result) or + swift_associatedtype_declaration_modifiers(this, result) or swift_associatedtype_declaration_must_inherit(this, result) or swift_associatedtype_declaration_def(this, result) or - swift_associatedtype_declaration_child(this, _, result) + swift_associatedtype_declaration_type_constraints(this, result) } } + /** A class representing `async_keyword` tokens. */ + class AsyncKeyword extends @swift_token_async_keyword, Token { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "AsyncKeyword" } + } + /** A class representing `attribute` nodes. */ class Attribute extends @swift_attribute, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Attribute" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_attribute_child(this, i, result) } + /** Gets the node corresponding to the field `argument`. */ + final Expression getArgument(int i) { swift_attribute_argument(this, i, result) } + + /** Gets the node corresponding to the field `argument_name`. */ + final SimpleIdentifier getArgumentName(int i) { swift_attribute_argument_name(this, i, result) } + + /** Gets the node corresponding to the field `name`. */ + final UserType getName() { swift_attribute_def(this, result) } + + /** Gets the node corresponding to the field `param_ref`. */ + final SimpleIdentifier getParamRef(int i) { swift_attribute_param_ref(this, i, result) } + + /** Gets the node corresponding to the field `platform`. */ + final SimpleIdentifier getPlatform(int i) { swift_attribute_platform(this, i, result) } + + /** Gets the node corresponding to the field `version`. */ + final IntegerLiteral getVersion(int i) { swift_attribute_version(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_attribute_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_attribute_argument(this, _, result) or + swift_attribute_argument_name(this, _, result) or + swift_attribute_def(this, result) or + swift_attribute_param_ref(this, _, result) or + swift_attribute_platform(this, _, result) or + swift_attribute_version(this, _, result) + } } /** A class representing `availability_condition` nodes. */ @@ -325,11 +359,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "CallExpression" } + /** Gets the node corresponding to the field `function`. */ + final Expression getFunction() { swift_call_expression_function(this, result) } + + /** Gets the node corresponding to the field `suffix`. */ + final CallSuffix getSuffix() { swift_call_expression_suffix(this, result) } + /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_call_expression_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_call_expression_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_call_expression_function(this, result) or + swift_call_expression_suffix(this, result) or + swift_call_expression_child(this, _, result) + } } /** A class representing `call_suffix` nodes. */ @@ -354,11 +398,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "CaptureList" } - /** Gets the `i`th child of this node. */ - final CaptureListItem getChild(int i) { swift_capture_list_child(this, i, result) } + /** Gets the node corresponding to the field `item`. */ + final CaptureListItem getItem(int i) { swift_capture_list_item(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_capture_list_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_capture_list_item(this, _, result) } } /** A class representing `capture_list_item` nodes. */ @@ -369,17 +413,17 @@ module Swift { /** Gets the node corresponding to the field `name`. */ final AstNode getName() { swift_capture_list_item_def(this, result) } + /** Gets the node corresponding to the field `ownership`. */ + final OwnershipModifier getOwnership() { swift_capture_list_item_ownership(this, result) } + /** Gets the node corresponding to the field `value`. */ final Expression getValue() { swift_capture_list_item_value(this, result) } - /** Gets the child of this node. */ - final OwnershipModifier getChild() { swift_capture_list_item_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_capture_list_item_def(this, result) or - swift_capture_list_item_value(this, result) or - swift_capture_list_item_child(this, result) + swift_capture_list_item_ownership(this, result) or + swift_capture_list_item_value(this, result) } } @@ -388,15 +432,24 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "CatchBlock" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_catch_block_body(this, result) } + /** Gets the node corresponding to the field `error`. */ final Pattern getError() { swift_catch_block_error(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_catch_block_child(this, i, result) } + /** Gets the node corresponding to the field `keyword`. */ + final CatchKeyword getKeyword() { swift_catch_block_def(this, result) } + + /** Gets the node corresponding to the field `where`. */ + final WhereClause getWhere() { swift_catch_block_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_catch_block_error(this, result) or swift_catch_block_child(this, _, result) + swift_catch_block_body(this, result) or + swift_catch_block_error(this, result) or + swift_catch_block_def(this, result) or + swift_catch_block_where(this, result) } } @@ -453,6 +506,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ClassDeclaration" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_class_declaration_attribute(this, i, result) } + /** Gets the node corresponding to the field `body`. */ final AstNode getBody() { swift_class_declaration_def(this, result, _, _) } @@ -471,16 +527,33 @@ module Swift { ) } + /** Gets the node corresponding to the field `modifiers`. */ + final AstNode getModifiers(int i) { swift_class_declaration_modifiers(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final AstNode getName() { swift_class_declaration_def(this, _, _, result) } + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_class_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_class_declaration_type_parameters(this, result) + } + /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_class_declaration_child(this, i, result) } + final InheritanceSpecifier getChild(int i) { swift_class_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_class_declaration_attribute(this, _, result) or swift_class_declaration_def(this, result, _, _) or + swift_class_declaration_modifiers(this, _, result) or swift_class_declaration_def(this, _, _, result) or + swift_class_declaration_type_constraints(this, result) or + swift_class_declaration_type_parameters(this, result) or swift_class_declaration_child(this, _, result) } } @@ -527,11 +600,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ComputedGetter" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_computed_getter_child(this, i, result) } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_computed_getter_attribute(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_computed_getter_body(this, result) } + + /** Gets the node corresponding to the field `specifier`. */ + final GetterSpecifier getSpecifier() { swift_computed_getter_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_computed_getter_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_computed_getter_attribute(this, _, result) or + swift_computed_getter_body(this, result) or + swift_computed_getter_def(this, result) + } } /** A class representing `computed_modify` nodes. */ @@ -539,11 +622,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ComputedModify" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_computed_modify_child(this, i, result) } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_computed_modify_attribute(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_computed_modify_body(this, result) } + + /** Gets the node corresponding to the field `specifier`. */ + final ModifySpecifier getSpecifier() { swift_computed_modify_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_computed_modify_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_computed_modify_attribute(this, _, result) or + swift_computed_modify_body(this, result) or + swift_computed_modify_def(this, result) + } } /** A class representing `computed_property` nodes. */ @@ -551,11 +644,17 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ComputedProperty" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_computed_property_child(this, i, result) } + /** Gets the node corresponding to the field `accessor`. */ + final AstNode getAccessor(int i) { swift_computed_property_accessor(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_computed_property_body(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_computed_property_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_computed_property_accessor(this, _, result) or + swift_computed_property_body(this, result) + } } /** A class representing `computed_setter` nodes. */ @@ -563,11 +662,25 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ComputedSetter" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_computed_setter_child(this, i, result) } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_computed_setter_attribute(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_computed_setter_body(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final SimpleIdentifier getParameter() { swift_computed_setter_parameter(this, result) } + + /** Gets the node corresponding to the field `specifier`. */ + final SetterSpecifier getSpecifier() { swift_computed_setter_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_computed_setter_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_computed_setter_attribute(this, _, result) or + swift_computed_setter_body(this, result) or + swift_computed_setter_parameter(this, result) or + swift_computed_setter_def(this, result) + } } /** A class representing `conjunction_expression` nodes. */ @@ -603,8 +716,8 @@ module Swift { /** Gets the node corresponding to the field `constructed_type`. */ final AstNode getConstructedType() { swift_constructor_expression_def(this, result, _) } - /** Gets the child of this node. */ - final ConstructorSuffix getChild() { swift_constructor_expression_def(this, _, result) } + /** Gets the node corresponding to the field `suffix`. */ + final ConstructorSuffix getSuffix() { swift_constructor_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -636,6 +749,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ControlTransferStatement" } + /** Gets the node corresponding to the field `kind`. */ + final AstNode getKind() { swift_control_transfer_statement_kind(this, result) } + /** Gets the node corresponding to the field `result`. */ final Expression getResult() { swift_control_transfer_statement_result(this, result) } @@ -644,6 +760,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_control_transfer_statement_kind(this, result) or swift_control_transfer_statement_result(this, result) or swift_control_transfer_statement_child(this, _, result) } @@ -669,12 +786,12 @@ module Swift { /** Gets the node corresponding to the field `body`. */ final FunctionBody getBody() { swift_deinit_declaration_def(this, result) } - /** Gets the child of this node. */ - final Modifiers getChild() { swift_deinit_declaration_child(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_deinit_declaration_modifiers(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_deinit_declaration_def(this, result) or swift_deinit_declaration_child(this, result) + swift_deinit_declaration_def(this, result) or swift_deinit_declaration_modifiers(this, result) } } @@ -742,11 +859,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DidsetClause" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_didset_clause_child(this, i, result) } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_didset_clause_body(this, result) } + + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_didset_clause_modifiers(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final SimpleIdentifier getParameter() { swift_didset_clause_parameter(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_didset_clause_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_didset_clause_body(this, result) or + swift_didset_clause_modifiers(this, result) or + swift_didset_clause_parameter(this, result) + } } /** A class representing `directive` nodes. */ @@ -766,8 +893,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DirectlyAssignableExpression" } - /** Gets the child of this node. */ - final Expression getChild() { swift_directly_assignable_expression_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_directly_assignable_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -805,11 +932,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DoStatement" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_do_statement_child(this, i, result) } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_do_statement_body(this, result) } + + /** Gets the node corresponding to the field `catch`. */ + final CatchBlock getCatch(int i) { swift_do_statement_catch(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_do_statement_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_do_statement_body(this, result) or swift_do_statement_catch(this, _, result) + } } /** A class representing `else` tokens. */ @@ -840,21 +972,21 @@ module Swift { swift_enum_entry_data_contents(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_enum_entry_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName(int i) { swift_enum_entry_name(this, i, result) } /** Gets the node corresponding to the field `raw_value`. */ final Expression getRawValue(int i) { swift_enum_entry_raw_value(this, i, result) } - /** Gets the child of this node. */ - final Modifiers getChild() { swift_enum_entry_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_enum_entry_data_contents(this, _, result) or + swift_enum_entry_modifiers(this, result) or swift_enum_entry_name(this, _, result) or - swift_enum_entry_raw_value(this, _, result) or - swift_enum_entry_child(this, result) + swift_enum_entry_raw_value(this, _, result) } } @@ -875,20 +1007,20 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EqualityConstraint" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_equality_constraint_attribute(this, i, result) } + /** Gets the node corresponding to the field `constrained_type`. */ final AstNode getConstrainedType() { swift_equality_constraint_def(this, result, _) } /** Gets the node corresponding to the field `must_equal`. */ final Type getMustEqual() { swift_equality_constraint_def(this, _, result) } - /** Gets the `i`th child of this node. */ - final Attribute getChild(int i) { swift_equality_constraint_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_equality_constraint_attribute(this, _, result) or swift_equality_constraint_def(this, result, _) or - swift_equality_constraint_def(this, _, result) or - swift_equality_constraint_child(this, _, result) + swift_equality_constraint_def(this, _, result) } } @@ -928,8 +1060,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ExistentialType" } - /** Gets the child of this node. */ - final UnannotatedType getChild() { swift_existential_type_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_existential_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_existential_type_def(this, result) } @@ -942,8 +1074,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ExternalMacroDefinition" } - /** Gets the child of this node. */ - final ValueArguments getChild() { swift_external_macro_definition_def(this, result) } + /** Gets the node corresponding to the field `arguments`. */ + final ValueArguments getArguments() { swift_external_macro_definition_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_external_macro_definition_def(this, result) } @@ -954,20 +1086,32 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ForStatement" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_for_statement_body(this, result) } + /** Gets the node corresponding to the field `collection`. */ final Expression getCollection() { swift_for_statement_def(this, result, _) } /** Gets the node corresponding to the field `item`. */ final Pattern getItem() { swift_for_statement_def(this, _, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_for_statement_child(this, i, result) } + /** Gets the node corresponding to the field `try`. */ + final TryOperator getTry() { swift_for_statement_try(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType() { swift_for_statement_type(this, result) } + + /** Gets the node corresponding to the field `where`. */ + final WhereClause getWhere() { swift_for_statement_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_for_statement_body(this, result) or swift_for_statement_def(this, result, _) or swift_for_statement_def(this, _, result) or - swift_for_statement_child(this, _, result) + swift_for_statement_try(this, result) or + swift_for_statement_type(this, result) or + swift_for_statement_where(this, result) } } @@ -982,11 +1126,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "FunctionBody" } - /** Gets the child of this node. */ - final Statements getChild() { swift_function_body_child(this, result) } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_function_body_body(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_function_body_child(this, result) } + final override AstNode getAFieldOrChild() { swift_function_body_body(this, result) } } /** A class representing `function_declaration` nodes. */ @@ -994,6 +1138,12 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "FunctionDeclaration" } + /** Gets the node corresponding to the field `async`. */ + final AsyncKeyword getAsync() { swift_function_declaration_async(this, result) } + + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_function_declaration_attribute(this, i, result) } + /** Gets the node corresponding to the field `body`. */ final FunctionBody getBody() { swift_function_declaration_def(this, result, _) } @@ -1002,22 +1152,44 @@ module Swift { swift_function_declaration_default_value(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final AstNode getModifiers(int i) { swift_function_declaration_modifiers(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final AstNode getName() { swift_function_declaration_def(this, _, result) } + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter(int i) { swift_function_declaration_parameter(this, i, result) } + /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_function_declaration_return_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_function_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `throws`. */ + final AstNode getThrows() { swift_function_declaration_throws(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_function_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_function_declaration_type_parameters(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_function_declaration_async(this, result) or + swift_function_declaration_attribute(this, _, result) or swift_function_declaration_def(this, result, _) or swift_function_declaration_default_value(this, _, result) or + swift_function_declaration_modifiers(this, _, result) or swift_function_declaration_def(this, _, result) or + swift_function_declaration_parameter(this, _, result) or swift_function_declaration_return_type(this, result) or - swift_function_declaration_child(this, _, result) + swift_function_declaration_throws(this, result) or + swift_function_declaration_type_constraints(this, result) or + swift_function_declaration_type_parameters(this, result) } } @@ -1032,20 +1204,24 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "FunctionType" } + /** Gets the node corresponding to the field `async`. */ + final AsyncKeyword getAsync() { swift_function_type_async(this, result) } + /** Gets the node corresponding to the field `params`. */ final UnannotatedType getParams() { swift_function_type_def(this, result, _) } /** Gets the node corresponding to the field `return_type`. */ final Type getReturnType() { swift_function_type_def(this, _, result) } - /** Gets the child of this node. */ - final AstNode getChild() { swift_function_type_child(this, result) } + /** Gets the node corresponding to the field `throws`. */ + final AstNode getThrows() { swift_function_type_throws(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_function_type_async(this, result) or swift_function_type_def(this, result, _) or swift_function_type_def(this, _, result) or - swift_function_type_child(this, result) + swift_function_type_throws(this, result) } } @@ -1054,11 +1230,17 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "GetterSpecifier" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_getter_specifier_child(this, i, result) } + /** Gets the node corresponding to the field `effect`. */ + final AstNode getEffect(int i) { swift_getter_specifier_effect(this, i, result) } + + /** Gets the node corresponding to the field `mutation`. */ + final MutationModifier getMutation() { swift_getter_specifier_mutation(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_getter_specifier_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_getter_specifier_effect(this, _, result) or + swift_getter_specifier_mutation(this, result) + } } class GlobalDeclaration extends @swift_global_declaration, AstNode { } @@ -1068,16 +1250,20 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "GuardStatement" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_guard_statement_body(this, result) } + /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_guard_statement_condition(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_guard_statement_child(this, i, result) } + /** Gets the node corresponding to the field `else_keyword`. */ + final Else getElseKeyword() { swift_guard_statement_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_guard_statement_body(this, result) or swift_guard_statement_condition(this, _, result) or - swift_guard_statement_child(this, _, result) + swift_guard_statement_def(this, result) } } @@ -1092,11 +1278,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Identifier" } - /** Gets the `i`th child of this node. */ - final SimpleIdentifier getChild(int i) { swift_identifier_child(this, i, result) } + /** Gets the node corresponding to the field `part`. */ + final SimpleIdentifier getPart(int i) { swift_identifier_part(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_identifier_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_identifier_part(this, _, result) } } /** A class representing `if_condition` nodes. */ @@ -1104,8 +1290,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "IfCondition" } - /** Gets the child of this node. */ - final AstNode getChild() { swift_if_condition_def(this, result) } + /** Gets the node corresponding to the field `kind`. */ + final AstNode getKind() { swift_if_condition_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_if_condition_def(this, result) } @@ -1121,12 +1307,20 @@ module Swift { swift_if_let_binding_bound_identifier(this, result) } + /** Gets the node corresponding to the field `value`. */ + final Expression getValue() { swift_if_let_binding_value(this, result) } + + /** Gets the node corresponding to the field `where`. */ + final WhereClause getWhere() { swift_if_let_binding_where(this, result) } + /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_if_let_binding_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_if_let_binding_bound_identifier(this, result) or + swift_if_let_binding_value(this, result) or + swift_if_let_binding_where(this, result) or swift_if_let_binding_child(this, _, result) } } @@ -1136,15 +1330,24 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "IfStatement" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody(int i) { swift_if_statement_body(this, i, result) } + /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_if_statement_condition(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_if_statement_child(this, i, result) } + /** Gets the node corresponding to the field `else_branch`. */ + final IfStatement getElseBranch() { swift_if_statement_else_branch(this, result) } + + /** Gets the node corresponding to the field `else_keyword`. */ + final Else getElseKeyword() { swift_if_statement_else_keyword(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_statement_condition(this, _, result) or swift_if_statement_child(this, _, result) + swift_if_statement_body(this, _, result) or + swift_if_statement_condition(this, _, result) or + swift_if_statement_else_branch(this, result) or + swift_if_statement_else_keyword(this, result) } } @@ -1153,8 +1356,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ImplicitlyUnwrappedType" } - /** Gets the child of this node. */ - final Type getChild() { swift_implicitly_unwrapped_type_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final Type getName() { swift_implicitly_unwrapped_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_implicitly_unwrapped_type_def(this, result) } @@ -1165,11 +1368,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ImportDeclaration" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_import_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_import_declaration_modifiers(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final Identifier getName() { swift_import_declaration_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_import_declaration_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_import_declaration_modifiers(this, result) or swift_import_declaration_def(this, result) + } } /** A class representing `infix_expression` nodes. */ @@ -1199,20 +1407,20 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "InheritanceConstraint" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_inheritance_constraint_attribute(this, i, result) } + /** Gets the node corresponding to the field `constrained_type`. */ final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result, _) } /** Gets the node corresponding to the field `inherits_from`. */ final AstNode getInheritsFrom() { swift_inheritance_constraint_def(this, _, result) } - /** Gets the `i`th child of this node. */ - final Attribute getChild(int i) { swift_inheritance_constraint_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_inheritance_constraint_attribute(this, _, result) or swift_inheritance_constraint_def(this, result, _) or - swift_inheritance_constraint_def(this, _, result) or - swift_inheritance_constraint_child(this, _, result) + swift_inheritance_constraint_def(this, _, result) } } @@ -1239,6 +1447,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "InitDeclaration" } + /** Gets the node corresponding to the field `async`. */ + final AsyncKeyword getAsync() { swift_init_declaration_async(this, result) } + + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_init_declaration_attribute(this, i, result) } + + /** Gets the node corresponding to the field `bang`. */ + final Bang getBang() { swift_init_declaration_bang(this, result) } + /** Gets the node corresponding to the field `body`. */ final FunctionBody getBody() { swift_init_declaration_body(this, result) } @@ -1247,19 +1464,42 @@ module Swift { swift_init_declaration_default_value(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_init_declaration_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final string getName() { exists(int value | swift_init_declaration_def(this, value) | (result = "init" and value = 0)) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_init_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter(int i) { swift_init_declaration_parameter(this, i, result) } + + /** Gets the node corresponding to the field `throws`. */ + final AstNode getThrows() { swift_init_declaration_throws(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_init_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_init_declaration_type_parameters(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_init_declaration_async(this, result) or + swift_init_declaration_attribute(this, _, result) or + swift_init_declaration_bang(this, result) or swift_init_declaration_body(this, result) or swift_init_declaration_default_value(this, _, result) or - swift_init_declaration_child(this, _, result) + swift_init_declaration_modifiers(this, result) or + swift_init_declaration_parameter(this, _, result) or + swift_init_declaration_throws(this, result) or + swift_init_declaration_type_constraints(this, result) or + swift_init_declaration_type_parameters(this, result) } } @@ -1282,18 +1522,20 @@ module Swift { swift_interpolated_expression_reference_specifier(this, i, result) } + /** Gets the node corresponding to the field `type_modifiers`. */ + final TypeModifiers getTypeModifiers() { + swift_interpolated_expression_type_modifiers(this, result) + } + /** Gets the node corresponding to the field `value`. */ final Expression getValue() { swift_interpolated_expression_value(this, result) } - /** Gets the child of this node. */ - final TypeModifiers getChild() { swift_interpolated_expression_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_interpolated_expression_name(this, result) or swift_interpolated_expression_reference_specifier(this, _, result) or - swift_interpolated_expression_value(this, result) or - swift_interpolated_expression_child(this, result) + swift_interpolated_expression_type_modifiers(this, result) or + swift_interpolated_expression_value(this, result) } } @@ -1314,8 +1556,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "KeyPathStringExpression" } - /** Gets the child of this node. */ - final Expression getChild() { swift_key_path_string_expression_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_key_path_string_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_key_path_string_expression_def(this, result) } @@ -1326,16 +1568,26 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "LambdaFunctionType" } + /** Gets the node corresponding to the field `async`. */ + final AsyncKeyword getAsync() { swift_lambda_function_type_async(this, result) } + + /** Gets the node corresponding to the field `params`. */ + final LambdaFunctionTypeParameters getParams() { + swift_lambda_function_type_params(this, result) + } + /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_lambda_function_type_return_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_lambda_function_type_child(this, i, result) } + /** Gets the node corresponding to the field `throws`. */ + final AstNode getThrows() { swift_lambda_function_type_throws(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_lambda_function_type_async(this, result) or + swift_lambda_function_type_params(this, result) or swift_lambda_function_type_return_type(this, result) or - swift_lambda_function_type_child(this, _, result) + swift_lambda_function_type_throws(this, result) } } @@ -1344,14 +1596,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "LambdaFunctionTypeParameters" } - /** Gets the `i`th child of this node. */ - final LambdaParameter getChild(int i) { - swift_lambda_function_type_parameters_child(this, i, result) + /** Gets the node corresponding to the field `parameter`. */ + final LambdaParameter getParameter(int i) { + swift_lambda_function_type_parameters_parameter(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_lambda_function_type_parameters_child(this, _, result) + swift_lambda_function_type_parameters_parameter(this, _, result) } } @@ -1360,20 +1612,24 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "LambdaLiteral" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_lambda_literal_attribute(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_lambda_literal_body(this, result) } + /** Gets the node corresponding to the field `captures`. */ final CaptureList getCaptures() { swift_lambda_literal_captures(this, result) } /** Gets the node corresponding to the field `type`. */ final LambdaFunctionType getType() { swift_lambda_literal_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_lambda_literal_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_lambda_literal_attribute(this, _, result) or + swift_lambda_literal_body(this, result) or swift_lambda_literal_captures(this, result) or - swift_lambda_literal_type(this, result) or - swift_lambda_literal_child(this, _, result) + swift_lambda_literal_type(this, result) } } @@ -1385,21 +1641,21 @@ module Swift { /** Gets the node corresponding to the field `external_name`. */ final SimpleIdentifier getExternalName() { swift_lambda_parameter_external_name(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final ParameterModifiers getModifiers() { swift_lambda_parameter_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_lambda_parameter_name(this, result) } + final AstNode getName() { swift_lambda_parameter_def(this, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType() { swift_lambda_parameter_type(this, result) } - /** Gets the child of this node. */ - final AstNode getChild() { swift_lambda_parameter_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_lambda_parameter_external_name(this, result) or - swift_lambda_parameter_name(this, result) or - swift_lambda_parameter_type(this, result) or - swift_lambda_parameter_child(this, result) + swift_lambda_parameter_modifiers(this, result) or + swift_lambda_parameter_def(this, result) or + swift_lambda_parameter_type(this, result) } } @@ -1436,6 +1692,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "MacroDeclaration" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_macro_declaration_attribute(this, i, result) } + /** Gets the node corresponding to the field `default_value`. */ final Expression getDefaultValue(int i) { swift_macro_declaration_default_value(this, i, result) @@ -1444,13 +1703,18 @@ module Swift { /** Gets the node corresponding to the field `definition`. */ final MacroDefinition getDefinition() { swift_macro_declaration_definition(this, result) } + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter(int i) { swift_macro_declaration_parameter(this, i, result) } + /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_macro_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_macro_declaration_attribute(this, _, result) or swift_macro_declaration_default_value(this, _, result) or swift_macro_declaration_definition(this, result) or + swift_macro_declaration_parameter(this, _, result) or swift_macro_declaration_child(this, _, result) } } @@ -1472,11 +1736,23 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "MacroInvocation" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_macro_invocation_child(this, i, result) } + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_macro_invocation_def(this, result, _) } + + /** Gets the node corresponding to the field `suffix`. */ + final CallSuffix getSuffix() { swift_macro_invocation_def(this, _, result) } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_macro_invocation_type_parameters(this, result) + } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_macro_invocation_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_macro_invocation_def(this, result, _) or + swift_macro_invocation_def(this, _, result) or + swift_macro_invocation_type_parameters(this, result) + } } /** A class representing `member_modifier` tokens. */ @@ -1490,8 +1766,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Metatype" } - /** Gets the child of this node. */ - final UnannotatedType getChild() { swift_metatype_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_metatype_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_metatype_def(this, result) } @@ -1502,11 +1778,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Modifiers" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_modifiers_child(this, i, result) } + /** Gets the node corresponding to the field `modifier`. */ + final AstNode getModifier(int i) { swift_modifiers_modifier(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_modifiers_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_modifiers_modifier(this, _, result) } } /** A class representing `modify_specifier` nodes. */ @@ -1514,11 +1790,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ModifySpecifier" } - /** Gets the child of this node. */ - final MutationModifier getChild() { swift_modify_specifier_child(this, result) } + /** Gets the node corresponding to the field `mutation`. */ + final MutationModifier getMutation() { swift_modify_specifier_mutation(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_modify_specifier_child(this, result) } + final override AstNode getAFieldOrChild() { swift_modify_specifier_mutation(this, result) } } /** A class representing `multi_line_str_text` tokens. */ @@ -1623,12 +1899,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "NestedTypeIdentifier" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_nested_type_identifier_child(this, i, result) } + /** Gets the node corresponding to the field `base`. */ + final UnannotatedType getBase() { swift_nested_type_identifier_def(this, result) } + + /** Gets the node corresponding to the field `member`. */ + final SimpleIdentifier getMember(int i) { swift_nested_type_identifier_member(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_nested_type_identifier_child(this, _, result) + swift_nested_type_identifier_def(this, result) or + swift_nested_type_identifier_member(this, _, result) } } @@ -1661,8 +1941,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "OpaqueType" } - /** Gets the child of this node. */ - final UnannotatedType getChild() { swift_opaque_type_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_opaque_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_opaque_type_def(this, result) } @@ -1699,11 +1979,36 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "OperatorDeclaration" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_operator_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `body`. */ + final DeprecatedOperatorDeclarationBody getBody() { + swift_operator_declaration_body(this, result) + } + + /** Gets the node corresponding to the field `kind`. */ + final string getKind() { + exists(int value | swift_operator_declaration_def(this, value, _) | + result = "infix" and value = 0 + or + result = "postfix" and value = 1 + or + result = "prefix" and value = 2 + ) + } + + /** Gets the node corresponding to the field `name`. */ + final ReferenceableOperator getName() { swift_operator_declaration_def(this, _, result) } + + /** Gets the node corresponding to the field `precedence_group`. */ + final SimpleIdentifier getPrecedenceGroup() { + swift_operator_declaration_precedence_group(this, result) + } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_operator_declaration_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_operator_declaration_body(this, result) or + swift_operator_declaration_def(this, _, result) or + swift_operator_declaration_precedence_group(this, result) + } } /** A class representing `optional_chain_marker` nodes. */ @@ -1711,8 +2016,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "OptionalChainMarker" } - /** Gets the child of this node. */ - final Expression getChild() { swift_optional_chain_marker_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_optional_chain_marker_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_optional_chain_marker_def(this, result) } @@ -1744,21 +2049,21 @@ module Swift { /** Gets the node corresponding to the field `external_name`. */ final SimpleIdentifier getExternalName() { swift_parameter_external_name(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final ParameterModifiers getModifiers() { swift_parameter_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName() { swift_parameter_def(this, result, _) } /** Gets the node corresponding to the field `type`. */ final AstNode getType() { swift_parameter_def(this, _, result) } - /** Gets the child of this node. */ - final ParameterModifiers getChild() { swift_parameter_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_parameter_external_name(this, result) or + swift_parameter_modifiers(this, result) or swift_parameter_def(this, result, _) or - swift_parameter_def(this, _, result) or - swift_parameter_child(this, result) + swift_parameter_def(this, _, result) } } @@ -1773,11 +2078,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ParameterModifiers" } - /** Gets the `i`th child of this node. */ - final ParameterModifier getChild(int i) { swift_parameter_modifiers_child(this, i, result) } + /** Gets the node corresponding to the field `modifier`. */ + final ParameterModifier getModifier(int i) { + swift_parameter_modifiers_modifier(this, i, result) + } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_parameter_modifiers_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_parameter_modifiers_modifier(this, _, result) + } } /** A class representing `pattern` nodes. */ @@ -1802,11 +2111,17 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PlaygroundLiteral" } - /** Gets the `i`th child of this node. */ - final Expression getChild(int i) { swift_playground_literal_child(this, i, result) } + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName(int i) { swift_playground_literal_name(this, i, result) } + + /** Gets the node corresponding to the field `value`. */ + final Expression getValue(int i) { swift_playground_literal_value(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_playground_literal_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_playground_literal_name(this, _, result) or + swift_playground_literal_value(this, _, result) + } } /** A class representing `postfix_expression` nodes. */ @@ -1831,12 +2146,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PrecedenceGroupAttribute" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_precedence_group_attribute_child(this, i, result) } + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_precedence_group_attribute_def(this, result, _) } + + /** Gets the node corresponding to the field `value`. */ + final AstNode getValue() { swift_precedence_group_attribute_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_precedence_group_attribute_child(this, _, result) + swift_precedence_group_attribute_def(this, result, _) or + swift_precedence_group_attribute_def(this, _, result) } } @@ -1845,14 +2164,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PrecedenceGroupAttributes" } - /** Gets the `i`th child of this node. */ - final PrecedenceGroupAttribute getChild(int i) { - swift_precedence_group_attributes_child(this, i, result) + /** Gets the node corresponding to the field `attribute`. */ + final PrecedenceGroupAttribute getAttribute(int i) { + swift_precedence_group_attributes_attribute(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_precedence_group_attributes_child(this, _, result) + swift_precedence_group_attributes_attribute(this, _, result) } } @@ -1861,12 +2180,18 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PrecedenceGroupDeclaration" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_precedence_group_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `attributes`. */ + final PrecedenceGroupAttributes getAttributes() { + swift_precedence_group_declaration_attributes(this, result) + } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_precedence_group_declaration_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_precedence_group_declaration_child(this, _, result) + swift_precedence_group_declaration_attributes(this, result) or + swift_precedence_group_declaration_def(this, result) } } @@ -1903,6 +2228,9 @@ module Swift { swift_property_declaration_computed_value(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final AstNode getModifiers(int i) { swift_property_declaration_modifiers(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final Pattern getName(int i) { swift_property_declaration_name(this, i, result) } @@ -1915,6 +2243,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_property_declaration_computed_value(this, _, result) or + swift_property_declaration_modifiers(this, _, result) or swift_property_declaration_name(this, _, result) or swift_property_declaration_value(this, _, result) or swift_property_declaration_child(this, _, result) @@ -1944,12 +2273,12 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolCompositionType" } - /** Gets the `i`th child of this node. */ - final UnannotatedType getChild(int i) { swift_protocol_composition_type_child(this, i, result) } + /** Gets the node corresponding to the field `type`. */ + final UnannotatedType getType(int i) { swift_protocol_composition_type_type(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_protocol_composition_type_child(this, _, result) + swift_protocol_composition_type_type(this, _, result) } } @@ -1958,6 +2287,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolDeclaration" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_protocol_declaration_attribute(this, i, result) } + /** Gets the node corresponding to the field `body`. */ final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _, _) } @@ -1968,16 +2300,33 @@ module Swift { ) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_protocol_declaration_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, _, result) } + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_protocol_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_protocol_declaration_type_parameters(this, result) + } + /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_declaration_child(this, i, result) } + final InheritanceSpecifier getChild(int i) { swift_protocol_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_protocol_declaration_attribute(this, _, result) or swift_protocol_declaration_def(this, result, _, _) or + swift_protocol_declaration_modifiers(this, result) or swift_protocol_declaration_def(this, _, _, result) or + swift_protocol_declaration_type_constraints(this, result) or + swift_protocol_declaration_type_parameters(this, result) or swift_protocol_declaration_child(this, _, result) } } @@ -1987,6 +2336,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolFunctionDeclaration" } + /** Gets the node corresponding to the field `async`. */ + final AsyncKeyword getAsync() { swift_protocol_function_declaration_async(this, result) } + + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { + swift_protocol_function_declaration_attribute(this, i, result) + } + /** Gets the node corresponding to the field `body`. */ final FunctionBody getBody() { swift_protocol_function_declaration_body(this, result) } @@ -1995,22 +2352,46 @@ module Swift { swift_protocol_function_declaration_default_value(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_protocol_function_declaration_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final AstNode getName() { swift_protocol_function_declaration_def(this, result) } + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter(int i) { + swift_protocol_function_declaration_parameter(this, i, result) + } + /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_protocol_function_declaration_return_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_function_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `throws`. */ + final AstNode getThrows() { swift_protocol_function_declaration_throws(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_protocol_function_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_protocol_function_declaration_type_parameters(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_protocol_function_declaration_async(this, result) or + swift_protocol_function_declaration_attribute(this, _, result) or swift_protocol_function_declaration_body(this, result) or swift_protocol_function_declaration_default_value(this, _, result) or + swift_protocol_function_declaration_modifiers(this, result) or swift_protocol_function_declaration_def(this, result) or + swift_protocol_function_declaration_parameter(this, _, result) or swift_protocol_function_declaration_return_type(this, result) or - swift_protocol_function_declaration_child(this, _, result) + swift_protocol_function_declaration_throws(this, result) or + swift_protocol_function_declaration_type_constraints(this, result) or + swift_protocol_function_declaration_type_parameters(this, result) } } @@ -2021,16 +2402,32 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolPropertyDeclaration" } - /** Gets the node corresponding to the field `name`. */ - final Pattern getName() { swift_protocol_property_declaration_def(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_protocol_property_declaration_modifiers(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_property_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `name`. */ + final Pattern getName() { swift_protocol_property_declaration_def(this, result, _) } + + /** Gets the node corresponding to the field `requirements`. */ + final ProtocolPropertyRequirements getRequirements() { + swift_protocol_property_declaration_def(this, _, result) + } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType() { swift_protocol_property_declaration_type(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_protocol_property_declaration_type_constraints(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_protocol_property_declaration_def(this, result) or - swift_protocol_property_declaration_child(this, _, result) + swift_protocol_property_declaration_modifiers(this, result) or + swift_protocol_property_declaration_def(this, result, _) or + swift_protocol_property_declaration_def(this, _, result) or + swift_protocol_property_declaration_type(this, result) or + swift_protocol_property_declaration_type_constraints(this, result) } } @@ -2039,12 +2436,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolPropertyRequirements" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_property_requirements_child(this, i, result) } + /** Gets the node corresponding to the field `accessor`. */ + final AstNode getAccessor(int i) { + swift_protocol_property_requirements_accessor(this, i, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_protocol_property_requirements_child(this, _, result) + swift_protocol_property_requirements_accessor(this, _, result) } } @@ -2097,8 +2496,8 @@ module Swift { swift_raw_str_interpolation_interpolation(this, i, result) } - /** Gets the child of this node. */ - final RawStrInterpolationStart getChild() { swift_raw_str_interpolation_def(this, result) } + /** Gets the node corresponding to the field `start`. */ + final RawStrInterpolationStart getStart() { swift_raw_str_interpolation_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2124,6 +2523,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "RawStringLiteral" } + /** Gets the node corresponding to the field `continuing`. */ + final RawStrContinuingIndicator getContinuing(int i) { + swift_raw_string_literal_continuing(this, i, result) + } + /** Gets the node corresponding to the field `interpolation`. */ final RawStrInterpolation getInterpolation(int i) { swift_raw_string_literal_interpolation(this, i, result) @@ -2132,16 +2536,11 @@ module Swift { /** Gets the node corresponding to the field `text`. */ final AstNode getText(int i) { swift_raw_string_literal_text(this, i, result) } - /** Gets the `i`th child of this node. */ - final RawStrContinuingIndicator getChild(int i) { - swift_raw_string_literal_child(this, i, result) - } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_raw_string_literal_continuing(this, _, result) or swift_raw_string_literal_interpolation(this, _, result) or - swift_raw_string_literal_text(this, _, result) or - swift_raw_string_literal_child(this, _, result) + swift_raw_string_literal_text(this, _, result) } } @@ -2156,11 +2555,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ReferenceableOperator" } - /** Gets the child of this node. */ - final AstNode getChild() { swift_referenceable_operator_child(this, result) } + /** Gets the node corresponding to the field `operator`. */ + final AstNode getOperator() { swift_referenceable_operator_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_referenceable_operator_child(this, result) } + final override AstNode getAFieldOrChild() { swift_referenceable_operator_def(this, result) } } /** A class representing `regex_literal` tokens. */ @@ -2174,18 +2573,18 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "RepeatWhileStatement" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_repeat_while_statement_body(this, result) } + /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_repeat_while_statement_condition(this, i, result) } - /** Gets the child of this node. */ - final Statements getChild() { swift_repeat_while_statement_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_repeat_while_statement_condition(this, _, result) or - swift_repeat_while_statement_child(this, result) + swift_repeat_while_statement_body(this, result) or + swift_repeat_while_statement_condition(this, _, result) } } @@ -2194,8 +2593,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SelectorExpression" } - /** Gets the child of this node. */ - final Expression getChild() { swift_selector_expression_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_selector_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_selector_expression_def(this, result) } @@ -2212,11 +2611,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SetterSpecifier" } - /** Gets the child of this node. */ - final MutationModifier getChild() { swift_setter_specifier_child(this, result) } + /** Gets the node corresponding to the field `mutation`. */ + final MutationModifier getMutation() { swift_setter_specifier_mutation(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_setter_specifier_child(this, result) } + final override AstNode getAFieldOrChild() { swift_setter_specifier_mutation(this, result) } } /** A class representing `shebang_line` tokens. */ @@ -2283,22 +2682,46 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SubscriptDeclaration" } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_subscript_declaration_attribute(this, i, result) } + + /** Gets the node corresponding to the field `body`. */ + final ComputedProperty getBody() { swift_subscript_declaration_def(this, result) } + /** Gets the node corresponding to the field `default_value`. */ final Expression getDefaultValue(int i) { swift_subscript_declaration_default_value(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_subscript_declaration_modifiers(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter(int i) { swift_subscript_declaration_parameter(this, i, result) } + /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_subscript_declaration_return_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_subscript_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_subscript_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_subscript_declaration_type_parameters(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_subscript_declaration_attribute(this, _, result) or + swift_subscript_declaration_def(this, result) or swift_subscript_declaration_default_value(this, _, result) or + swift_subscript_declaration_modifiers(this, result) or + swift_subscript_declaration_parameter(this, _, result) or swift_subscript_declaration_return_type(this, result) or - swift_subscript_declaration_child(this, _, result) + swift_subscript_declaration_type_constraints(this, result) or + swift_subscript_declaration_type_parameters(this, result) } } @@ -2349,15 +2772,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SwitchStatement" } + /** Gets the node corresponding to the field `entry`. */ + final SwitchEntry getEntry(int i) { swift_switch_statement_entry(this, i, result) } + /** Gets the node corresponding to the field `expr`. */ final Expression getExpr() { swift_switch_statement_def(this, result) } - /** Gets the `i`th child of this node. */ - final SwitchEntry getChild(int i) { swift_switch_statement_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_switch_statement_def(this, result) or swift_switch_statement_child(this, _, result) + swift_switch_statement_entry(this, _, result) or swift_switch_statement_def(this, result) } } @@ -2415,8 +2838,8 @@ module Swift { /** Gets the node corresponding to the field `expr`. */ final Expression getExpr() { swift_try_expression_def(this, result, _) } - /** Gets the child of this node. */ - final TryOperator getChild() { swift_try_expression_def(this, _, result) } + /** Gets the node corresponding to the field `operator`. */ + final TryOperator getOperator() { swift_try_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2469,20 +2892,24 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TupleTypeItem" } + /** Gets the node corresponding to the field `modifiers`. */ + final ParameterModifiers getModifiers() { swift_tuple_type_item_modifiers(this, result) } + /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName() { swift_tuple_type_item_name(this, result) } /** Gets the node corresponding to the field `type`. */ final Type getType() { swift_tuple_type_item_type(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_tuple_type_item_child(this, i, result) } + /** Gets the child of this node. */ + final AstNode getChild() { swift_tuple_type_item_child(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_tuple_type_item_modifiers(this, result) or swift_tuple_type_item_name(this, result) or swift_tuple_type_item_type(this, result) or - swift_tuple_type_item_child(this, _, result) + swift_tuple_type_item_child(this, result) } } @@ -2520,11 +2947,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeArguments" } - /** Gets the `i`th child of this node. */ - final Type getChild(int i) { swift_type_arguments_child(this, i, result) } + /** Gets the node corresponding to the field `argument`. */ + final Type getArgument(int i) { swift_type_arguments_argument(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_arguments_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_type_arguments_argument(this, _, result) } } /** A class representing `type_constraint` nodes. */ @@ -2532,8 +2959,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeConstraint" } - /** Gets the child of this node. */ - final AstNode getChild() { swift_type_constraint_def(this, result) } + /** Gets the node corresponding to the field `constraint`. */ + final AstNode getConstraint() { swift_type_constraint_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_type_constraint_def(this, result) } @@ -2544,11 +2971,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeConstraints" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_type_constraints_child(this, i, result) } + /** Gets the node corresponding to the field `constraint`. */ + final TypeConstraint getConstraint(int i) { swift_type_constraints_constraint(this, i, result) } + + /** Gets the node corresponding to the field `keyword`. */ + final WhereKeyword getKeyword() { swift_type_constraints_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_constraints_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_type_constraints_constraint(this, _, result) or swift_type_constraints_def(this, result) + } } /** A class representing `type_identifier` tokens. */ @@ -2564,11 +2996,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeModifiers" } - /** Gets the `i`th child of this node. */ - final Attribute getChild(int i) { swift_type_modifiers_child(this, i, result) } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { swift_type_modifiers_attribute(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_modifiers_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_type_modifiers_attribute(this, _, result) } } /** A class representing `type_pack_expansion` nodes. */ @@ -2576,8 +3008,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypePackExpansion" } - /** Gets the child of this node. */ - final UnannotatedType getChild() { swift_type_pack_expansion_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_type_pack_expansion_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_type_pack_expansion_def(this, result) } @@ -2588,11 +3020,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeParameter" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_type_parameter_child(this, i, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final TypeParameterModifiers getModifiers() { swift_type_parameter_modifiers(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final AstNode getName() { swift_type_parameter_def(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final Type getType() { swift_type_parameter_type(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_parameter_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_type_parameter_modifiers(this, result) or + swift_type_parameter_def(this, result) or + swift_type_parameter_type(this, result) + } } /** A class representing `type_parameter_modifiers` nodes. */ @@ -2600,12 +3042,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeParameterModifiers" } - /** Gets the `i`th child of this node. */ - final Attribute getChild(int i) { swift_type_parameter_modifiers_child(this, i, result) } + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute(int i) { + swift_type_parameter_modifiers_attribute(this, i, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_type_parameter_modifiers_child(this, _, result) + swift_type_parameter_modifiers_attribute(this, _, result) } } @@ -2614,8 +3058,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeParameterPack" } - /** Gets the child of this node. */ - final UnannotatedType getChild() { swift_type_parameter_pack_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_type_parameter_pack_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_type_parameter_pack_def(this, result) } @@ -2626,11 +3070,17 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeParameters" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_type_parameters_child(this, i, result) } + /** Gets the node corresponding to the field `constraints`. */ + final TypeConstraints getConstraints() { swift_type_parameters_constraints(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final TypeParameter getParameter(int i) { swift_type_parameters_parameter(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_parameters_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_type_parameters_constraints(this, result) or + swift_type_parameters_parameter(this, _, result) + } } /** A class representing `typealias_declaration` nodes. */ @@ -2638,20 +3088,26 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypealiasDeclaration" } + /** Gets the node corresponding to the field `modifiers`. */ + final AstNode getModifiers(int i) { swift_typealias_declaration_modifiers(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final TypeIdentifier getName() { swift_typealias_declaration_def(this, result, _) } + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_typealias_declaration_type_parameters(this, result) + } + /** Gets the node corresponding to the field `value`. */ final Type getValue() { swift_typealias_declaration_def(this, _, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_typealias_declaration_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_typealias_declaration_modifiers(this, _, result) or swift_typealias_declaration_def(this, result, _) or - swift_typealias_declaration_def(this, _, result) or - swift_typealias_declaration_child(this, _, result) + swift_typealias_declaration_type_parameters(this, result) or + swift_typealias_declaration_def(this, _, result) } } @@ -2662,11 +3118,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "UserType" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_user_type_child(this, i, result) } + /** Gets the node corresponding to the field `part`. */ + final AstNode getPart(int i) { swift_user_type_part(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_user_type_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_user_type_part(this, _, result) } } /** A class representing `value_argument` nodes. */ @@ -2682,18 +3138,18 @@ module Swift { swift_value_argument_reference_specifier(this, i, result) } + /** Gets the node corresponding to the field `type_modifiers`. */ + final TypeModifiers getTypeModifiers() { swift_value_argument_type_modifiers(this, result) } + /** Gets the node corresponding to the field `value`. */ final Expression getValue() { swift_value_argument_value(this, result) } - /** Gets the child of this node. */ - final TypeModifiers getChild() { swift_value_argument_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_value_argument_name(this, result) or swift_value_argument_reference_specifier(this, _, result) or - swift_value_argument_value(this, result) or - swift_value_argument_child(this, result) + swift_value_argument_type_modifiers(this, result) or + swift_value_argument_value(this, result) } } @@ -2714,11 +3170,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ValueArguments" } - /** Gets the `i`th child of this node. */ - final ValueArgument getChild(int i) { swift_value_arguments_child(this, i, result) } + /** Gets the node corresponding to the field `argument`. */ + final ValueArgument getArgument(int i) { swift_value_arguments_argument(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_arguments_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_value_arguments_argument(this, _, result) } } /** A class representing `value_binding_pattern` nodes. */ @@ -2744,8 +3200,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ValuePackExpansion" } - /** Gets the child of this node. */ - final Expression getChild() { swift_value_pack_expansion_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_value_pack_expansion_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_value_pack_expansion_def(this, result) } @@ -2756,8 +3212,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ValueParameterPack" } - /** Gets the child of this node. */ - final Expression getChild() { swift_value_parameter_pack_def(this, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_value_parameter_pack_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_value_parameter_pack_def(this, result) } @@ -2774,11 +3230,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "WhereClause" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_where_clause_child(this, i, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expression getExpr() { swift_where_clause_def(this, result, _) } + + /** Gets the node corresponding to the field `keyword`. */ + final WhereKeyword getKeyword() { swift_where_clause_def(this, _, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_where_clause_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_where_clause_def(this, result, _) or swift_where_clause_def(this, _, result) + } } /** A class representing `where_keyword` tokens. */ @@ -2792,15 +3253,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "WhileStatement" } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_while_statement_body(this, result) } + /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_while_statement_condition(this, i, result) } - /** Gets the child of this node. */ - final Statements getChild() { swift_while_statement_child(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_while_statement_condition(this, _, result) or swift_while_statement_child(this, result) + swift_while_statement_body(this, result) or swift_while_statement_condition(this, _, result) } } @@ -2815,11 +3276,21 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "WillsetClause" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_willset_clause_child(this, i, result) } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_willset_clause_body(this, result) } + + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_willset_clause_modifiers(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final SimpleIdentifier getParameter() { swift_willset_clause_parameter(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_willset_clause_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_willset_clause_body(this, result) or + swift_willset_clause_modifiers(this, result) or + swift_willset_clause_parameter(this, result) + } } /** A class representing `willset_didset_block` nodes. */ @@ -2827,10 +3298,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "WillsetDidsetBlock" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_willset_didset_block_child(this, i, result) } + /** Gets the node corresponding to the field `didset`. */ + final DidsetClause getDidset() { swift_willset_didset_block_didset(this, result) } + + /** Gets the node corresponding to the field `willset`. */ + final WillsetClause getWillset() { swift_willset_didset_block_willset(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_willset_didset_block_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_willset_didset_block_didset(this, result) or + swift_willset_didset_block_willset(this, result) + } } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 5d9826b69a8..1dfd0395e21 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -164,8 +164,8 @@ swift_array_type_def( swift_as_expression_def( unique int id: @swift_as_expression, int expr: @swift_expression ref, - int type__: @swift_type__ ref, - int child: @swift_token_as_operator ref + int operator: @swift_token_as_operator ref, + int type__: @swift_type__ ref ); case @swift_assignment.operator of @@ -190,18 +190,19 @@ swift_associatedtype_declaration_default_value( unique int default_value: @swift_type__ ref ); +swift_associatedtype_declaration_modifiers( + unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, + unique int modifiers: @swift_modifiers ref +); + swift_associatedtype_declaration_must_inherit( unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, unique int must_inherit: @swift_type__ ref ); -@swift_associatedtype_declaration_child_type = @swift_modifiers | @swift_type_constraints - -#keyset[swift_associatedtype_declaration, index] -swift_associatedtype_declaration_child( - int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - int index: int ref, - unique int child: @swift_associatedtype_declaration_child_type ref +swift_associatedtype_declaration_type_constraints( + unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, + unique int type_constraints: @swift_type_constraints ref ); swift_associatedtype_declaration_def( @@ -209,17 +210,44 @@ swift_associatedtype_declaration_def( int name: @swift_token_type_identifier ref ); -@swift_attribute_child_type = @swift_expression | @swift_user_type - #keyset[swift_attribute, index] -swift_attribute_child( +swift_attribute_argument( int swift_attribute: @swift_attribute ref, int index: int ref, - unique int child: @swift_attribute_child_type ref + unique int argument: @swift_expression ref +); + +#keyset[swift_attribute, index] +swift_attribute_argument_name( + int swift_attribute: @swift_attribute ref, + int index: int ref, + unique int argument_name: @swift_token_simple_identifier ref +); + +#keyset[swift_attribute, index] +swift_attribute_param_ref( + int swift_attribute: @swift_attribute ref, + int index: int ref, + unique int param_ref: @swift_token_simple_identifier ref +); + +#keyset[swift_attribute, index] +swift_attribute_platform( + int swift_attribute: @swift_attribute ref, + int index: int ref, + unique int platform: @swift_token_simple_identifier ref +); + +#keyset[swift_attribute, index] +swift_attribute_version( + int swift_attribute: @swift_attribute ref, + int index: int ref, + unique int version: @swift_token_integer_literal ref ); swift_attribute_def( - unique int id: @swift_attribute + unique int id: @swift_attribute, + int name: @swift_user_type ref ); @swift_availability_condition_child_type = @swift_identifier | @swift_token_integer_literal @@ -265,6 +293,16 @@ swift_bitwise_operation_def( int rhs: @swift_expression ref ); +swift_call_expression_function( + unique int swift_call_expression: @swift_call_expression ref, + unique int function: @swift_expression ref +); + +swift_call_expression_suffix( + unique int swift_call_expression: @swift_call_expression ref, + unique int suffix: @swift_call_suffix ref +); + @swift_call_expression_child_type = @swift_call_suffix | @swift_expression #keyset[swift_call_expression, index] @@ -299,10 +337,10 @@ swift_call_suffix_def( ); #keyset[swift_capture_list, index] -swift_capture_list_child( +swift_capture_list_item( int swift_capture_list: @swift_capture_list ref, int index: int ref, - unique int child: @swift_capture_list_item ref + unique int item: @swift_capture_list_item ref ); swift_capture_list_def( @@ -311,37 +349,39 @@ swift_capture_list_def( @swift_capture_list_item_name_type = @swift_token_self_expression | @swift_token_simple_identifier +swift_capture_list_item_ownership( + unique int swift_capture_list_item: @swift_capture_list_item ref, + unique int ownership: @swift_token_ownership_modifier ref +); + swift_capture_list_item_value( unique int swift_capture_list_item: @swift_capture_list_item ref, unique int value: @swift_expression ref ); -swift_capture_list_item_child( - unique int swift_capture_list_item: @swift_capture_list_item ref, - unique int child: @swift_token_ownership_modifier ref -); - swift_capture_list_item_def( unique int id: @swift_capture_list_item, int name: @swift_capture_list_item_name_type ref ); +swift_catch_block_body( + unique int swift_catch_block: @swift_catch_block ref, + unique int body: @swift_statements ref +); + swift_catch_block_error( unique int swift_catch_block: @swift_catch_block ref, unique int error: @swift_pattern ref ); -@swift_catch_block_child_type = @swift_statements | @swift_token_catch_keyword | @swift_where_clause - -#keyset[swift_catch_block, index] -swift_catch_block_child( - int swift_catch_block: @swift_catch_block ref, - int index: int ref, - unique int child: @swift_catch_block_child_type ref +swift_catch_block_where( + unique int swift_catch_block: @swift_catch_block ref, + unique int where: @swift_where_clause ref ); swift_catch_block_def( - unique int id: @swift_catch_block + unique int id: @swift_catch_block, + int keyword: @swift_token_catch_keyword ref ); case @swift_check_expression.op of @@ -374,6 +414,13 @@ swift_class_body_def( unique int id: @swift_class_body ); +#keyset[swift_class_declaration, index] +swift_class_declaration_attribute( + int swift_class_declaration: @swift_class_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + @swift_class_declaration_body_type = @swift_class_body | @swift_enum_class_body case @swift_class_declaration.declaration_kind of @@ -385,15 +432,32 @@ case @swift_class_declaration.declaration_kind of ; +@swift_class_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier + +#keyset[swift_class_declaration, index] +swift_class_declaration_modifiers( + int swift_class_declaration: @swift_class_declaration ref, + int index: int ref, + unique int modifiers: @swift_class_declaration_modifiers_type ref +); + @swift_class_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type -@swift_class_declaration_child_type = @swift_attribute | @swift_inheritance_specifier | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_constraints | @swift_type_parameters +swift_class_declaration_type_constraints( + unique int swift_class_declaration: @swift_class_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_class_declaration_type_parameters( + unique int swift_class_declaration: @swift_class_declaration ref, + unique int type_parameters: @swift_type_parameters ref +); #keyset[swift_class_declaration, index] swift_class_declaration_child( int swift_class_declaration: @swift_class_declaration ref, int index: int ref, - unique int child: @swift_class_declaration_child_type ref + unique int child: @swift_inheritance_specifier ref ); swift_class_declaration_def( @@ -418,56 +482,78 @@ swift_comparison_expression_def( int rhs: @swift_expression ref ); -@swift_computed_getter_child_type = @swift_attribute | @swift_getter_specifier | @swift_statements - #keyset[swift_computed_getter, index] -swift_computed_getter_child( +swift_computed_getter_attribute( int swift_computed_getter: @swift_computed_getter ref, int index: int ref, - unique int child: @swift_computed_getter_child_type ref + unique int attribute: @swift_attribute ref +); + +swift_computed_getter_body( + unique int swift_computed_getter: @swift_computed_getter ref, + unique int body: @swift_statements ref ); swift_computed_getter_def( - unique int id: @swift_computed_getter + unique int id: @swift_computed_getter, + int specifier: @swift_getter_specifier ref ); -@swift_computed_modify_child_type = @swift_attribute | @swift_modify_specifier | @swift_statements - #keyset[swift_computed_modify, index] -swift_computed_modify_child( +swift_computed_modify_attribute( int swift_computed_modify: @swift_computed_modify ref, int index: int ref, - unique int child: @swift_computed_modify_child_type ref + unique int attribute: @swift_attribute ref +); + +swift_computed_modify_body( + unique int swift_computed_modify: @swift_computed_modify ref, + unique int body: @swift_statements ref ); swift_computed_modify_def( - unique int id: @swift_computed_modify + unique int id: @swift_computed_modify, + int specifier: @swift_modify_specifier ref ); -@swift_computed_property_child_type = @swift_computed_getter | @swift_computed_modify | @swift_computed_setter | @swift_statements +@swift_computed_property_accessor_type = @swift_computed_getter | @swift_computed_modify | @swift_computed_setter #keyset[swift_computed_property, index] -swift_computed_property_child( +swift_computed_property_accessor( int swift_computed_property: @swift_computed_property ref, int index: int ref, - unique int child: @swift_computed_property_child_type ref + unique int accessor: @swift_computed_property_accessor_type ref +); + +swift_computed_property_body( + unique int swift_computed_property: @swift_computed_property ref, + unique int body: @swift_statements ref ); swift_computed_property_def( unique int id: @swift_computed_property ); -@swift_computed_setter_child_type = @swift_attribute | @swift_setter_specifier | @swift_statements | @swift_token_simple_identifier - #keyset[swift_computed_setter, index] -swift_computed_setter_child( +swift_computed_setter_attribute( int swift_computed_setter: @swift_computed_setter ref, int index: int ref, - unique int child: @swift_computed_setter_child_type ref + unique int attribute: @swift_attribute ref +); + +swift_computed_setter_body( + unique int swift_computed_setter: @swift_computed_setter ref, + unique int body: @swift_statements ref +); + +swift_computed_setter_parameter( + unique int swift_computed_setter: @swift_computed_setter ref, + unique int parameter: @swift_token_simple_identifier ref ); swift_computed_setter_def( - unique int id: @swift_computed_setter + unique int id: @swift_computed_setter, + int specifier: @swift_setter_specifier ref ); case @swift_conjunction_expression.op of @@ -487,7 +573,7 @@ swift_conjunction_expression_def( swift_constructor_expression_def( unique int id: @swift_constructor_expression, int constructed_type: @swift_constructor_expression_constructed_type_type ref, - int child: @swift_constructor_suffix ref + int suffix: @swift_constructor_suffix ref ); #keyset[swift_constructor_suffix, index] @@ -510,6 +596,13 @@ swift_constructor_suffix_def( unique int id: @swift_constructor_suffix ); +@swift_control_transfer_statement_kind_type = @swift_reserved_word + +swift_control_transfer_statement_kind( + unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, + unique int kind: @swift_control_transfer_statement_kind_type ref +); + swift_control_transfer_statement_result( unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, unique int result: @swift_expression ref @@ -528,9 +621,9 @@ swift_control_transfer_statement_def( unique int id: @swift_control_transfer_statement ); -swift_deinit_declaration_child( +swift_deinit_declaration_modifiers( unique int swift_deinit_declaration: @swift_deinit_declaration ref, - unique int child: @swift_modifiers ref + unique int modifiers: @swift_modifiers ref ); swift_deinit_declaration_def( @@ -575,13 +668,19 @@ swift_dictionary_type_def( int value: @swift_type__ ref ); -@swift_didset_clause_child_type = @swift_modifiers | @swift_statements | @swift_token_simple_identifier +swift_didset_clause_body( + unique int swift_didset_clause: @swift_didset_clause ref, + unique int body: @swift_statements ref +); -#keyset[swift_didset_clause, index] -swift_didset_clause_child( - int swift_didset_clause: @swift_didset_clause ref, - int index: int ref, - unique int child: @swift_didset_clause_child_type ref +swift_didset_clause_modifiers( + unique int swift_didset_clause: @swift_didset_clause ref, + unique int modifiers: @swift_modifiers ref +); + +swift_didset_clause_parameter( + unique int swift_didset_clause: @swift_didset_clause ref, + unique int parameter: @swift_token_simple_identifier ref ); swift_didset_clause_def( @@ -603,7 +702,7 @@ swift_directive_def( swift_directly_assignable_expression_def( unique int id: @swift_directly_assignable_expression, - int child: @swift_expression ref + int expr: @swift_expression ref ); case @swift_disjunction_expression.op of @@ -618,13 +717,16 @@ swift_disjunction_expression_def( int rhs: @swift_expression ref ); -@swift_do_statement_child_type = @swift_catch_block | @swift_statements +swift_do_statement_body( + unique int swift_do_statement: @swift_do_statement ref, + unique int body: @swift_statements ref +); #keyset[swift_do_statement, index] -swift_do_statement_child( +swift_do_statement_catch( int swift_do_statement: @swift_do_statement ref, int index: int ref, - unique int child: @swift_do_statement_child_type ref + unique int catch: @swift_catch_block ref ); swift_do_statement_def( @@ -651,6 +753,11 @@ swift_enum_entry_data_contents( unique int data_contents: @swift_enum_type_parameters ref ); +swift_enum_entry_modifiers( + unique int swift_enum_entry: @swift_enum_entry ref, + unique int modifiers: @swift_modifiers ref +); + #keyset[swift_enum_entry, index] swift_enum_entry_name( int swift_enum_entry: @swift_enum_entry ref, @@ -665,11 +772,6 @@ swift_enum_entry_raw_value( unique int raw_value: @swift_expression ref ); -swift_enum_entry_child( - unique int swift_enum_entry: @swift_enum_entry ref, - unique int child: @swift_modifiers ref -); - swift_enum_entry_def( unique int id: @swift_enum_entry ); @@ -687,15 +789,15 @@ swift_enum_type_parameters_def( unique int id: @swift_enum_type_parameters ); -@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier - #keyset[swift_equality_constraint, index] -swift_equality_constraint_child( +swift_equality_constraint_attribute( int swift_equality_constraint: @swift_equality_constraint ref, int index: int ref, - unique int child: @swift_attribute ref + unique int attribute: @swift_attribute ref ); +@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier + swift_equality_constraint_def( unique int id: @swift_equality_constraint, int constrained_type: @swift_equality_constraint_constrained_type_type ref, @@ -719,23 +821,34 @@ swift_equality_expression_def( swift_existential_type_def( unique int id: @swift_existential_type, - int child: @swift_unannotated_type ref + int name: @swift_unannotated_type ref ); @swift_expression = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_external_macro_definition_def( unique int id: @swift_external_macro_definition, - int child: @swift_value_arguments ref + int arguments: @swift_value_arguments ref ); -@swift_for_statement_child_type = @swift_statements | @swift_token_try_operator | @swift_type_annotation | @swift_where_clause +swift_for_statement_body( + unique int swift_for_statement: @swift_for_statement ref, + unique int body: @swift_statements ref +); -#keyset[swift_for_statement, index] -swift_for_statement_child( - int swift_for_statement: @swift_for_statement ref, - int index: int ref, - unique int child: @swift_for_statement_child_type ref +swift_for_statement_try( + unique int swift_for_statement: @swift_for_statement ref, + unique int try: @swift_token_try_operator ref +); + +swift_for_statement_type( + unique int swift_for_statement: @swift_for_statement ref, + unique int type__: @swift_type_annotation ref +); + +swift_for_statement_where( + unique int swift_for_statement: @swift_for_statement ref, + unique int where: @swift_where_clause ref ); swift_for_statement_def( @@ -744,15 +857,27 @@ swift_for_statement_def( int item: @swift_pattern ref ); -swift_function_body_child( +swift_function_body_body( unique int swift_function_body: @swift_function_body ref, - unique int child: @swift_statements ref + unique int body: @swift_statements ref ); swift_function_body_def( unique int id: @swift_function_body ); +swift_function_declaration_async( + unique int swift_function_declaration: @swift_function_declaration ref, + unique int async: @swift_token_async_keyword ref +); + +#keyset[swift_function_declaration, index] +swift_function_declaration_attribute( + int swift_function_declaration: @swift_function_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + #keyset[swift_function_declaration, index] swift_function_declaration_default_value( int swift_function_declaration: @swift_function_declaration ref, @@ -760,8 +885,24 @@ swift_function_declaration_default_value( unique int default_value: @swift_expression ref ); +@swift_function_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier + +#keyset[swift_function_declaration, index] +swift_function_declaration_modifiers( + int swift_function_declaration: @swift_function_declaration ref, + int index: int ref, + unique int modifiers: @swift_function_declaration_modifiers_type ref +); + @swift_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier +#keyset[swift_function_declaration, index] +swift_function_declaration_parameter( + int swift_function_declaration: @swift_function_declaration ref, + int index: int ref, + unique int parameter: @swift_parameter ref +); + @swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_function_declaration_return_type( @@ -769,13 +910,21 @@ swift_function_declaration_return_type( unique int return_type: @swift_function_declaration_return_type_type ref ); -@swift_function_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_throws_clause | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_token_throws | @swift_type_constraints | @swift_type_parameters +@swift_function_declaration_throws_type = @swift_throws_clause | @swift_token_throws -#keyset[swift_function_declaration, index] -swift_function_declaration_child( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int child: @swift_function_declaration_child_type ref +swift_function_declaration_throws( + unique int swift_function_declaration: @swift_function_declaration ref, + unique int throws: @swift_function_declaration_throws_type ref +); + +swift_function_declaration_type_constraints( + unique int swift_function_declaration: @swift_function_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_function_declaration_type_parameters( + unique int swift_function_declaration: @swift_function_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_function_declaration_def( @@ -784,11 +933,16 @@ swift_function_declaration_def( int name: @swift_function_declaration_name_type ref ); -@swift_function_type_child_type = @swift_throws_clause | @swift_token_throws - -swift_function_type_child( +swift_function_type_async( unique int swift_function_type: @swift_function_type ref, - unique int child: @swift_function_type_child_type ref + unique int async: @swift_token_async_keyword ref +); + +@swift_function_type_throws_type = @swift_throws_clause | @swift_token_throws + +swift_function_type_throws( + unique int swift_function_type: @swift_function_type ref, + unique int throws: @swift_function_type_throws_type ref ); swift_function_type_def( @@ -797,13 +951,18 @@ swift_function_type_def( int return_type: @swift_type__ ref ); -@swift_getter_specifier_child_type = @swift_throws_clause | @swift_token_mutation_modifier | @swift_token_throws +@swift_getter_specifier_effect_type = @swift_throws_clause | @swift_token_async_keyword | @swift_token_throws #keyset[swift_getter_specifier, index] -swift_getter_specifier_child( +swift_getter_specifier_effect( int swift_getter_specifier: @swift_getter_specifier ref, int index: int ref, - unique int child: @swift_getter_specifier_child_type ref + unique int effect: @swift_getter_specifier_effect_type ref +); + +swift_getter_specifier_mutation( + unique int swift_getter_specifier: @swift_getter_specifier ref, + unique int mutation: @swift_token_mutation_modifier ref ); swift_getter_specifier_def( @@ -812,6 +971,11 @@ swift_getter_specifier_def( @swift_global_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_typealias_declaration +swift_guard_statement_body( + unique int swift_guard_statement: @swift_guard_statement ref, + unique int body: @swift_statements ref +); + #keyset[swift_guard_statement, index] swift_guard_statement_condition( int swift_guard_statement: @swift_guard_statement ref, @@ -819,35 +983,27 @@ swift_guard_statement_condition( unique int condition: @swift_if_condition ref ); -@swift_guard_statement_child_type = @swift_statements | @swift_token_else - -#keyset[swift_guard_statement, index] -swift_guard_statement_child( - int swift_guard_statement: @swift_guard_statement ref, - int index: int ref, - unique int child: @swift_guard_statement_child_type ref -); - swift_guard_statement_def( - unique int id: @swift_guard_statement + unique int id: @swift_guard_statement, + int else_keyword: @swift_token_else ref ); #keyset[swift_identifier, index] -swift_identifier_child( +swift_identifier_part( int swift_identifier: @swift_identifier ref, int index: int ref, - unique int child: @swift_token_simple_identifier ref + unique int part: @swift_token_simple_identifier ref ); swift_identifier_def( unique int id: @swift_identifier ); -@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_if_let_binding +@swift_if_condition_kind_type = @swift_availability_condition | @swift_expression | @swift_if_let_binding swift_if_condition_def( unique int id: @swift_if_condition, - int child: @swift_if_condition_child_type ref + int kind: @swift_if_condition_kind_type ref ); swift_if_let_binding_bound_identifier( @@ -855,7 +1011,17 @@ swift_if_let_binding_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_let_binding_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause +swift_if_let_binding_value( + unique int swift_if_let_binding: @swift_if_let_binding ref, + unique int value: @swift_expression ref +); + +swift_if_let_binding_where( + unique int swift_if_let_binding: @swift_if_let_binding ref, + unique int where: @swift_where_clause ref +); + +@swift_if_let_binding_child_type = @swift_pattern | @swift_token_simple_identifier | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern #keyset[swift_if_let_binding, index] swift_if_let_binding_child( @@ -868,6 +1034,13 @@ swift_if_let_binding_def( unique int id: @swift_if_let_binding ); +#keyset[swift_if_statement, index] +swift_if_statement_body( + int swift_if_statement: @swift_if_statement ref, + int index: int ref, + unique int body: @swift_statements ref +); + #keyset[swift_if_statement, index] swift_if_statement_condition( int swift_if_statement: @swift_if_statement ref, @@ -875,13 +1048,14 @@ swift_if_statement_condition( unique int condition: @swift_if_condition ref ); -@swift_if_statement_child_type = @swift_if_statement | @swift_statements | @swift_token_else +swift_if_statement_else_branch( + unique int swift_if_statement: @swift_if_statement ref, + unique int else_branch: @swift_if_statement ref +); -#keyset[swift_if_statement, index] -swift_if_statement_child( - int swift_if_statement: @swift_if_statement ref, - int index: int ref, - unique int child: @swift_if_statement_child_type ref +swift_if_statement_else_keyword( + unique int swift_if_statement: @swift_if_statement ref, + unique int else_keyword: @swift_token_else ref ); swift_if_statement_def( @@ -890,20 +1064,17 @@ swift_if_statement_def( swift_implicitly_unwrapped_type_def( unique int id: @swift_implicitly_unwrapped_type, - int child: @swift_type__ ref + int name: @swift_type__ ref ); -@swift_import_declaration_child_type = @swift_identifier | @swift_modifiers - -#keyset[swift_import_declaration, index] -swift_import_declaration_child( - int swift_import_declaration: @swift_import_declaration ref, - int index: int ref, - unique int child: @swift_import_declaration_child_type ref +swift_import_declaration_modifiers( + unique int swift_import_declaration: @swift_import_declaration ref, + unique int modifiers: @swift_modifiers ref ); swift_import_declaration_def( - unique int id: @swift_import_declaration + unique int id: @swift_import_declaration, + int name: @swift_identifier ref ); swift_infix_expression_def( @@ -913,17 +1084,17 @@ swift_infix_expression_def( int rhs: @swift_expression ref ); +#keyset[swift_inheritance_constraint, index] +swift_inheritance_constraint_attribute( + int swift_inheritance_constraint: @swift_inheritance_constraint ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + @swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier @swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_inheritance_constraint, index] -swift_inheritance_constraint_child( - int swift_inheritance_constraint: @swift_inheritance_constraint ref, - int index: int ref, - unique int child: @swift_attribute ref -); - swift_inheritance_constraint_def( unique int id: @swift_inheritance_constraint, int constrained_type: @swift_inheritance_constraint_constrained_type_type ref, @@ -937,6 +1108,23 @@ swift_inheritance_specifier_def( int inherits_from: @swift_inheritance_specifier_inherits_from_type ref ); +swift_init_declaration_async( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int async: @swift_token_async_keyword ref +); + +#keyset[swift_init_declaration, index] +swift_init_declaration_attribute( + int swift_init_declaration: @swift_init_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + +swift_init_declaration_bang( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int bang: @swift_token_bang ref +); + swift_init_declaration_body( unique int swift_init_declaration: @swift_init_declaration ref, unique int body: @swift_function_body ref @@ -949,18 +1137,38 @@ swift_init_declaration_default_value( unique int default_value: @swift_expression ref ); +swift_init_declaration_modifiers( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int modifiers: @swift_modifiers ref +); + case @swift_init_declaration.name of 0 = @swift_init_declaration_init ; -@swift_init_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_throws_clause | @swift_token_bang | @swift_token_throws | @swift_type_constraints | @swift_type_parameters - #keyset[swift_init_declaration, index] -swift_init_declaration_child( +swift_init_declaration_parameter( int swift_init_declaration: @swift_init_declaration ref, int index: int ref, - unique int child: @swift_init_declaration_child_type ref + unique int parameter: @swift_parameter ref +); + +@swift_init_declaration_throws_type = @swift_throws_clause | @swift_token_throws + +swift_init_declaration_throws( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int throws: @swift_init_declaration_throws_type ref +); + +swift_init_declaration_type_constraints( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_init_declaration_type_parameters( + unique int swift_init_declaration: @swift_init_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_init_declaration_def( @@ -980,16 +1188,16 @@ swift_interpolated_expression_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); +swift_interpolated_expression_type_modifiers( + unique int swift_interpolated_expression: @swift_interpolated_expression ref, + unique int type_modifiers: @swift_type_modifiers ref +); + swift_interpolated_expression_value( unique int swift_interpolated_expression: @swift_interpolated_expression ref, unique int value: @swift_expression ref ); -swift_interpolated_expression_child( - unique int swift_interpolated_expression: @swift_interpolated_expression ref, - unique int child: @swift_type_modifiers ref -); - swift_interpolated_expression_def( unique int id: @swift_interpolated_expression ); @@ -1009,7 +1217,17 @@ swift_key_path_expression_def( swift_key_path_string_expression_def( unique int id: @swift_key_path_string_expression, - int child: @swift_expression ref + int expr: @swift_expression ref +); + +swift_lambda_function_type_async( + unique int swift_lambda_function_type: @swift_lambda_function_type ref, + unique int async: @swift_token_async_keyword ref +); + +swift_lambda_function_type_params( + unique int swift_lambda_function_type: @swift_lambda_function_type ref, + unique int params: @swift_lambda_function_type_parameters ref ); @swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -1019,13 +1237,11 @@ swift_lambda_function_type_return_type( unique int return_type: @swift_lambda_function_type_return_type_type ref ); -@swift_lambda_function_type_child_type = @swift_lambda_function_type_parameters | @swift_throws_clause | @swift_token_throws +@swift_lambda_function_type_throws_type = @swift_throws_clause | @swift_token_throws -#keyset[swift_lambda_function_type, index] -swift_lambda_function_type_child( - int swift_lambda_function_type: @swift_lambda_function_type ref, - int index: int ref, - unique int child: @swift_lambda_function_type_child_type ref +swift_lambda_function_type_throws( + unique int swift_lambda_function_type: @swift_lambda_function_type ref, + unique int throws: @swift_lambda_function_type_throws_type ref ); swift_lambda_function_type_def( @@ -1033,16 +1249,28 @@ swift_lambda_function_type_def( ); #keyset[swift_lambda_function_type_parameters, index] -swift_lambda_function_type_parameters_child( +swift_lambda_function_type_parameters_parameter( int swift_lambda_function_type_parameters: @swift_lambda_function_type_parameters ref, int index: int ref, - unique int child: @swift_lambda_parameter ref + unique int parameter: @swift_lambda_parameter ref ); swift_lambda_function_type_parameters_def( unique int id: @swift_lambda_function_type_parameters ); +#keyset[swift_lambda_literal, index] +swift_lambda_literal_attribute( + int swift_lambda_literal: @swift_lambda_literal ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + +swift_lambda_literal_body( + unique int swift_lambda_literal: @swift_lambda_literal ref, + unique int body: @swift_statements ref +); + swift_lambda_literal_captures( unique int swift_lambda_literal: @swift_lambda_literal ref, unique int captures: @swift_capture_list ref @@ -1053,15 +1281,6 @@ swift_lambda_literal_type( unique int type__: @swift_lambda_function_type ref ); -@swift_lambda_literal_child_type = @swift_attribute | @swift_statements - -#keyset[swift_lambda_literal, index] -swift_lambda_literal_child( - int swift_lambda_literal: @swift_lambda_literal ref, - int index: int ref, - unique int child: @swift_lambda_literal_child_type ref -); - swift_lambda_literal_def( unique int id: @swift_lambda_literal ); @@ -1071,11 +1290,13 @@ swift_lambda_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -swift_lambda_parameter_name( +swift_lambda_parameter_modifiers( unique int swift_lambda_parameter: @swift_lambda_parameter ref, - unique int name: @swift_token_simple_identifier ref + unique int modifiers: @swift_parameter_modifiers ref ); +@swift_lambda_parameter_name_type = @swift_token_self_expression | @swift_token_simple_identifier + @swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_lambda_parameter_type( @@ -1083,15 +1304,9 @@ swift_lambda_parameter_type( unique int type__: @swift_lambda_parameter_type_type ref ); -@swift_lambda_parameter_child_type = @swift_parameter_modifiers | @swift_token_self_expression - -swift_lambda_parameter_child( - unique int swift_lambda_parameter: @swift_lambda_parameter ref, - unique int child: @swift_lambda_parameter_child_type ref -); - swift_lambda_parameter_def( - unique int id: @swift_lambda_parameter + unique int id: @swift_lambda_parameter, + int name: @swift_lambda_parameter_name_type ref ); #keyset[swift_line_string_literal, index] @@ -1116,6 +1331,13 @@ swift_line_string_literal_def( @swift_local_declaration = @swift_class_declaration | @swift_function_declaration | @swift_property_declaration | @swift_typealias_declaration +#keyset[swift_macro_declaration, index] +swift_macro_declaration_attribute( + int swift_macro_declaration: @swift_macro_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + #keyset[swift_macro_declaration, index] swift_macro_declaration_default_value( int swift_macro_declaration: @swift_macro_declaration ref, @@ -1128,7 +1350,14 @@ swift_macro_declaration_definition( unique int definition: @swift_macro_definition ref ); -@swift_macro_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_token_simple_identifier | @swift_type_constraints | @swift_type_parameters | @swift_unannotated_type +#keyset[swift_macro_declaration, index] +swift_macro_declaration_parameter( + int swift_macro_declaration: @swift_macro_declaration ref, + int index: int ref, + unique int parameter: @swift_parameter ref +); + +@swift_macro_declaration_child_type = @swift_modifiers | @swift_token_simple_identifier | @swift_type_constraints | @swift_type_parameters | @swift_unannotated_type #keyset[swift_macro_declaration, index] swift_macro_declaration_child( @@ -1148,40 +1377,38 @@ swift_macro_definition_def( int body: @swift_macro_definition_body_type ref ); -@swift_macro_invocation_child_type = @swift_call_suffix | @swift_token_simple_identifier | @swift_type_parameters - -#keyset[swift_macro_invocation, index] -swift_macro_invocation_child( - int swift_macro_invocation: @swift_macro_invocation ref, - int index: int ref, - unique int child: @swift_macro_invocation_child_type ref +swift_macro_invocation_type_parameters( + unique int swift_macro_invocation: @swift_macro_invocation ref, + unique int type_parameters: @swift_type_parameters ref ); swift_macro_invocation_def( - unique int id: @swift_macro_invocation + unique int id: @swift_macro_invocation, + int name: @swift_token_simple_identifier ref, + int suffix: @swift_call_suffix ref ); swift_metatype_def( unique int id: @swift_metatype, - int child: @swift_unannotated_type ref + int name: @swift_unannotated_type ref ); -@swift_modifiers_child_type = @swift_attribute | @swift_token_function_modifier | @swift_token_inheritance_modifier | @swift_token_member_modifier | @swift_token_mutation_modifier | @swift_token_ownership_modifier | @swift_token_parameter_modifier | @swift_token_property_behavior_modifier | @swift_token_property_modifier | @swift_token_visibility_modifier +@swift_modifiers_modifier_type = @swift_attribute | @swift_token_function_modifier | @swift_token_inheritance_modifier | @swift_token_member_modifier | @swift_token_mutation_modifier | @swift_token_ownership_modifier | @swift_token_parameter_modifier | @swift_token_property_behavior_modifier | @swift_token_property_modifier | @swift_token_visibility_modifier #keyset[swift_modifiers, index] -swift_modifiers_child( +swift_modifiers_modifier( int swift_modifiers: @swift_modifiers ref, int index: int ref, - unique int child: @swift_modifiers_child_type ref + unique int modifier: @swift_modifiers_modifier_type ref ); swift_modifiers_def( unique int id: @swift_modifiers ); -swift_modify_specifier_child( +swift_modify_specifier_mutation( unique int swift_modify_specifier: @swift_modify_specifier ref, - unique int child: @swift_token_mutation_modifier ref + unique int mutation: @swift_token_mutation_modifier ref ); swift_modify_specifier_def( @@ -1243,17 +1470,16 @@ swift_navigation_suffix_def( int suffix: @swift_navigation_suffix_suffix_type ref ); -@swift_nested_type_identifier_child_type = @swift_token_simple_identifier | @swift_unannotated_type - #keyset[swift_nested_type_identifier, index] -swift_nested_type_identifier_child( +swift_nested_type_identifier_member( int swift_nested_type_identifier: @swift_nested_type_identifier ref, int index: int ref, - unique int child: @swift_nested_type_identifier_child_type ref + unique int member: @swift_token_simple_identifier ref ); swift_nested_type_identifier_def( - unique int id: @swift_nested_type_identifier + unique int id: @swift_nested_type_identifier, + int base: @swift_unannotated_type ref ); swift_nil_coalescing_expression_def( @@ -1264,7 +1490,7 @@ swift_nil_coalescing_expression_def( swift_opaque_type_def( unique int id: @swift_opaque_type, - int child: @swift_unannotated_type ref + int name: @swift_unannotated_type ref ); swift_open_end_range_expression_def( @@ -1277,22 +1503,32 @@ swift_open_start_range_expression_def( int end: @swift_expression ref ); -@swift_operator_declaration_child_type = @swift_deprecated_operator_declaration_body | @swift_referenceable_operator | @swift_token_simple_identifier +swift_operator_declaration_body( + unique int swift_operator_declaration: @swift_operator_declaration ref, + unique int body: @swift_deprecated_operator_declaration_body ref +); -#keyset[swift_operator_declaration, index] -swift_operator_declaration_child( - int swift_operator_declaration: @swift_operator_declaration ref, - int index: int ref, - unique int child: @swift_operator_declaration_child_type ref +case @swift_operator_declaration.kind of + 0 = @swift_operator_declaration_infix +| 1 = @swift_operator_declaration_postfix +| 2 = @swift_operator_declaration_prefix +; + + +swift_operator_declaration_precedence_group( + unique int swift_operator_declaration: @swift_operator_declaration ref, + unique int precedence_group: @swift_token_simple_identifier ref ); swift_operator_declaration_def( - unique int id: @swift_operator_declaration + unique int id: @swift_operator_declaration, + int kind: int ref, + int name: @swift_referenceable_operator ref ); swift_optional_chain_marker_def( unique int id: @swift_optional_chain_marker, - int child: @swift_expression ref + int expr: @swift_expression ref ); @swift_optional_type_wrapped_type = @swift_array_type | @swift_dictionary_type | @swift_tuple_type | @swift_user_type @@ -1307,13 +1543,13 @@ swift_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_parameter_child( +swift_parameter_modifiers( unique int swift_parameter: @swift_parameter ref, - unique int child: @swift_parameter_modifiers ref + unique int modifiers: @swift_parameter_modifiers ref ); +@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ + swift_parameter_def( unique int id: @swift_parameter, int name: @swift_token_simple_identifier ref, @@ -1321,10 +1557,10 @@ swift_parameter_def( ); #keyset[swift_parameter_modifiers, index] -swift_parameter_modifiers_child( +swift_parameter_modifiers_modifier( int swift_parameter_modifiers: @swift_parameter_modifiers ref, int index: int ref, - unique int child: @swift_token_parameter_modifier ref + unique int modifier: @swift_token_parameter_modifier ref ); swift_parameter_modifiers_def( @@ -1350,10 +1586,17 @@ swift_pattern_def( ); #keyset[swift_playground_literal, index] -swift_playground_literal_child( +swift_playground_literal_name( int swift_playground_literal: @swift_playground_literal ref, int index: int ref, - unique int child: @swift_expression ref + unique int name: @swift_token_simple_identifier ref +); + +#keyset[swift_playground_literal, index] +swift_playground_literal_value( + int swift_playground_literal: @swift_playground_literal ref, + int index: int ref, + unique int value: @swift_expression ref ); swift_playground_literal_def( @@ -1368,41 +1611,33 @@ swift_postfix_expression_def( int target: @swift_expression ref ); -@swift_precedence_group_attribute_child_type = @swift_token_boolean_literal | @swift_token_simple_identifier - -#keyset[swift_precedence_group_attribute, index] -swift_precedence_group_attribute_child( - int swift_precedence_group_attribute: @swift_precedence_group_attribute ref, - int index: int ref, - unique int child: @swift_precedence_group_attribute_child_type ref -); +@swift_precedence_group_attribute_value_type = @swift_token_boolean_literal | @swift_token_simple_identifier swift_precedence_group_attribute_def( - unique int id: @swift_precedence_group_attribute + unique int id: @swift_precedence_group_attribute, + int name: @swift_token_simple_identifier ref, + int value: @swift_precedence_group_attribute_value_type ref ); #keyset[swift_precedence_group_attributes, index] -swift_precedence_group_attributes_child( +swift_precedence_group_attributes_attribute( int swift_precedence_group_attributes: @swift_precedence_group_attributes ref, int index: int ref, - unique int child: @swift_precedence_group_attribute ref + unique int attribute: @swift_precedence_group_attribute ref ); swift_precedence_group_attributes_def( unique int id: @swift_precedence_group_attributes ); -@swift_precedence_group_declaration_child_type = @swift_precedence_group_attributes | @swift_token_simple_identifier - -#keyset[swift_precedence_group_declaration, index] -swift_precedence_group_declaration_child( - int swift_precedence_group_declaration: @swift_precedence_group_declaration ref, - int index: int ref, - unique int child: @swift_precedence_group_declaration_child_type ref +swift_precedence_group_declaration_attributes( + unique int swift_precedence_group_declaration: @swift_precedence_group_declaration ref, + unique int attributes: @swift_precedence_group_attributes ref ); swift_precedence_group_declaration_def( - unique int id: @swift_precedence_group_declaration + unique int id: @swift_precedence_group_declaration, + int name: @swift_token_simple_identifier ref ); @swift_prefix_expression_operation_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator @@ -1420,6 +1655,15 @@ swift_property_declaration_computed_value( unique int computed_value: @swift_computed_property ref ); +@swift_property_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier + +#keyset[swift_property_declaration, index] +swift_property_declaration_modifiers( + int swift_property_declaration: @swift_property_declaration ref, + int index: int ref, + unique int modifiers: @swift_property_declaration_modifiers_type ref +); + #keyset[swift_property_declaration, index] swift_property_declaration_name( int swift_property_declaration: @swift_property_declaration ref, @@ -1434,7 +1678,7 @@ swift_property_declaration_value( unique int value: @swift_expression ref ); -@swift_property_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_annotation | @swift_type_constraints | @swift_value_binding_pattern | @swift_willset_didset_block +@swift_property_declaration_child_type = @swift_type_annotation | @swift_type_constraints | @swift_value_binding_pattern | @swift_willset_didset_block #keyset[swift_property_declaration, index] swift_property_declaration_child( @@ -1459,28 +1703,48 @@ swift_protocol_body_def( ); #keyset[swift_protocol_composition_type, index] -swift_protocol_composition_type_child( +swift_protocol_composition_type_type( int swift_protocol_composition_type: @swift_protocol_composition_type ref, int index: int ref, - unique int child: @swift_unannotated_type ref + unique int type__: @swift_unannotated_type ref ); swift_protocol_composition_type_def( unique int id: @swift_protocol_composition_type ); +#keyset[swift_protocol_declaration, index] +swift_protocol_declaration_attribute( + int swift_protocol_declaration: @swift_protocol_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + case @swift_protocol_declaration.declaration_kind of 0 = @swift_protocol_declaration_protocol ; -@swift_protocol_declaration_child_type = @swift_attribute | @swift_inheritance_specifier | @swift_modifiers | @swift_type_constraints | @swift_type_parameters +swift_protocol_declaration_modifiers( + unique int swift_protocol_declaration: @swift_protocol_declaration ref, + unique int modifiers: @swift_modifiers ref +); + +swift_protocol_declaration_type_constraints( + unique int swift_protocol_declaration: @swift_protocol_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_protocol_declaration_type_parameters( + unique int swift_protocol_declaration: @swift_protocol_declaration ref, + unique int type_parameters: @swift_type_parameters ref +); #keyset[swift_protocol_declaration, index] swift_protocol_declaration_child( int swift_protocol_declaration: @swift_protocol_declaration ref, int index: int ref, - unique int child: @swift_protocol_declaration_child_type ref + unique int child: @swift_inheritance_specifier ref ); swift_protocol_declaration_def( @@ -1490,6 +1754,18 @@ swift_protocol_declaration_def( int name: @swift_token_type_identifier ref ); +swift_protocol_function_declaration_async( + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + unique int async: @swift_token_async_keyword ref +); + +#keyset[swift_protocol_function_declaration, index] +swift_protocol_function_declaration_attribute( + int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + swift_protocol_function_declaration_body( unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, unique int body: @swift_function_body ref @@ -1502,8 +1778,20 @@ swift_protocol_function_declaration_default_value( unique int default_value: @swift_expression ref ); +swift_protocol_function_declaration_modifiers( + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + unique int modifiers: @swift_modifiers ref +); + @swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier +#keyset[swift_protocol_function_declaration, index] +swift_protocol_function_declaration_parameter( + int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + int index: int ref, + unique int parameter: @swift_parameter ref +); + @swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_protocol_function_declaration_return_type( @@ -1511,13 +1799,21 @@ swift_protocol_function_declaration_return_type( unique int return_type: @swift_protocol_function_declaration_return_type_type ref ); -@swift_protocol_function_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_throws_clause | @swift_token_throws | @swift_type_constraints | @swift_type_parameters +@swift_protocol_function_declaration_throws_type = @swift_throws_clause | @swift_token_throws -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_child( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int child: @swift_protocol_function_declaration_child_type ref +swift_protocol_function_declaration_throws( + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + unique int throws: @swift_protocol_function_declaration_throws_type ref +); + +swift_protocol_function_declaration_type_constraints( + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_protocol_function_declaration_type_parameters( + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_protocol_function_declaration_def( @@ -1527,27 +1823,34 @@ swift_protocol_function_declaration_def( @swift_protocol_member_declaration = @swift_associatedtype_declaration | @swift_deinit_declaration | @swift_init_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_subscript_declaration | @swift_typealias_declaration -@swift_protocol_property_declaration_child_type = @swift_modifiers | @swift_protocol_property_requirements | @swift_type_annotation | @swift_type_constraints +swift_protocol_property_declaration_modifiers( + unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, + unique int modifiers: @swift_modifiers ref +); -#keyset[swift_protocol_property_declaration, index] -swift_protocol_property_declaration_child( - int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, - int index: int ref, - unique int child: @swift_protocol_property_declaration_child_type ref +swift_protocol_property_declaration_type( + unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, + unique int type__: @swift_type_annotation ref +); + +swift_protocol_property_declaration_type_constraints( + unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, + unique int type_constraints: @swift_type_constraints ref ); swift_protocol_property_declaration_def( unique int id: @swift_protocol_property_declaration, - int name: @swift_pattern ref + int name: @swift_pattern ref, + int requirements: @swift_protocol_property_requirements ref ); -@swift_protocol_property_requirements_child_type = @swift_getter_specifier | @swift_setter_specifier +@swift_protocol_property_requirements_accessor_type = @swift_getter_specifier | @swift_setter_specifier #keyset[swift_protocol_property_requirements, index] -swift_protocol_property_requirements_child( +swift_protocol_property_requirements_accessor( int swift_protocol_property_requirements: @swift_protocol_property_requirements ref, int index: int ref, - unique int child: @swift_protocol_property_requirements_child_type ref + unique int accessor: @swift_protocol_property_requirements_accessor_type ref ); swift_protocol_property_requirements_def( @@ -1576,7 +1879,14 @@ swift_raw_str_interpolation_interpolation( swift_raw_str_interpolation_def( unique int id: @swift_raw_str_interpolation, - int child: @swift_token_raw_str_interpolation_start ref + int start: @swift_token_raw_str_interpolation_start ref +); + +#keyset[swift_raw_string_literal, index] +swift_raw_string_literal_continuing( + int swift_raw_string_literal: @swift_raw_string_literal ref, + int index: int ref, + unique int continuing: @swift_token_raw_str_continuing_indicator ref ); #keyset[swift_raw_string_literal, index] @@ -1595,26 +1905,20 @@ swift_raw_string_literal_text( unique int text: @swift_raw_string_literal_text_type ref ); -#keyset[swift_raw_string_literal, index] -swift_raw_string_literal_child( - int swift_raw_string_literal: @swift_raw_string_literal ref, - int index: int ref, - unique int child: @swift_token_raw_str_continuing_indicator ref -); - swift_raw_string_literal_def( unique int id: @swift_raw_string_literal ); -@swift_referenceable_operator_child_type = @swift_token_bang | @swift_token_custom_operator - -swift_referenceable_operator_child( - unique int swift_referenceable_operator: @swift_referenceable_operator ref, - unique int child: @swift_referenceable_operator_child_type ref -); +@swift_referenceable_operator_operator_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator swift_referenceable_operator_def( - unique int id: @swift_referenceable_operator + unique int id: @swift_referenceable_operator, + int operator: @swift_referenceable_operator_operator_type ref +); + +swift_repeat_while_statement_body( + unique int swift_repeat_while_statement: @swift_repeat_while_statement ref, + unique int body: @swift_statements ref ); #keyset[swift_repeat_while_statement, index] @@ -1624,23 +1928,18 @@ swift_repeat_while_statement_condition( unique int condition: @swift_if_condition ref ); -swift_repeat_while_statement_child( - unique int swift_repeat_while_statement: @swift_repeat_while_statement ref, - unique int child: @swift_statements ref -); - swift_repeat_while_statement_def( unique int id: @swift_repeat_while_statement ); swift_selector_expression_def( unique int id: @swift_selector_expression, - int child: @swift_expression ref + int expr: @swift_expression ref ); -swift_setter_specifier_child( +swift_setter_specifier_mutation( unique int swift_setter_specifier: @swift_setter_specifier ref, - unique int child: @swift_token_mutation_modifier ref + unique int mutation: @swift_token_mutation_modifier ref ); swift_setter_specifier_def( @@ -1678,6 +1977,13 @@ swift_statements_def( unique int id: @swift_statements ); +#keyset[swift_subscript_declaration, index] +swift_subscript_declaration_attribute( + int swift_subscript_declaration: @swift_subscript_declaration ref, + int index: int ref, + unique int attribute: @swift_attribute ref +); + #keyset[swift_subscript_declaration, index] swift_subscript_declaration_default_value( int swift_subscript_declaration: @swift_subscript_declaration ref, @@ -1685,6 +1991,18 @@ swift_subscript_declaration_default_value( unique int default_value: @swift_expression ref ); +swift_subscript_declaration_modifiers( + unique int swift_subscript_declaration: @swift_subscript_declaration ref, + unique int modifiers: @swift_modifiers ref +); + +#keyset[swift_subscript_declaration, index] +swift_subscript_declaration_parameter( + int swift_subscript_declaration: @swift_subscript_declaration ref, + int index: int ref, + unique int parameter: @swift_parameter ref +); + @swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_subscript_declaration_return_type( @@ -1692,17 +2010,19 @@ swift_subscript_declaration_return_type( unique int return_type: @swift_subscript_declaration_return_type_type ref ); -@swift_subscript_declaration_child_type = @swift_attribute | @swift_computed_property | @swift_modifiers | @swift_parameter | @swift_type_constraints | @swift_type_parameters +swift_subscript_declaration_type_constraints( + unique int swift_subscript_declaration: @swift_subscript_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_child( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int child: @swift_subscript_declaration_child_type ref +swift_subscript_declaration_type_parameters( + unique int swift_subscript_declaration: @swift_subscript_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_subscript_declaration_def( - unique int id: @swift_subscript_declaration + unique int id: @swift_subscript_declaration, + int body: @swift_computed_property ref ); swift_suppressed_constraint_def( @@ -1729,10 +2049,10 @@ swift_switch_pattern_def( ); #keyset[swift_switch_statement, index] -swift_switch_statement_child( +swift_switch_statement_entry( int swift_switch_statement: @swift_switch_statement ref, int index: int ref, - unique int child: @swift_switch_entry ref + unique int entry: @swift_switch_entry ref ); swift_switch_statement_def( @@ -1755,7 +2075,7 @@ swift_throws_clause_def( swift_try_expression_def( unique int id: @swift_try_expression, int expr: @swift_expression ref, - int child: @swift_token_try_operator ref + int operator: @swift_token_try_operator ref ); #keyset[swift_tuple_expression, index] @@ -1792,6 +2112,11 @@ swift_tuple_type_def( unique int id: @swift_tuple_type ); +swift_tuple_type_item_modifiers( + unique int swift_tuple_type_item: @swift_tuple_type_item ref, + unique int modifiers: @swift_parameter_modifiers ref +); + swift_tuple_type_item_name( unique int swift_tuple_type_item: @swift_tuple_type_item ref, unique int name: @swift_token_simple_identifier ref @@ -1802,12 +2127,10 @@ swift_tuple_type_item_type( unique int type__: @swift_type__ ref ); -@swift_tuple_type_item_child_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_parameter_modifiers | @swift_token_wildcard_pattern +@swift_tuple_type_item_child_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_token_wildcard_pattern -#keyset[swift_tuple_type_item, index] swift_tuple_type_item_child( - int swift_tuple_type_item: @swift_tuple_type_item ref, - int index: int ref, + unique int swift_tuple_type_item: @swift_tuple_type_item ref, unique int child: @swift_tuple_type_item_child_type ref ); @@ -1833,43 +2156,42 @@ swift_type_annotation_def( ); #keyset[swift_type_arguments, index] -swift_type_arguments_child( +swift_type_arguments_argument( int swift_type_arguments: @swift_type_arguments ref, int index: int ref, - unique int child: @swift_type__ ref + unique int argument: @swift_type__ ref ); swift_type_arguments_def( unique int id: @swift_type_arguments ); -@swift_type_constraint_child_type = @swift_equality_constraint | @swift_inheritance_constraint +@swift_type_constraint_constraint_type = @swift_equality_constraint | @swift_inheritance_constraint swift_type_constraint_def( unique int id: @swift_type_constraint, - int child: @swift_type_constraint_child_type ref + int constraint: @swift_type_constraint_constraint_type ref ); -@swift_type_constraints_child_type = @swift_token_where_keyword | @swift_type_constraint - #keyset[swift_type_constraints, index] -swift_type_constraints_child( +swift_type_constraints_constraint( int swift_type_constraints: @swift_type_constraints ref, int index: int ref, - unique int child: @swift_type_constraints_child_type ref + unique int constraint: @swift_type_constraint ref ); swift_type_constraints_def( - unique int id: @swift_type_constraints + unique int id: @swift_type_constraints, + int keyword: @swift_token_where_keyword ref ); @swift_type_level_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_typealias_declaration #keyset[swift_type_modifiers, index] -swift_type_modifiers_child( +swift_type_modifiers_attribute( int swift_type_modifiers: @swift_type_modifiers ref, int index: int ref, - unique int child: @swift_attribute ref + unique int attribute: @swift_attribute ref ); swift_type_modifiers_def( @@ -1878,27 +2200,31 @@ swift_type_modifiers_def( swift_type_pack_expansion_def( unique int id: @swift_type_pack_expansion, - int child: @swift_unannotated_type ref + int name: @swift_unannotated_type ref ); -@swift_type_parameter_child_type = @swift_token_type_identifier | @swift_type__ | @swift_type_parameter_modifiers | @swift_type_parameter_pack +swift_type_parameter_modifiers( + unique int swift_type_parameter: @swift_type_parameter ref, + unique int modifiers: @swift_type_parameter_modifiers ref +); -#keyset[swift_type_parameter, index] -swift_type_parameter_child( - int swift_type_parameter: @swift_type_parameter ref, - int index: int ref, - unique int child: @swift_type_parameter_child_type ref +@swift_type_parameter_name_type = @swift_token_type_identifier | @swift_type_parameter_pack + +swift_type_parameter_type( + unique int swift_type_parameter: @swift_type_parameter ref, + unique int type__: @swift_type__ ref ); swift_type_parameter_def( - unique int id: @swift_type_parameter + unique int id: @swift_type_parameter, + int name: @swift_type_parameter_name_type ref ); #keyset[swift_type_parameter_modifiers, index] -swift_type_parameter_modifiers_child( +swift_type_parameter_modifiers_attribute( int swift_type_parameter_modifiers: @swift_type_parameter_modifiers ref, int index: int ref, - unique int child: @swift_attribute ref + unique int attribute: @swift_attribute ref ); swift_type_parameter_modifiers_def( @@ -1907,29 +2233,37 @@ swift_type_parameter_modifiers_def( swift_type_parameter_pack_def( unique int id: @swift_type_parameter_pack, - int child: @swift_unannotated_type ref + int name: @swift_unannotated_type ref ); -@swift_type_parameters_child_type = @swift_type_constraints | @swift_type_parameter +swift_type_parameters_constraints( + unique int swift_type_parameters: @swift_type_parameters ref, + unique int constraints: @swift_type_constraints ref +); #keyset[swift_type_parameters, index] -swift_type_parameters_child( +swift_type_parameters_parameter( int swift_type_parameters: @swift_type_parameters ref, int index: int ref, - unique int child: @swift_type_parameters_child_type ref + unique int parameter: @swift_type_parameter ref ); swift_type_parameters_def( unique int id: @swift_type_parameters ); -@swift_typealias_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_parameters +@swift_typealias_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier #keyset[swift_typealias_declaration, index] -swift_typealias_declaration_child( +swift_typealias_declaration_modifiers( int swift_typealias_declaration: @swift_typealias_declaration ref, int index: int ref, - unique int child: @swift_typealias_declaration_child_type ref + unique int modifiers: @swift_typealias_declaration_modifiers_type ref +); + +swift_typealias_declaration_type_parameters( + unique int swift_typealias_declaration: @swift_typealias_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_typealias_declaration_def( @@ -1940,13 +2274,13 @@ swift_typealias_declaration_def( @swift_unannotated_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type -@swift_user_type_child_type = @swift_token_type_identifier | @swift_type_arguments +@swift_user_type_part_type = @swift_token_type_identifier | @swift_type_arguments #keyset[swift_user_type, index] -swift_user_type_child( +swift_user_type_part( int swift_user_type: @swift_user_type ref, int index: int ref, - unique int child: @swift_user_type_child_type ref + unique int part: @swift_user_type_part_type ref ); swift_user_type_def( @@ -1965,16 +2299,16 @@ swift_value_argument_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); +swift_value_argument_type_modifiers( + unique int swift_value_argument: @swift_value_argument ref, + unique int type_modifiers: @swift_type_modifiers ref +); + swift_value_argument_value( unique int swift_value_argument: @swift_value_argument ref, unique int value: @swift_expression ref ); -swift_value_argument_child( - unique int swift_value_argument: @swift_value_argument ref, - unique int child: @swift_type_modifiers ref -); - swift_value_argument_def( unique int id: @swift_value_argument ); @@ -1985,10 +2319,10 @@ swift_value_argument_label_def( ); #keyset[swift_value_arguments, index] -swift_value_arguments_child( +swift_value_arguments_argument( int swift_value_arguments: @swift_value_arguments ref, int index: int ref, - unique int child: @swift_value_argument ref + unique int argument: @swift_value_argument ref ); swift_value_arguments_def( @@ -2008,25 +2342,23 @@ swift_value_binding_pattern_def( swift_value_pack_expansion_def( unique int id: @swift_value_pack_expansion, - int child: @swift_expression ref + int expr: @swift_expression ref ); swift_value_parameter_pack_def( unique int id: @swift_value_parameter_pack, - int child: @swift_expression ref -); - -@swift_where_clause_child_type = @swift_expression | @swift_token_where_keyword - -#keyset[swift_where_clause, index] -swift_where_clause_child( - int swift_where_clause: @swift_where_clause ref, - int index: int ref, - unique int child: @swift_where_clause_child_type ref + int expr: @swift_expression ref ); swift_where_clause_def( - unique int id: @swift_where_clause + unique int id: @swift_where_clause, + int expr: @swift_expression ref, + int keyword: @swift_token_where_keyword ref +); + +swift_while_statement_body( + unique int swift_while_statement: @swift_while_statement ref, + unique int body: @swift_statements ref ); #keyset[swift_while_statement, index] @@ -2036,35 +2368,37 @@ swift_while_statement_condition( unique int condition: @swift_if_condition ref ); -swift_while_statement_child( - unique int swift_while_statement: @swift_while_statement ref, - unique int child: @swift_statements ref -); - swift_while_statement_def( unique int id: @swift_while_statement ); -@swift_willset_clause_child_type = @swift_modifiers | @swift_statements | @swift_token_simple_identifier +swift_willset_clause_body( + unique int swift_willset_clause: @swift_willset_clause ref, + unique int body: @swift_statements ref +); -#keyset[swift_willset_clause, index] -swift_willset_clause_child( - int swift_willset_clause: @swift_willset_clause ref, - int index: int ref, - unique int child: @swift_willset_clause_child_type ref +swift_willset_clause_modifiers( + unique int swift_willset_clause: @swift_willset_clause ref, + unique int modifiers: @swift_modifiers ref +); + +swift_willset_clause_parameter( + unique int swift_willset_clause: @swift_willset_clause ref, + unique int parameter: @swift_token_simple_identifier ref ); swift_willset_clause_def( unique int id: @swift_willset_clause ); -@swift_willset_didset_block_child_type = @swift_didset_clause | @swift_willset_clause +swift_willset_didset_block_didset( + unique int swift_willset_didset_block: @swift_willset_didset_block ref, + unique int didset: @swift_didset_clause ref +); -#keyset[swift_willset_didset_block, index] -swift_willset_didset_block_child( - int swift_willset_didset_block: @swift_willset_didset_block ref, - int index: int ref, - unique int child: @swift_willset_didset_block_child_type ref +swift_willset_didset_block_willset( + unique int swift_willset_didset_block: @swift_willset_didset_block ref, + unique int willset: @swift_willset_clause ref ); swift_willset_didset_block_def( @@ -2080,50 +2414,51 @@ swift_tokeninfo( case @swift_token.kind of 0 = @swift_reserved_word | 1 = @swift_token_as_operator -| 2 = @swift_token_bang -| 3 = @swift_token_bin_literal -| 4 = @swift_token_boolean_literal -| 5 = @swift_token_catch_keyword -| 6 = @swift_token_comment -| 7 = @swift_token_custom_operator -| 8 = @swift_token_default_keyword -| 9 = @swift_token_diagnostic -| 10 = @swift_token_else -| 11 = @swift_token_fully_open_range -| 12 = @swift_token_function_modifier -| 13 = @swift_token_hex_literal -| 14 = @swift_token_inheritance_modifier -| 15 = @swift_token_integer_literal -| 16 = @swift_token_line_str_text -| 17 = @swift_token_member_modifier -| 18 = @swift_token_multi_line_str_text -| 19 = @swift_token_multiline_comment -| 20 = @swift_token_mutation_modifier -| 21 = @swift_token_oct_literal -| 22 = @swift_token_ownership_modifier -| 23 = @swift_token_parameter_modifier -| 24 = @swift_token_property_behavior_modifier -| 25 = @swift_token_property_modifier -| 26 = @swift_token_raw_str_continuing_indicator -| 27 = @swift_token_raw_str_end_part -| 28 = @swift_token_raw_str_interpolation_start -| 29 = @swift_token_raw_str_part -| 30 = @swift_token_real_literal -| 31 = @swift_token_regex_literal -| 32 = @swift_token_self_expression -| 33 = @swift_token_shebang_line -| 34 = @swift_token_simple_identifier -| 35 = @swift_token_special_literal -| 36 = @swift_token_statement_label -| 37 = @swift_token_str_escaped_char -| 38 = @swift_token_super_expression -| 39 = @swift_token_throw_keyword -| 40 = @swift_token_throws -| 41 = @swift_token_try_operator -| 42 = @swift_token_type_identifier -| 43 = @swift_token_visibility_modifier -| 44 = @swift_token_where_keyword -| 45 = @swift_token_wildcard_pattern +| 2 = @swift_token_async_keyword +| 3 = @swift_token_bang +| 4 = @swift_token_bin_literal +| 5 = @swift_token_boolean_literal +| 6 = @swift_token_catch_keyword +| 7 = @swift_token_comment +| 8 = @swift_token_custom_operator +| 9 = @swift_token_default_keyword +| 10 = @swift_token_diagnostic +| 11 = @swift_token_else +| 12 = @swift_token_fully_open_range +| 13 = @swift_token_function_modifier +| 14 = @swift_token_hex_literal +| 15 = @swift_token_inheritance_modifier +| 16 = @swift_token_integer_literal +| 17 = @swift_token_line_str_text +| 18 = @swift_token_member_modifier +| 19 = @swift_token_multi_line_str_text +| 20 = @swift_token_multiline_comment +| 21 = @swift_token_mutation_modifier +| 22 = @swift_token_oct_literal +| 23 = @swift_token_ownership_modifier +| 24 = @swift_token_parameter_modifier +| 25 = @swift_token_property_behavior_modifier +| 26 = @swift_token_property_modifier +| 27 = @swift_token_raw_str_continuing_indicator +| 28 = @swift_token_raw_str_end_part +| 29 = @swift_token_raw_str_interpolation_start +| 30 = @swift_token_raw_str_part +| 31 = @swift_token_real_literal +| 32 = @swift_token_regex_literal +| 33 = @swift_token_self_expression +| 34 = @swift_token_shebang_line +| 35 = @swift_token_simple_identifier +| 36 = @swift_token_special_literal +| 37 = @swift_token_statement_label +| 38 = @swift_token_str_escaped_char +| 39 = @swift_token_super_expression +| 40 = @swift_token_throw_keyword +| 41 = @swift_token_throws +| 42 = @swift_token_try_operator +| 43 = @swift_token_type_identifier +| 44 = @swift_token_visibility_modifier +| 45 = @swift_token_where_keyword +| 46 = @swift_token_wildcard_pattern ; From 732cc7bee00d734bd07d5cad8cadc9b56c2ba584 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:07:58 +0000 Subject: [PATCH 11/85] unified: Add fields to inheritance specifiers and calls --- unified/extractor/tree-sitter-swift/grammar.js | 6 +++--- unified/extractor/tree-sitter-swift/node-types.yml | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 9137fb94cee..89310ec2edc 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -877,8 +877,8 @@ module.exports = grammar({ ), expr_hack_at_ternary_binary_call: ($) => seq( - $.expression, - alias($.expr_hack_at_ternary_binary_call_suffix, $.call_suffix) + field("function", $.expression), + field("suffix", alias($.expr_hack_at_ternary_binary_call_suffix, $.call_suffix)) ), expr_hack_at_ternary_binary_call_suffix: ($) => prec(PRECS.call_suffix, $.value_arguments), @@ -1551,7 +1551,7 @@ module.exports = grammar({ _inheritance_specifiers: ($) => prec.left(sep1($._annotated_inheritance_specifier, choice(",", "&"))), _annotated_inheritance_specifier: ($) => - seq(repeat(field("attribute", $.attribute)), $.inheritance_specifier), + seq(repeat(field("attribute", $.attribute)), field("inherits", $.inheritance_specifier)), inheritance_specifier: ($) => prec.left( field( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 4d4faf641d1..17a3843ebbe 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -154,9 +154,8 @@ named: rhs: expression boolean_literal: call_expression: - $children*: [call_suffix, expression] - function?: expression - suffix?: call_suffix + function: expression + suffix: call_suffix call_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier @@ -180,10 +179,10 @@ named: $children*: multiline_comment member*: type_level_declaration class_declaration: - $children*: inheritance_specifier attribute*: attribute body: [class_body, enum_class_body] declaration_kind: ["actor", "class", "enum", "extension", "struct"] + inherits*: inheritance_specifier modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: [type_identifier, unannotated_type] type_constraints?: type_constraints @@ -481,10 +480,10 @@ named: protocol_composition_type: type+: unannotated_type protocol_declaration: - $children*: inheritance_specifier attribute*: attribute body: protocol_body declaration_kind: "protocol" + inherits*: inheritance_specifier modifiers?: modifiers name: type_identifier type_constraints?: type_constraints From 0499932ba0c037ca8a7b315a2163c73d3600fe2b Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:10:38 +0000 Subject: [PATCH 12/85] unified: Fix fields in await_expression This required a change in a different place, due to aliasing. --- unified/extractor/tree-sitter-swift/grammar.js | 2 +- unified/extractor/tree-sitter-swift/node-types.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 89310ec2edc..5ee1d8460aa 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1237,7 +1237,7 @@ module.exports = grammar({ // // To fix that, we simply undo the special casing by defining our own `await_expression`. choice($.expression, alias($.for_statement_await, $.await_expression)), - for_statement_await: ($) => seq($._await_operator, $.expression), + for_statement_await: ($) => seq($._await_operator, field("expr", $.expression)), while_statement: ($) => prec( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 17a3843ebbe..7877106ad52 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -144,8 +144,7 @@ named: availability_condition: $children*: [identifier, integer_literal] await_expression: - $children?: expression - expr?: expression + expr: expression bang: bin_literal: bitwise_operation: From 15d84b3e532473978cf4a24e7bd3d9615096a1a5 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:15:36 +0000 Subject: [PATCH 13/85] unified: More $children fixes Some nodes with a single child (arguably redundant to do, but I think it's nice to have the types be consistent), and also an instance of ensuring that all branches of a `choice` expose consistent field names. --- unified/extractor/tree-sitter-swift/grammar.js | 8 ++++---- unified/extractor/tree-sitter-swift/node-types.yml | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 5ee1d8460aa..7413ab5a3b2 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -452,7 +452,7 @@ module.exports = grammar({ optional(sep1Opt(field("element", $.tuple_type_item), ",")), ")" ), - alias($._parenthesized_type, $.tuple_type_item) + field("element", alias($._parenthesized_type, $.tuple_type_item)) ), tuple_type_item: ($) => prec( @@ -791,13 +791,13 @@ module.exports = grammar({ ), value_argument_label: ($) => prec.left( - choice( + field("name", choice( $.simple_identifier, // We don't rely on $._contextual_simple_identifier here because // these don't usually fall into that category. alias("if", $.simple_identifier), alias("switch", $.simple_identifier) - ) + )) ), value_argument: ($) => prec.left( @@ -1094,7 +1094,7 @@ module.exports = grammar({ $.statements, optional("fallthrough") ), - switch_pattern: ($) => alias($._binding_pattern_with_expr, $.pattern), + switch_pattern: ($) => field("pattern", alias($._binding_pattern_with_expr, $.pattern)), do_statement: ($) => prec.right(PRECS["do"], seq("do", $._block, repeat(field("catch", $.catch_block)))), catch_block: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 7877106ad52..276bcef03ea 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -559,7 +559,7 @@ named: switch_entry: $children+: [default_keyword, expression, modifiers, statements, switch_pattern, where_keyword] switch_pattern: - $children: pattern + pattern: pattern switch_statement: entry*: switch_entry expr: expression @@ -579,7 +579,6 @@ named: name*: simple_identifier value+: expression tuple_type: - $children?: tuple_type_item element*: tuple_type_item tuple_type_item: $children?: [dictionary_type, existential_type, opaque_type, wildcard_pattern] @@ -627,7 +626,7 @@ named: type_modifiers?: type_modifiers value?: expression value_argument_label: - $children: simple_identifier + name: simple_identifier value_arguments: argument*: value_argument value_binding_pattern: From bc96ae6e475671cbeb9c8ce159cc568f55d9008e Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:29:23 +0000 Subject: [PATCH 14/85] unified: Add `lambda` and `arguments` fields --- unified/extractor/tree-sitter-swift/grammar.js | 12 ++++++------ unified/extractor/tree-sitter-swift/node-types.yml | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 7413ab5a3b2..1518df0e3dd 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -760,19 +760,19 @@ module.exports = grammar({ prec( PRECS.call_suffix, choice( - $.value_arguments, + field("arguments", $.value_arguments), prec.dynamic(-1, $._fn_call_lambda_arguments), // Prefer to treat `foo() { }` as one call not two - seq($.value_arguments, $._fn_call_lambda_arguments) + seq(field("arguments", $.value_arguments), $._fn_call_lambda_arguments) ) ), constructor_suffix: ($) => prec( PRECS.call_suffix, choice( - alias($._constructor_value_arguments, $.value_arguments), + field("arguments", alias($._constructor_value_arguments, $.value_arguments)), prec.dynamic(-1, $._fn_call_lambda_arguments), // As above seq( - alias($._constructor_value_arguments, $.value_arguments), + field("arguments", alias($._constructor_value_arguments, $.value_arguments)), $._fn_call_lambda_arguments ) ) @@ -780,7 +780,7 @@ module.exports = grammar({ _constructor_value_arguments: ($) => seq("(", optional(sep1Opt(field("argument", $.value_argument), ",")), ")"), _fn_call_lambda_arguments: ($) => - sep1($.lambda_literal, seq(field("name", $.simple_identifier), ":")), + sep1(field("lambda", $.lambda_literal), seq(field("name", $.simple_identifier), ":")), type_arguments: ($) => prec.left(seq("<", sep1Opt(field("argument", $.type), ","), ">")), value_arguments: ($) => seq( @@ -881,7 +881,7 @@ module.exports = grammar({ field("suffix", alias($.expr_hack_at_ternary_binary_call_suffix, $.call_suffix)) ), expr_hack_at_ternary_binary_call_suffix: ($) => - prec(PRECS.call_suffix, $.value_arguments), + prec(PRECS.call_suffix, field("arguments", $.value_arguments)), call_expression: ($) => prec( PRECS.call, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 276bcef03ea..b3ac84362bf 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -156,7 +156,8 @@ named: function: expression suffix: call_suffix call_suffix: - $children+: [lambda_literal, value_arguments] + arguments?: value_arguments + lambda*: lambda_literal name*: simple_identifier capture_list: item+: capture_list_item @@ -215,7 +216,8 @@ named: constructed_type: [array_type, dictionary_type, user_type] suffix: constructor_suffix constructor_suffix: - $children+: [lambda_literal, value_arguments] + arguments?: value_arguments + lambda*: lambda_literal name*: simple_identifier control_transfer_statement: $children*: [expression, throw_keyword] From 5784ef22f68d6d310f77a5c821e988c6a4dad72d Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:40:17 +0000 Subject: [PATCH 15/85] unified: Unify more fields Not entirely happy about the mixed nature of the `kind` filed (having both tokens and the named node `throw_keyword` in there), but that's a problem for a different time. --- unified/extractor/tree-sitter-swift/grammar.js | 5 ++++- unified/extractor/tree-sitter-swift/node-types.yml | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 1518df0e3dd..4c5e175f60a 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1266,7 +1266,10 @@ module.exports = grammar({ ), control_transfer_statement: ($) => choice( - prec.right(PRECS.control_transfer, $._throw_statement), + prec.right( + PRECS.control_transfer, + seq(field("kind", $.throw_keyword), field("result", $.expression)) + ), prec.right( PRECS.control_transfer, seq( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index b3ac84362bf..ca80ea2c359 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -220,8 +220,7 @@ named: lambda*: lambda_literal name*: simple_identifier control_transfer_statement: - $children*: [expression, throw_keyword] - kind?: ["break", "continue", "return", "yield"] + kind: ["break", "continue", "return", throw_keyword, "yield"] result?: expression custom_operator: default_keyword: From e6eac3784a741e8eb47d0badf38bccdd83e56feb Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:43:13 +0000 Subject: [PATCH 16/85] unified: Consolidate fields in `if_let_binding` --- unified/extractor/tree-sitter-swift/grammar.js | 6 +++--- unified/extractor/tree-sitter-swift/node-types.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 4c5e175f60a..5d544aca76b 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1907,10 +1907,10 @@ module.exports = grammar({ _direct_or_indirect_binding: ($) => seq( choice( - $._binding_kind_and_pattern, - seq("case", $._binding_pattern_no_expr) + field("pattern", alias($._binding_kind_and_pattern, $.pattern)), + seq("case", field("pattern", alias($._binding_pattern_no_expr, $.pattern))) ), - optional($.type_annotation) + field("type", optional($.type_annotation)) ), value_binding_pattern: ($) => field("mutability", choice("var", "let")), _possibly_async_binding_pattern_kind: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index ca80ea2c359..3eecf7efaee 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -314,8 +314,8 @@ named: if_condition: kind: [availability_condition, expression, if_let_binding] if_let_binding: - $children*: [pattern, simple_identifier, type, type_annotation, user_type, value_binding_pattern, wildcard_pattern] - bound_identifier?: simple_identifier + pattern: pattern + type?: type_annotation value?: expression where?: where_clause if_statement: From 9902beddec7a888c20f269d05f8dcf0b79786035 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:47:58 +0000 Subject: [PATCH 17/85] unified: add proper fields for availability_condition --- unified/extractor/tree-sitter-swift/grammar.js | 2 +- unified/extractor/tree-sitter-swift/node-types.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 5d544aca76b..13248b67778 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1304,7 +1304,7 @@ module.exports = grammar({ ")" ), _availability_argument: ($) => - choice(seq($.identifier, sep1($.integer_literal, ".")), "*"), + choice(seq(field("platform", $.identifier), sep1(field("version", $.integer_literal), ".")), "*"), //////////////////////////////// // Declarations - https://docs.swift.org/swift-book/ReferenceManual/Declarations.html //////////////////////////////// diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 3eecf7efaee..cd9ae864e6b 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -142,7 +142,8 @@ named: platform*: simple_identifier version*: integer_literal availability_condition: - $children*: [identifier, integer_literal] + platform*: identifier + version*: integer_literal await_expression: expr: expression bang: From 6ff404a6d05c626b20c4966ad41326af950ed40f Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:49:57 +0000 Subject: [PATCH 18/85] unified: More miscellaneous field additions --- unified/extractor/tree-sitter-swift/grammar.js | 2 +- unified/extractor/tree-sitter-swift/node-types.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 13248b67778..45b037428bb 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1818,7 +1818,7 @@ module.exports = grammar({ ), // The Swift compiler no longer accepts these, but some very old code still uses it. deprecated_operator_declaration_body: ($) => - seq("{", repeat(choice($.simple_identifier, $._basic_literal)), "}"), + seq("{", repeat(field("entry", choice($.simple_identifier, $._basic_literal))), "}"), precedence_group_declaration: ($) => seq( "precedencegroup", diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index cd9ae864e6b..1a101c09563 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -229,7 +229,7 @@ named: body: function_body modifiers?: modifiers deprecated_operator_declaration_body: - $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] + entry*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, "nil", oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: dictionary_literal: key*: expression From 5e14a7574e0adcf20815d92e878319a5607f4c99 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:53:55 +0000 Subject: [PATCH 19/85] unified: make compilation_condition named and add fields --- .../extractor/tree-sitter-swift/grammar.js | 34 +++++++++---------- .../tree-sitter-swift/node-types.yml | 10 +++++- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 45b037428bb..069f29cbe68 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -2027,46 +2027,46 @@ module.exports = grammar({ prec.right( PRECS.comment, choice( - seq(alias($._directive_if, "#if"), $._compilation_condition), - seq(alias($._directive_elseif, "#elseif"), $._compilation_condition), + seq(alias($._directive_if, "#if"), field("condition", $.compilation_condition)), + seq(alias($._directive_elseif, "#elseif"), field("condition", $.compilation_condition)), seq(alias($._directive_else, "#else")), seq(alias($._directive_endif, "#endif")) ) ), - _compilation_condition: ($) => + compilation_condition: ($) => prec.right( choice( - seq("os", "(", $.simple_identifier, ")"), - seq("arch", "(", $.simple_identifier, ")"), + seq("os", "(", field("name", $.simple_identifier), ")"), + seq("arch", "(", field("name", $.simple_identifier), ")"), seq( "swift", "(", $._comparison_operator, - sep1($.integer_literal, "."), + sep1(field("version", $.integer_literal), "."), ")" ), seq( "compiler", "(", $._comparison_operator, - sep1($.integer_literal, "."), + sep1(field("version", $.integer_literal), "."), ")" ), - seq("canImport", "(", sep1($.simple_identifier, "."), ")"), - seq("targetEnvironment", "(", $.simple_identifier, ")"), - $.boolean_literal, - $.simple_identifier, - seq("(", $._compilation_condition, ")"), - seq("!", $._compilation_condition), + seq("canImport", "(", sep1(field("name", $.simple_identifier), "."), ")"), + seq("targetEnvironment", "(", field("name", $.simple_identifier), ")"), + field("value", $.boolean_literal), + field("name", $.simple_identifier), + seq("(", field("inner", $.compilation_condition), ")"), + seq("!", field("operand", $.compilation_condition)), seq( - $._compilation_condition, + field("lhs", $.compilation_condition), $._conjunction_operator, - $._compilation_condition + field("rhs", $.compilation_condition) ), seq( - $._compilation_condition, + field("lhs", $.compilation_condition), $._disjunction_operator, - $._compilation_condition + field("rhs", $.compilation_condition) ) ) ), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 1a101c09563..d49506a6761 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -193,6 +193,14 @@ named: lhs: expression op: ["<", "<=", ">", ">="] rhs: expression + compilation_condition: + inner?: compilation_condition + lhs?: compilation_condition + name*: simple_identifier + operand?: compilation_condition + rhs?: compilation_condition + value?: boolean_literal + version*: integer_literal computed_getter: attribute*: attribute body?: statements @@ -242,7 +250,7 @@ named: modifiers?: modifiers parameter?: simple_identifier directive: - $children*: [boolean_literal, integer_literal, simple_identifier] + condition?: compilation_condition directly_assignable_expression: expr: expression disjunction_expression: From e1a0e204b13b9844eacace70a35cccb0b040b1e0 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 14:55:35 +0000 Subject: [PATCH 20/85] unified: Promote enum_type_parameter to named and add fields --- .../extractor/tree-sitter-swift/grammar.js | 21 ++++++++----------- .../tree-sitter-swift/node-types.yml | 7 ++++++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 069f29cbe68..9a62f45845e 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1699,20 +1699,17 @@ module.exports = grammar({ enum_type_parameters: ($) => seq( "(", - optional( - sep1( - seq( - optional( - seq(optional($.wildcard_pattern), $.simple_identifier, ":") - ), - $.type, - optional(seq($._equal_sign, $.expression)) - ), - "," - ) - ), + optional(sep1(field("parameter", $.enum_type_parameter), ",")), ")" ), + enum_type_parameter: ($) => + seq( + optional( + seq(optional(field("external_name", $.wildcard_pattern)), field("name", $.simple_identifier), ":") + ), + field("type", $.type), + optional(seq($._equal_sign, field("default_value", $.expression))) + ), protocol_declaration: ($) => prec.right( seq( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index d49506a6761..678ab386cb2 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -268,8 +268,13 @@ named: modifiers?: modifiers name+: simple_identifier raw_value*: expression + enum_type_parameter: + default_value?: expression + external_name?: wildcard_pattern + name?: simple_identifier + type: type enum_type_parameters: - $children*: [expression, type, wildcard_pattern] + parameter*: enum_type_parameter equality_constraint: attribute*: attribute constrained_type: [identifier, nested_type_identifier] From eba9f35673465e2576020b8ce8c66ad53418785a Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:01:10 +0000 Subject: [PATCH 21/85] unified: Get rid of $children* on key_path_expression Doing this involved materialising a lot of previously anonymous nodes, and I'm not entirely sure it's the best solution, but the node types look decent enough. --- .../extractor/tree-sitter-swift/grammar.js | 32 +++++++++---------- .../tree-sitter-swift/node-types.yml | 14 ++++++-- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 9a62f45845e..93af35f6344 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -97,7 +97,7 @@ module.exports = grammar({ [$.attribute], [$._attribute_argument], // Is `foo { ... }` a constructor invocation or function invocation? - [$._simple_user_type, $.expression], + [$.simple_user_type, $.expression], // To support nested types A.B not being interpreted as `(navigation_expression ... (type_identifier)) (navigation_suffix)` [$.user_type], // How to tell the difference between Foo.bar(with:and:), and Foo.bar(with: smth, and: other)? You need GLR @@ -116,7 +116,7 @@ module.exports = grammar({ [$.referenceable_operator, $._prefix_unary_operator], // `{ [self, b, c] ...` could be a capture list or an array literal depending on what else happens. [$.capture_list_item, $.expression], - [$.capture_list_item, $.expression, $._simple_user_type], + [$.capture_list_item, $.expression, $.simple_user_type], [$._primary_expression, $.capture_list_item], // a ? b : c () could be calling c(), or it could be calling a function that's produced by the result of // `(a ? b : c)`. We have a small hack to force it to be the former of these by intentionally introducing a @@ -436,13 +436,13 @@ module.exports = grammar({ ) ), // The grammar just calls this whole thing a `type-identifier` but that's a bit confusing. - user_type: ($) => sep1(field("part", $._simple_user_type), $._dot), - _simple_user_type: ($) => + user_type: ($) => sep1(field("part", $.simple_user_type), $._dot), + simple_user_type: ($) => prec.right( PRECS.ty, seq( - alias($.simple_identifier, $.type_identifier), - optional($.type_arguments) + field("name", alias($.simple_identifier, $.type_identifier)), + field("arguments", optional($.type_arguments)) ) ), tuple_type: ($) => @@ -1110,27 +1110,27 @@ module.exports = grammar({ PRECS.keypath, seq( "\\", - optional( - choice($._simple_user_type, $.array_type, $.dictionary_type) - ), - repeat(seq(".", $._key_path_component)) + field("type", optional( + choice($.simple_user_type, $.array_type, $.dictionary_type) + )), + repeat(seq(".", field("component", $.key_path_component))) ) ), key_path_string_expression: ($) => prec.left(seq($._hash_symbol, "keyPath", "(", field("expr", $.expression), ")")), - _key_path_component: ($) => + key_path_component: ($) => prec.left( choice( - seq($.simple_identifier, repeat($._key_path_postfixes)), - repeat1($._key_path_postfixes) + seq(field("name", $.simple_identifier), repeat(field("postfix", $.key_path_postfix))), + repeat1(field("postfix", $.key_path_postfix)) ) ), - _key_path_postfixes: ($) => + key_path_postfix: ($) => choice( "?", - $.bang, + field("force_unwrap", $.bang), "self", - seq("[", optional(sep1($.value_argument, ",")), "]") + seq("[", optional(sep1(field("argument", $.value_argument), ",")), "]") ), try_operator: ($) => prec.right( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 678ab386cb2..da077b13a63 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -371,8 +371,15 @@ named: reference_specifier*: value_argument_label type_modifiers?: type_modifiers value?: expression + key_path_component: + name?: simple_identifier + postfix*: key_path_postfix key_path_expression: - $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] + component*: key_path_component + type?: [array_type, dictionary_type, simple_user_type] + key_path_postfix: + argument*: value_argument + force_unwrap?: bang key_path_string_expression: expr: expression lambda_function_type: @@ -551,6 +558,9 @@ named: mutation?: mutation_modifier shebang_line: simple_identifier: + simple_user_type: + arguments?: type_arguments + name: type_identifier source_file: shebang?: shebang_line statement*: [do_statement, expression, for_statement, global_declaration, guard_statement, repeat_while_statement, statement_label, throw_keyword, while_statement] @@ -634,7 +644,7 @@ named: type_parameters?: type_parameters value: type user_type: - part+: [type_arguments, type_identifier] + part+: simple_user_type value_argument: name?: value_argument_label reference_specifier*: value_argument_label From 6e5e650b426351f18d7ac38edf43aae449a319cd Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:03:29 +0000 Subject: [PATCH 22/85] unified: Add fields for macro_declaration --- unified/extractor/tree-sitter-swift/grammar.js | 10 +++++----- unified/extractor/tree-sitter-swift/node-types.yml | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 93af35f6344..6566c32b8b7 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1497,17 +1497,17 @@ module.exports = grammar({ macro_declaration: ($) => seq( $._macro_head, - $.simple_identifier, - optional($.type_parameters), + field("name", $.simple_identifier), + field("type_parameters", optional($.type_parameters)), $._macro_signature, optional(field("definition", $.macro_definition)), - optional($.type_constraints) + field("type_constraints", optional($.type_constraints)) ), - _macro_head: ($) => seq(optional($.modifiers), "macro"), + _macro_head: ($) => seq(field("modifiers", optional($.modifiers)), "macro"), _macro_signature: ($) => seq( $._function_value_parameters, - optional(seq($._arrow_operator, $.unannotated_type)) + optional(seq($._arrow_operator, field("return_type", $.unannotated_type))) ), macro_definition: ($) => seq( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index da077b13a63..f6718deef18 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -404,11 +404,15 @@ named: interpolation*: interpolated_expression text*: [line_str_text, str_escaped_char] macro_declaration: - $children+: [modifiers, simple_identifier, type_constraints, type_parameters, unannotated_type] attribute*: attribute default_value*: expression definition?: macro_definition + modifiers?: modifiers + name: simple_identifier parameter*: parameter + return_type?: unannotated_type + type_constraints?: type_constraints + type_parameters?: type_parameters macro_definition: body: [expression, external_macro_definition] macro_invocation: From 406a02fa49a7835336b029814baf02ef36514eb5 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:05:27 +0000 Subject: [PATCH 23/85] unified: Add fields to switch_entry Of note: this involved un-inlining where_clause. --- unified/extractor/tree-sitter-swift/grammar.js | 14 ++++++-------- unified/extractor/tree-sitter-swift/node-types.yml | 6 +++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 6566c32b8b7..1f79aedeacf 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1078,20 +1078,18 @@ module.exports = grammar({ ), switch_entry: ($) => seq( - optional($.modifiers), + field("modifiers", optional($.modifiers)), choice( seq( "case", - seq( - $.switch_pattern, - optional(seq($.where_keyword, $.expression)) - ), - repeat(seq(",", $.switch_pattern)) + field("pattern", $.switch_pattern), + field("where", optional($.where_clause)), + repeat(seq(",", field("pattern", $.switch_pattern))) ), - $.default_keyword + field("default", $.default_keyword) ), ":", - $.statements, + field("body", $.statements), optional("fallthrough") ), switch_pattern: ($) => field("pattern", alias($._binding_pattern_with_expr, $.pattern)), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index f6718deef18..defb9522670 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -586,7 +586,11 @@ named: suppressed_constraint: suppressed: type_identifier switch_entry: - $children+: [default_keyword, expression, modifiers, statements, switch_pattern, where_keyword] + body: statements + default?: default_keyword + modifiers?: modifiers + pattern*: switch_pattern + where?: where_clause switch_pattern: pattern: pattern switch_statement: From 2010844b1eb531e44fcc9c474a4c498f03bf1a17 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:14:35 +0000 Subject: [PATCH 24/85] unified: Add fields to property_declaration Not entirely sure about the `binding?` field on `pattern`, but it looks like that might actually be useful. --- unified/extractor/tree-sitter-swift/grammar.js | 10 +++++----- unified/extractor/tree-sitter-swift/node-types.yml | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 1f79aedeacf..3af1017a109 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1405,13 +1405,13 @@ module.exports = grammar({ prec.left( seq( field("name", alias($._no_expr_pattern_already_bound, $.pattern)), - optional($.type_annotation), - optional($.type_constraints), + field("type", optional($.type_annotation)), + field("type_constraints", optional($.type_constraints)), optional( choice( $._expression_with_willset_didset, $._expression_without_willset_didset, - $.willset_didset_block, + field("observers", $.willset_didset_block), field("computed_value", $.computed_property) ) ) @@ -1423,7 +1423,7 @@ module.exports = grammar({ seq( $._equal_sign, field("value", $.expression), - $.willset_didset_block + field("observers", $.willset_didset_block) ) ), _expression_without_willset_didset: ($) => @@ -1909,7 +1909,7 @@ module.exports = grammar({ ), value_binding_pattern: ($) => field("mutability", choice("var", "let")), _possibly_async_binding_pattern_kind: ($) => - seq(optional($._async_modifier), $.value_binding_pattern), + seq(optional($._async_modifier), field("binding", $.value_binding_pattern)), _binding_kind_and_pattern: ($) => seq( $._possibly_async_binding_pattern_kind, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index defb9522670..981a9fede3b 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -474,6 +474,7 @@ named: modifier+: parameter_modifier pattern: $children*: [expression, pattern, type, user_type, value_binding_pattern, wildcard_pattern] + binding?: value_binding_pattern bound_identifier?: simple_identifier playground_literal: name+: simple_identifier @@ -494,10 +495,13 @@ named: target: expression property_behavior_modifier: property_declaration: - $children*: [type_annotation, type_constraints, value_binding_pattern, willset_didset_block] + binding: value_binding_pattern computed_value*: computed_property modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name+: pattern + observers*: willset_didset_block + type*: type_annotation + type_constraints*: type_constraints value*: expression property_modifier: protocol_body: From 2eee2e50dc3829a91500eea2fd62f9e0721b2556 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:23:26 +0000 Subject: [PATCH 25/85] unified: clean up patterns Mostly by materialising a bunch of (useful) intermediate nodes. --- .../extractor/tree-sitter-swift/grammar.js | 55 ++++++++++--------- .../tree-sitter-swift/node-types.yml | 17 +++++- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 3af1017a109..0616522ab4c 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -146,7 +146,7 @@ module.exports = grammar({ [$._bodyless_function_declaration, $.property_modifier], [$.init_declaration, $.property_modifier], // Patterns, man - [$._navigable_type_expression, $._case_pattern], + [$._navigable_type_expression, $.case_pattern], [$._no_expr_pattern_already_bound, $._binding_pattern_no_expr], // On encountering a closure starting with `{ @Foo ...`, we don't yet know if that attribute applies to the closure @@ -1865,38 +1865,38 @@ module.exports = grammar({ _universally_allowed_pattern: ($) => choice( $.wildcard_pattern, - $._tuple_pattern, - $._type_casting_pattern, - $._case_pattern + $.tuple_pattern, + $.type_casting_pattern, + $.case_pattern ), _bound_identifier: ($) => field("bound_identifier", $.simple_identifier), _binding_pattern_no_expr: ($) => seq( - choice( + field("kind", choice( $._universally_allowed_pattern, - $._binding_pattern, + $.binding_pattern, $._bound_identifier - ), + )), optional($._quest) ), _no_expr_pattern_already_bound: ($) => seq( - choice($._universally_allowed_pattern, $._bound_identifier), + field("kind", choice($._universally_allowed_pattern, $._bound_identifier)), optional($._quest) ), _binding_pattern_with_expr: ($) => seq( - choice( + field("kind", choice( $._universally_allowed_pattern, - $._binding_pattern, + $.binding_pattern, $.expression - ), + )), optional($._quest) ), _non_binding_pattern_with_expr: ($) => seq( - choice($._universally_allowed_pattern, $.expression), + field("kind", choice($._universally_allowed_pattern, $.expression)), optional($._quest) ), _direct_or_indirect_binding: ($) => @@ -1916,32 +1916,33 @@ module.exports = grammar({ $._no_expr_pattern_already_bound ), wildcard_pattern: ($) => "_", - _tuple_pattern_item: ($) => + tuple_pattern_item: ($) => choice( seq( - $.simple_identifier, - seq(":", alias($._binding_pattern_with_expr, $.pattern)) + field("name", $.simple_identifier), + ":", + field("pattern", alias($._binding_pattern_with_expr, $.pattern)) ), - alias($._binding_pattern_with_expr, $.pattern) + field("pattern", alias($._binding_pattern_with_expr, $.pattern)) ), - _tuple_pattern: ($) => seq("(", sep1Opt($._tuple_pattern_item, ","), ")"), - _case_pattern: ($) => + tuple_pattern: ($) => seq("(", sep1Opt(field("item", $.tuple_pattern_item), ","), ")"), + case_pattern: ($) => seq( optional("case"), - optional($.user_type), // XXX this should just be _type but that creates ambiguity + optional(field("type", $.user_type)), // XXX this should just be _type but that creates ambiguity $._dot, - $.simple_identifier, - optional($._tuple_pattern) + field("name", $.simple_identifier), + optional(field("arguments", $.tuple_pattern)) ), - _type_casting_pattern: ($) => + type_casting_pattern: ($) => choice( - seq("is", $.type), - seq(alias($._binding_pattern_no_expr, $.pattern), $._as, $.type) + seq("is", field("type", $.type)), + seq(field("pattern", alias($._binding_pattern_no_expr, $.pattern)), $._as, field("type", $.type)) ), - _binding_pattern: ($) => + binding_pattern: ($) => seq( - seq(optional("case"), $.value_binding_pattern), - $._no_expr_pattern_already_bound + seq(optional("case"), field("binding", $.value_binding_pattern)), + field("pattern", alias($._no_expr_pattern_already_bound, $.pattern)) ), // ========== diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 981a9fede3b..223c16e43ec 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -148,6 +148,9 @@ named: expr: expression bang: bin_literal: + binding_pattern: + binding: value_binding_pattern + pattern: pattern bitwise_operation: lhs: expression op: ["&", "<<", ">>", "^", "|"] @@ -166,6 +169,10 @@ named: name: [self_expression, simple_identifier] ownership?: ownership_modifier value?: expression + case_pattern: + arguments?: tuple_pattern + name: simple_identifier + type?: user_type catch_block: body?: statements error?: pattern @@ -473,9 +480,9 @@ named: parameter_modifiers: modifier+: parameter_modifier pattern: - $children*: [expression, pattern, type, user_type, value_binding_pattern, wildcard_pattern] binding?: value_binding_pattern bound_identifier?: simple_identifier + kind: [binding_pattern, case_pattern, expression, tuple_pattern, type_casting_pattern, wildcard_pattern] playground_literal: name+: simple_identifier value+: expression @@ -615,6 +622,11 @@ named: tuple_expression: name*: simple_identifier value+: expression + tuple_pattern: + item+: tuple_pattern_item + tuple_pattern_item: + name?: simple_identifier + pattern: pattern tuple_type: element*: tuple_type_item tuple_type_item: @@ -629,6 +641,9 @@ named: type: [implicitly_unwrapped_type, type] type_arguments: argument+: type + type_casting_pattern: + pattern?: pattern + type: type type_constraint: constraint: [equality_constraint, inheritance_constraint] type_constraints: From 1ef557c972f0ce7ca13f3dd05ad524b19330465f Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:27:14 +0000 Subject: [PATCH 26/85] Python: Address Copilot's comments --- .../ControlFlow/evaluation-order/TimerUtils.qll | 7 ++++--- .../ControlFlow/evaluation-order/test_basic.py | 2 +- .../library-tests/ControlFlow/evaluation-order/timer.py | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll b/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll index 9782152b8cf..23f8f3a50a0 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/TimerUtils.qll @@ -1,9 +1,10 @@ /** * Utility library for identifying timer annotations in evaluation-order tests. * - * Identifies `expr @ t[n]` (matmul), `t(expr, n)` (call), and - * `expr @ t.dead[n]` (dead-code) patterns, extracts timestamp values, - * and provides predicates for traversing consecutive annotated CFG nodes. + * Identifies `expr @ t[n]` (matmul) and `t(expr, n)` (call) patterns, + * including `dead(n)` and `never` markers within subscripts, extracts + * timestamp values, and provides predicates for traversing consecutive + * annotated CFG nodes. */ import python diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py index 3e8ee925d91..b98ebe7b95c 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py @@ -5,7 +5,7 @@ are evaluated in the expected order (typically left to right for operands of binary operators, elements of collection literals, etc.) Every evaluated expression has a timestamp annotation, except the -timer mechanism itself (t[n], t.dead[n]). +timer mechanism itself (t[n], t[dead(n)], t[never]). """ from timer import test, never diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py index e10dde2592a..ccec5d64f7c 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/timer.py @@ -26,6 +26,7 @@ Run a test file directly to self-validate: python test_file.py """ import atexit +import os import sys _results = [] @@ -53,6 +54,10 @@ class _Check: self._dead.add(e.timestamp) elif isinstance(e, _NeverSentinel): self._never = True + else: + raise TypeError( + f"Unknown element in timer subscript: {e!r} (type {type(e).__name__})" + ) def __rmatmul__(self, value): ts = self._timer._tick() @@ -183,7 +188,7 @@ def _report(): print("---") print(f"{passed}/{total} tests passed") if passed < total: - sys.exit(1) + os._exit(1) atexit.register(_report) From eb480d1de47424e700692ccc4349b5ba7ecedab3 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:38:29 +0000 Subject: [PATCH 27/85] unified: Make parenthesized_type named I'm not entirely happy about this solution, but it seemed to be the most straightforward way of avoiding various kinds of token bleeding. --- unified/extractor/tree-sitter-swift/grammar.js | 10 +++++----- unified/extractor/tree-sitter-swift/node-types.yml | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 0616522ab4c..1bcdc4fbdf1 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -452,7 +452,7 @@ module.exports = grammar({ optional(sep1Opt(field("element", $.tuple_type_item), ",")), ")" ), - field("element", alias($._parenthesized_type, $.tuple_type_item)) + field("element", alias($.parenthesized_type, $.tuple_type_item)) ), tuple_type_item: ($) => prec( @@ -467,7 +467,7 @@ module.exports = grammar({ prec( PRECS.expr, seq( - optional($.wildcard_pattern), + optional(field("external_name", $.wildcard_pattern)), field("name", $.simple_identifier), ":" ) @@ -571,10 +571,10 @@ module.exports = grammar({ field("suffix", $.constructor_suffix) ) ), - _parenthesized_type: ($) => + parenthesized_type: ($) => seq( "(", - choice($.opaque_type, $.existential_type, $.dictionary_type), + field("type", choice($.opaque_type, $.existential_type, $.dictionary_type)), ")" ), navigation_expression: ($) => @@ -586,7 +586,7 @@ module.exports = grammar({ choice( $._navigable_type_expression, $.expression, - $._parenthesized_type + $.parenthesized_type ) ), field("suffix", $.navigation_suffix) diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 223c16e43ec..3b3b5807e47 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -445,7 +445,7 @@ named: mutation_modifier: navigation_expression: suffix: navigation_suffix - target+: ["(", ")", array_type, dictionary_type, existential_type, expression, opaque_type, user_type] + target: [array_type, dictionary_type, expression, parenthesized_type, user_type] navigation_suffix: suffix: [integer_literal, simple_identifier] nested_type_identifier: @@ -479,6 +479,8 @@ named: parameter_modifier: parameter_modifiers: modifier+: parameter_modifier + parenthesized_type: + type: [dictionary_type, existential_type, opaque_type] pattern: binding?: value_binding_pattern bound_identifier?: simple_identifier @@ -630,10 +632,10 @@ named: tuple_type: element*: tuple_type_item tuple_type_item: - $children?: [dictionary_type, existential_type, opaque_type, wildcard_pattern] + external_name?: wildcard_pattern modifiers?: parameter_modifiers name?: simple_identifier - type?: type + type: [dictionary_type, existential_type, opaque_type, type] type: modifiers?: type_modifiers name: unannotated_type From 52d72836f904996278dc745ae96984f3f299ad6b Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 15:59:18 +0000 Subject: [PATCH 28/85] unified: Fix multiline_comment issue This named node (which is in fact emitted by the scanner as an `external`) was appearing as a child of `class_body` because of inlining via `_class_member_separator`. This, in itself, appears to be somewhat of a hack, to handle cases where a multiline comment signals the end of a class member. To fix this, we make the external node _unnamed_, but keep the `extras` node _named_ (so we can still extract it from the parse tree), and we add a new rule `multiline_comment` that mediates between the two. That way, the use inside `_class_member_separator` can use the unnamed variant, and no node is pushed into $children. --- unified/extractor/tree-sitter-swift/grammar.js | 9 +++++++-- unified/extractor/tree-sitter-swift/node-types.yml | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 1bcdc4fbdf1..566b7d5567a 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -194,7 +194,7 @@ module.exports = grammar({ // `/*`, and decrement it whenever we see `*/`. A standard grammar would only be able to exit the comment at the // first `*/` (like C does). Similarly, when you start a string with `##"`, you're required to include the same // number of `#` symbols to end it. - $.multiline_comment, + $._multiline_comment, $.raw_str_part, $.raw_str_continuing_indicator, $.raw_str_end_part, @@ -270,6 +270,11 @@ module.exports = grammar({ // Lexical Structure - https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html //////////////////////////////// comment: ($) => token(prec(PRECS.comment, seq("//", /.*/))), + // Named wrapper for the unnamed `_multiline_comment` external token, so + // that multi-line comments still appear in the AST (e.g. as extras between + // top-level statements) without bleeding into class_body's $children when + // used as a class member separator. + multiline_comment: ($) => $._multiline_comment, // Identifiers simple_identifier: ($) => choice( @@ -1603,7 +1608,7 @@ module.exports = grammar({ field("base", $.unannotated_type), optional(seq(".", sep1(field("member", $.simple_identifier), "."))) ), - _class_member_separator: ($) => choice($._semi, $.multiline_comment), + _class_member_separator: ($) => choice($._semi, $._multiline_comment), _class_member_declarations: ($) => seq( sep1(field("member", $.type_level_declaration), $._class_member_separator), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 3b3b5807e47..47f56435d03 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -184,7 +184,6 @@ named: target: expression type: type class_body: - $children*: multiline_comment member*: type_level_declaration class_declaration: attribute*: attribute From bfe5aa8d42e2f7b5064928e77c9ffa0791c98c2c Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 12 May 2026 16:01:32 +0000 Subject: [PATCH 29/85] unified: Regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 505 +++++++++++++++++++------ unified/ql/lib/unified.dbscheme | 511 ++++++++++++++++---------- 2 files changed, 718 insertions(+), 298 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index bf3b98f582e..db2e73df01b 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -277,12 +277,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "AvailabilityCondition" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_availability_condition_child(this, i, result) } + /** Gets the node corresponding to the field `platform`. */ + final Identifier getPlatform(int i) { swift_availability_condition_platform(this, i, result) } + + /** Gets the node corresponding to the field `version`. */ + final IntegerLiteral getVersion(int i) { swift_availability_condition_version(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_availability_condition_child(this, _, result) + swift_availability_condition_platform(this, _, result) or + swift_availability_condition_version(this, _, result) } } @@ -292,15 +296,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "AwaitExpression" } /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_await_expression_expr(this, result) } - - /** Gets the child of this node. */ - final Expression getChild() { swift_await_expression_child(this, result) } + final Expression getExpr() { swift_await_expression_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_await_expression_expr(this, result) or swift_await_expression_child(this, result) - } + final override AstNode getAFieldOrChild() { swift_await_expression_def(this, result) } } /** A class representing `bang` tokens. */ @@ -315,6 +314,23 @@ module Swift { final override string getAPrimaryQlClass() { result = "BinLiteral" } } + /** A class representing `binding_pattern` nodes. */ + class BindingPattern extends @swift_binding_pattern, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "BindingPattern" } + + /** Gets the node corresponding to the field `binding`. */ + final ValueBindingPattern getBinding() { swift_binding_pattern_def(this, result, _) } + + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { swift_binding_pattern_def(this, _, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_binding_pattern_def(this, result, _) or swift_binding_pattern_def(this, _, result) + } + } + /** A class representing `bitwise_operation` nodes. */ class BitwiseOperation extends @swift_bitwise_operation, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -360,19 +376,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "CallExpression" } /** Gets the node corresponding to the field `function`. */ - final Expression getFunction() { swift_call_expression_function(this, result) } + final Expression getFunction() { swift_call_expression_def(this, result, _) } /** Gets the node corresponding to the field `suffix`. */ - final CallSuffix getSuffix() { swift_call_expression_suffix(this, result) } - - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_call_expression_child(this, i, result) } + final CallSuffix getSuffix() { swift_call_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_call_expression_function(this, result) or - swift_call_expression_suffix(this, result) or - swift_call_expression_child(this, _, result) + swift_call_expression_def(this, result, _) or swift_call_expression_def(this, _, result) } } @@ -381,15 +392,20 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "CallSuffix" } + /** Gets the node corresponding to the field `arguments`. */ + final ValueArguments getArguments() { swift_call_suffix_arguments(this, result) } + + /** Gets the node corresponding to the field `lambda`. */ + final LambdaLiteral getLambda(int i) { swift_call_suffix_lambda(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName(int i) { swift_call_suffix_name(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_call_suffix_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_call_suffix_name(this, _, result) or swift_call_suffix_child(this, _, result) + swift_call_suffix_arguments(this, result) or + swift_call_suffix_lambda(this, _, result) or + swift_call_suffix_name(this, _, result) } } @@ -427,6 +443,28 @@ module Swift { } } + /** A class representing `case_pattern` nodes. */ + class CasePattern extends @swift_case_pattern, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "CasePattern" } + + /** Gets the node corresponding to the field `arguments`. */ + final TuplePattern getArguments() { swift_case_pattern_arguments(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_case_pattern_def(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final UserType getType() { swift_case_pattern_type(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_case_pattern_arguments(this, result) or + swift_case_pattern_def(this, result) or + swift_case_pattern_type(this, result) + } + } + /** A class representing `catch_block` nodes. */ class CatchBlock extends @swift_catch_block, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -492,13 +530,8 @@ module Swift { /** Gets the node corresponding to the field `member`. */ final TypeLevelDeclaration getMember(int i) { swift_class_body_member(this, i, result) } - /** Gets the `i`th child of this node. */ - final MultilineComment getChild(int i) { swift_class_body_child(this, i, result) } - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_class_body_member(this, _, result) or swift_class_body_child(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_class_body_member(this, _, result) } } /** A class representing `class_declaration` nodes. */ @@ -527,6 +560,11 @@ module Swift { ) } + /** Gets the node corresponding to the field `inherits`. */ + final InheritanceSpecifier getInherits(int i) { + swift_class_declaration_inherits(this, i, result) + } + /** Gets the node corresponding to the field `modifiers`. */ final AstNode getModifiers(int i) { swift_class_declaration_modifiers(this, i, result) } @@ -543,18 +581,15 @@ module Swift { swift_class_declaration_type_parameters(this, result) } - /** Gets the `i`th child of this node. */ - final InheritanceSpecifier getChild(int i) { swift_class_declaration_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_class_declaration_attribute(this, _, result) or swift_class_declaration_def(this, result, _, _) or + swift_class_declaration_inherits(this, _, result) or swift_class_declaration_modifiers(this, _, result) or swift_class_declaration_def(this, _, _, result) or swift_class_declaration_type_constraints(this, result) or - swift_class_declaration_type_parameters(this, result) or - swift_class_declaration_child(this, _, result) + swift_class_declaration_type_parameters(this, result) } } @@ -595,6 +630,44 @@ module Swift { } } + /** A class representing `compilation_condition` nodes. */ + class CompilationCondition extends @swift_compilation_condition, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "CompilationCondition" } + + /** Gets the node corresponding to the field `inner`. */ + final CompilationCondition getInner() { swift_compilation_condition_inner(this, result) } + + /** Gets the node corresponding to the field `lhs`. */ + final CompilationCondition getLhs() { swift_compilation_condition_lhs(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName(int i) { swift_compilation_condition_name(this, i, result) } + + /** Gets the node corresponding to the field `operand`. */ + final CompilationCondition getOperand() { swift_compilation_condition_operand(this, result) } + + /** Gets the node corresponding to the field `rhs`. */ + final CompilationCondition getRhs() { swift_compilation_condition_rhs(this, result) } + + /** Gets the node corresponding to the field `value`. */ + final BooleanLiteral getValue() { swift_compilation_condition_value(this, result) } + + /** Gets the node corresponding to the field `version`. */ + final IntegerLiteral getVersion(int i) { swift_compilation_condition_version(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_compilation_condition_inner(this, result) or + swift_compilation_condition_lhs(this, result) or + swift_compilation_condition_name(this, _, result) or + swift_compilation_condition_operand(this, result) or + swift_compilation_condition_rhs(this, result) or + swift_compilation_condition_value(this, result) or + swift_compilation_condition_version(this, _, result) + } + } + /** A class representing `computed_getter` nodes. */ class ComputedGetter extends @swift_computed_getter, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -731,16 +804,20 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ConstructorSuffix" } + /** Gets the node corresponding to the field `arguments`. */ + final ValueArguments getArguments() { swift_constructor_suffix_arguments(this, result) } + + /** Gets the node corresponding to the field `lambda`. */ + final LambdaLiteral getLambda(int i) { swift_constructor_suffix_lambda(this, i, result) } + /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName(int i) { swift_constructor_suffix_name(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_constructor_suffix_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_constructor_suffix_name(this, _, result) or - swift_constructor_suffix_child(this, _, result) + swift_constructor_suffix_arguments(this, result) or + swift_constructor_suffix_lambda(this, _, result) or + swift_constructor_suffix_name(this, _, result) } } @@ -750,19 +827,15 @@ module Swift { final override string getAPrimaryQlClass() { result = "ControlTransferStatement" } /** Gets the node corresponding to the field `kind`. */ - final AstNode getKind() { swift_control_transfer_statement_kind(this, result) } + final AstNode getKind() { swift_control_transfer_statement_def(this, result) } /** Gets the node corresponding to the field `result`. */ final Expression getResult() { swift_control_transfer_statement_result(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_control_transfer_statement_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_control_transfer_statement_kind(this, result) or - swift_control_transfer_statement_result(this, result) or - swift_control_transfer_statement_child(this, _, result) + swift_control_transfer_statement_def(this, result) or + swift_control_transfer_statement_result(this, result) } } @@ -802,14 +875,14 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DeprecatedOperatorDeclarationBody" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { - swift_deprecated_operator_declaration_body_child(this, i, result) + /** Gets the node corresponding to the field `entry`. */ + final AstNode getEntry(int i) { + swift_deprecated_operator_declaration_body_entry(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_deprecated_operator_declaration_body_child(this, _, result) + swift_deprecated_operator_declaration_body_entry(this, _, result) } } @@ -881,11 +954,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Directive" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_directive_child(this, i, result) } + /** Gets the node corresponding to the field `condition`. */ + final CompilationCondition getCondition() { swift_directive_condition(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_directive_child(this, _, result) } + final override AstNode getAFieldOrChild() { swift_directive_condition(this, result) } } /** A class representing `directly_assignable_expression` nodes. */ @@ -990,16 +1063,48 @@ module Swift { } } + /** A class representing `enum_type_parameter` nodes. */ + class EnumTypeParameter extends @swift_enum_type_parameter, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "EnumTypeParameter" } + + /** Gets the node corresponding to the field `default_value`. */ + final Expression getDefaultValue() { swift_enum_type_parameter_default_value(this, result) } + + /** Gets the node corresponding to the field `external_name`. */ + final WildcardPattern getExternalName() { + swift_enum_type_parameter_external_name(this, result) + } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_enum_type_parameter_name(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final Type getType() { swift_enum_type_parameter_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_enum_type_parameter_default_value(this, result) or + swift_enum_type_parameter_external_name(this, result) or + swift_enum_type_parameter_name(this, result) or + swift_enum_type_parameter_def(this, result) + } + } + /** A class representing `enum_type_parameters` nodes. */ class EnumTypeParameters extends @swift_enum_type_parameters, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EnumTypeParameters" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_enum_type_parameters_child(this, i, result) } + /** Gets the node corresponding to the field `parameter`. */ + final EnumTypeParameter getParameter(int i) { + swift_enum_type_parameters_parameter(this, i, result) + } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_enum_type_parameters_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_enum_type_parameters_parameter(this, _, result) + } } /** A class representing `equality_constraint` nodes. */ @@ -1139,7 +1244,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionDeclaration" } /** Gets the node corresponding to the field `async`. */ - final AsyncKeyword getAsync() { swift_function_declaration_async(this, result) } + final ReservedWord getAsync() { swift_function_declaration_async(this, result) } /** Gets the node corresponding to the field `attribute`. */ final Attribute getAttribute(int i) { swift_function_declaration_attribute(this, i, result) } @@ -1205,7 +1310,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionType" } /** Gets the node corresponding to the field `async`. */ - final AsyncKeyword getAsync() { swift_function_type_async(this, result) } + final ReservedWord getAsync() { swift_function_type_async(this, result) } /** Gets the node corresponding to the field `params`. */ final UnannotatedType getParams() { swift_function_type_def(this, result, _) } @@ -1302,10 +1407,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "IfLetBinding" } - /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier() { - swift_if_let_binding_bound_identifier(this, result) - } + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { swift_if_let_binding_def(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType() { swift_if_let_binding_type(this, result) } /** Gets the node corresponding to the field `value`. */ final Expression getValue() { swift_if_let_binding_value(this, result) } @@ -1313,15 +1419,12 @@ module Swift { /** Gets the node corresponding to the field `where`. */ final WhereClause getWhere() { swift_if_let_binding_where(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_if_let_binding_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_let_binding_bound_identifier(this, result) or + swift_if_let_binding_def(this, result) or + swift_if_let_binding_type(this, result) or swift_if_let_binding_value(this, result) or - swift_if_let_binding_where(this, result) or - swift_if_let_binding_child(this, _, result) + swift_if_let_binding_where(this, result) } } @@ -1448,7 +1551,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "InitDeclaration" } /** Gets the node corresponding to the field `async`. */ - final AsyncKeyword getAsync() { swift_init_declaration_async(this, result) } + final ReservedWord getAsync() { swift_init_declaration_async(this, result) } /** Gets the node corresponding to the field `attribute`. */ final Attribute getAttribute(int i) { swift_init_declaration_attribute(this, i, result) } @@ -1539,16 +1642,60 @@ module Swift { } } + /** A class representing `key_path_component` nodes. */ + class KeyPathComponent extends @swift_key_path_component, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "KeyPathComponent" } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_key_path_component_name(this, result) } + + /** Gets the node corresponding to the field `postfix`. */ + final KeyPathPostfix getPostfix(int i) { swift_key_path_component_postfix(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_key_path_component_name(this, result) or + swift_key_path_component_postfix(this, _, result) + } + } + /** A class representing `key_path_expression` nodes. */ class KeyPathExpression extends @swift_key_path_expression, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "KeyPathExpression" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_key_path_expression_child(this, i, result) } + /** Gets the node corresponding to the field `component`. */ + final KeyPathComponent getComponent(int i) { + swift_key_path_expression_component(this, i, result) + } + + /** Gets the node corresponding to the field `type`. */ + final AstNode getType() { swift_key_path_expression_type(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_key_path_expression_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_key_path_expression_component(this, _, result) or + swift_key_path_expression_type(this, result) + } + } + + /** A class representing `key_path_postfix` nodes. */ + class KeyPathPostfix extends @swift_key_path_postfix, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "KeyPathPostfix" } + + /** Gets the node corresponding to the field `argument`. */ + final ValueArgument getArgument(int i) { swift_key_path_postfix_argument(this, i, result) } + + /** Gets the node corresponding to the field `force_unwrap`. */ + final Bang getForceUnwrap() { swift_key_path_postfix_force_unwrap(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_key_path_postfix_argument(this, _, result) or + swift_key_path_postfix_force_unwrap(this, result) + } } /** A class representing `key_path_string_expression` nodes. */ @@ -1569,7 +1716,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "LambdaFunctionType" } /** Gets the node corresponding to the field `async`. */ - final AsyncKeyword getAsync() { swift_lambda_function_type_async(this, result) } + final ReservedWord getAsync() { swift_lambda_function_type_async(this, result) } /** Gets the node corresponding to the field `params`. */ final LambdaFunctionTypeParameters getParams() { @@ -1703,19 +1850,39 @@ module Swift { /** Gets the node corresponding to the field `definition`. */ final MacroDefinition getDefinition() { swift_macro_declaration_definition(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_macro_declaration_modifiers(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_macro_declaration_def(this, result) } + /** Gets the node corresponding to the field `parameter`. */ final Parameter getParameter(int i) { swift_macro_declaration_parameter(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_macro_declaration_child(this, i, result) } + /** Gets the node corresponding to the field `return_type`. */ + final UnannotatedType getReturnType() { swift_macro_declaration_return_type(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_macro_declaration_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `type_parameters`. */ + final TypeParameters getTypeParameters() { + swift_macro_declaration_type_parameters(this, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_macro_declaration_attribute(this, _, result) or swift_macro_declaration_default_value(this, _, result) or swift_macro_declaration_definition(this, result) or + swift_macro_declaration_modifiers(this, result) or + swift_macro_declaration_def(this, result) or swift_macro_declaration_parameter(this, _, result) or - swift_macro_declaration_child(this, _, result) + swift_macro_declaration_return_type(this, result) or + swift_macro_declaration_type_constraints(this, result) or + swift_macro_declaration_type_parameters(this, result) } } @@ -1870,15 +2037,15 @@ module Swift { final override string getAPrimaryQlClass() { result = "NavigationExpression" } /** Gets the node corresponding to the field `suffix`. */ - final NavigationSuffix getSuffix() { swift_navigation_expression_def(this, result) } + final NavigationSuffix getSuffix() { swift_navigation_expression_def(this, result, _) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget(int i) { swift_navigation_expression_target(this, i, result) } + final AstNode getTarget() { swift_navigation_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_navigation_expression_def(this, result) or - swift_navigation_expression_target(this, _, result) + swift_navigation_expression_def(this, result, _) or + swift_navigation_expression_def(this, _, result) } } @@ -2089,20 +2256,37 @@ module Swift { } } + /** A class representing `parenthesized_type` nodes. */ + class ParenthesizedType extends @swift_parenthesized_type, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "ParenthesizedType" } + + /** Gets the node corresponding to the field `type`. */ + final AstNode getType() { swift_parenthesized_type_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_parenthesized_type_def(this, result) } + } + /** A class representing `pattern` nodes. */ class Pattern extends @swift_pattern, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Pattern" } + /** Gets the node corresponding to the field `binding`. */ + final ValueBindingPattern getBinding() { swift_pattern_binding(this, result) } + /** Gets the node corresponding to the field `bound_identifier`. */ final SimpleIdentifier getBoundIdentifier() { swift_pattern_bound_identifier(this, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_pattern_child(this, i, result) } + /** Gets the node corresponding to the field `kind`. */ + final AstNode getKind() { swift_pattern_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_pattern_bound_identifier(this, result) or swift_pattern_child(this, _, result) + swift_pattern_binding(this, result) or + swift_pattern_bound_identifier(this, result) or + swift_pattern_def(this, result) } } @@ -2223,6 +2407,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PropertyDeclaration" } + /** Gets the node corresponding to the field `binding`. */ + final ValueBindingPattern getBinding() { swift_property_declaration_def(this, result) } + /** Gets the node corresponding to the field `computed_value`. */ final ComputedProperty getComputedValue(int i) { swift_property_declaration_computed_value(this, i, result) @@ -2234,19 +2421,32 @@ module Swift { /** Gets the node corresponding to the field `name`. */ final Pattern getName(int i) { swift_property_declaration_name(this, i, result) } + /** Gets the node corresponding to the field `observers`. */ + final WillsetDidsetBlock getObservers(int i) { + swift_property_declaration_observers(this, i, result) + } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType(int i) { swift_property_declaration_type(this, i, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints(int i) { + swift_property_declaration_type_constraints(this, i, result) + } + /** Gets the node corresponding to the field `value`. */ final Expression getValue(int i) { swift_property_declaration_value(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_property_declaration_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_property_declaration_def(this, result) or swift_property_declaration_computed_value(this, _, result) or swift_property_declaration_modifiers(this, _, result) or swift_property_declaration_name(this, _, result) or - swift_property_declaration_value(this, _, result) or - swift_property_declaration_child(this, _, result) + swift_property_declaration_observers(this, _, result) or + swift_property_declaration_type(this, _, result) or + swift_property_declaration_type_constraints(this, _, result) or + swift_property_declaration_value(this, _, result) } } @@ -2300,6 +2500,11 @@ module Swift { ) } + /** Gets the node corresponding to the field `inherits`. */ + final InheritanceSpecifier getInherits(int i) { + swift_protocol_declaration_inherits(this, i, result) + } + /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_protocol_declaration_modifiers(this, result) } @@ -2316,18 +2521,15 @@ module Swift { swift_protocol_declaration_type_parameters(this, result) } - /** Gets the `i`th child of this node. */ - final InheritanceSpecifier getChild(int i) { swift_protocol_declaration_child(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_declaration_attribute(this, _, result) or swift_protocol_declaration_def(this, result, _, _) or + swift_protocol_declaration_inherits(this, _, result) or swift_protocol_declaration_modifiers(this, result) or swift_protocol_declaration_def(this, _, _, result) or swift_protocol_declaration_type_constraints(this, result) or - swift_protocol_declaration_type_parameters(this, result) or - swift_protocol_declaration_child(this, _, result) + swift_protocol_declaration_type_parameters(this, result) } } @@ -2337,7 +2539,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ProtocolFunctionDeclaration" } /** Gets the node corresponding to the field `async`. */ - final AsyncKeyword getAsync() { swift_protocol_function_declaration_async(this, result) } + final ReservedWord getAsync() { swift_protocol_function_declaration_async(this, result) } /** Gets the node corresponding to the field `attribute`. */ final Attribute getAttribute(int i) { @@ -2630,6 +2832,23 @@ module Swift { final override string getAPrimaryQlClass() { result = "SimpleIdentifier" } } + /** A class representing `simple_user_type` nodes. */ + class SimpleUserType extends @swift_simple_user_type, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "SimpleUserType" } + + /** Gets the node corresponding to the field `arguments`. */ + final TypeArguments getArguments() { swift_simple_user_type_arguments(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final TypeIdentifier getName() { swift_simple_user_type_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_simple_user_type_arguments(this, result) or swift_simple_user_type_def(this, result) + } + } + /** A class representing `source_file` nodes. */ class SourceFile extends @swift_source_file, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -2748,11 +2967,29 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SwitchEntry" } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_switch_entry_child(this, i, result) } + /** Gets the node corresponding to the field `body`. */ + final Statements getBody() { swift_switch_entry_def(this, result) } + + /** Gets the node corresponding to the field `default`. */ + final DefaultKeyword getDefault() { swift_switch_entry_default(this, result) } + + /** Gets the node corresponding to the field `modifiers`. */ + final Modifiers getModifiers() { swift_switch_entry_modifiers(this, result) } + + /** Gets the node corresponding to the field `pattern`. */ + final SwitchPattern getPattern(int i) { swift_switch_entry_pattern(this, i, result) } + + /** Gets the node corresponding to the field `where`. */ + final WhereClause getWhere() { swift_switch_entry_where(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_switch_entry_child(this, _, result) } + final override AstNode getAFieldOrChild() { + swift_switch_entry_def(this, result) or + swift_switch_entry_default(this, result) or + swift_switch_entry_modifiers(this, result) or + swift_switch_entry_pattern(this, _, result) or + swift_switch_entry_where(this, result) + } } /** A class representing `switch_pattern` nodes. */ @@ -2760,8 +2997,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SwitchPattern" } - /** Gets the child of this node. */ - final Pattern getChild() { swift_switch_pattern_def(this, result) } + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { swift_switch_pattern_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_switch_pattern_def(this, result) } @@ -2870,6 +3107,35 @@ module Swift { } } + /** A class representing `tuple_pattern` nodes. */ + class TuplePattern extends @swift_tuple_pattern, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "TuplePattern" } + + /** Gets the node corresponding to the field `item`. */ + final TuplePatternItem getItem(int i) { swift_tuple_pattern_item(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_tuple_pattern_item(this, _, result) } + } + + /** A class representing `tuple_pattern_item` nodes. */ + class TuplePatternItem extends @swift_tuple_pattern_item, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "TuplePatternItem" } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_tuple_pattern_item_name(this, result) } + + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { swift_tuple_pattern_item_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_tuple_pattern_item_name(this, result) or swift_tuple_pattern_item_def(this, result) + } + } + /** A class representing `tuple_type` nodes. */ class TupleType extends @swift_tuple_type, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -2878,13 +3144,8 @@ module Swift { /** Gets the node corresponding to the field `element`. */ final TupleTypeItem getElement(int i) { swift_tuple_type_element(this, i, result) } - /** Gets the child of this node. */ - final TupleTypeItem getChild() { swift_tuple_type_child(this, result) } - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_tuple_type_element(this, _, result) or swift_tuple_type_child(this, result) - } + final override AstNode getAFieldOrChild() { swift_tuple_type_element(this, _, result) } } /** A class representing `tuple_type_item` nodes. */ @@ -2892,6 +3153,9 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TupleTypeItem" } + /** Gets the node corresponding to the field `external_name`. */ + final WildcardPattern getExternalName() { swift_tuple_type_item_external_name(this, result) } + /** Gets the node corresponding to the field `modifiers`. */ final ParameterModifiers getModifiers() { swift_tuple_type_item_modifiers(this, result) } @@ -2899,17 +3163,14 @@ module Swift { final SimpleIdentifier getName() { swift_tuple_type_item_name(this, result) } /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_tuple_type_item_type(this, result) } - - /** Gets the child of this node. */ - final AstNode getChild() { swift_tuple_type_item_child(this, result) } + final AstNode getType() { swift_tuple_type_item_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_tuple_type_item_external_name(this, result) or swift_tuple_type_item_modifiers(this, result) or swift_tuple_type_item_name(this, result) or - swift_tuple_type_item_type(this, result) or - swift_tuple_type_item_child(this, result) + swift_tuple_type_item_def(this, result) } } @@ -2954,6 +3215,24 @@ module Swift { final override AstNode getAFieldOrChild() { swift_type_arguments_argument(this, _, result) } } + /** A class representing `type_casting_pattern` nodes. */ + class TypeCastingPattern extends @swift_type_casting_pattern, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "TypeCastingPattern" } + + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { swift_type_casting_pattern_pattern(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final Type getType() { swift_type_casting_pattern_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_type_casting_pattern_pattern(this, result) or + swift_type_casting_pattern_def(this, result) + } + } + /** A class representing `type_constraint` nodes. */ class TypeConstraint extends @swift_type_constraint, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -3119,7 +3398,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "UserType" } /** Gets the node corresponding to the field `part`. */ - final AstNode getPart(int i) { swift_user_type_part(this, i, result) } + final SimpleUserType getPart(int i) { swift_user_type_part(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_user_type_part(this, _, result) } @@ -3158,8 +3437,8 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ValueArgumentLabel" } - /** Gets the child of this node. */ - final SimpleIdentifier getChild() { swift_value_argument_label_def(this, result) } + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_value_argument_label_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_value_argument_label_def(this, result) } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 1dfd0395e21..0c3f023b001 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -250,31 +250,33 @@ swift_attribute_def( int name: @swift_user_type ref ); -@swift_availability_condition_child_type = @swift_identifier | @swift_token_integer_literal - #keyset[swift_availability_condition, index] -swift_availability_condition_child( +swift_availability_condition_platform( int swift_availability_condition: @swift_availability_condition ref, int index: int ref, - unique int child: @swift_availability_condition_child_type ref + unique int platform: @swift_identifier ref +); + +#keyset[swift_availability_condition, index] +swift_availability_condition_version( + int swift_availability_condition: @swift_availability_condition ref, + int index: int ref, + unique int version: @swift_token_integer_literal ref ); swift_availability_condition_def( unique int id: @swift_availability_condition ); -swift_await_expression_expr( - unique int swift_await_expression: @swift_await_expression ref, - unique int expr: @swift_expression ref -); - -swift_await_expression_child( - unique int swift_await_expression: @swift_await_expression ref, - unique int child: @swift_expression ref -); - swift_await_expression_def( - unique int id: @swift_await_expression + unique int id: @swift_await_expression, + int expr: @swift_expression ref +); + +swift_binding_pattern_def( + unique int id: @swift_binding_pattern, + int binding: @swift_value_binding_pattern ref, + int pattern: @swift_pattern ref ); case @swift_bitwise_operation.op of @@ -293,27 +295,22 @@ swift_bitwise_operation_def( int rhs: @swift_expression ref ); -swift_call_expression_function( - unique int swift_call_expression: @swift_call_expression ref, - unique int function: @swift_expression ref -); - -swift_call_expression_suffix( - unique int swift_call_expression: @swift_call_expression ref, - unique int suffix: @swift_call_suffix ref -); - -@swift_call_expression_child_type = @swift_call_suffix | @swift_expression - -#keyset[swift_call_expression, index] -swift_call_expression_child( - int swift_call_expression: @swift_call_expression ref, - int index: int ref, - unique int child: @swift_call_expression_child_type ref -); - swift_call_expression_def( - unique int id: @swift_call_expression + unique int id: @swift_call_expression, + int function: @swift_expression ref, + int suffix: @swift_call_suffix ref +); + +swift_call_suffix_arguments( + unique int swift_call_suffix: @swift_call_suffix ref, + unique int arguments: @swift_value_arguments ref +); + +#keyset[swift_call_suffix, index] +swift_call_suffix_lambda( + int swift_call_suffix: @swift_call_suffix ref, + int index: int ref, + unique int lambda: @swift_lambda_literal ref ); #keyset[swift_call_suffix, index] @@ -323,15 +320,6 @@ swift_call_suffix_name( unique int name: @swift_token_simple_identifier ref ); -@swift_call_suffix_child_type = @swift_lambda_literal | @swift_value_arguments - -#keyset[swift_call_suffix, index] -swift_call_suffix_child( - int swift_call_suffix: @swift_call_suffix ref, - int index: int ref, - unique int child: @swift_call_suffix_child_type ref -); - swift_call_suffix_def( unique int id: @swift_call_suffix ); @@ -364,6 +352,21 @@ swift_capture_list_item_def( int name: @swift_capture_list_item_name_type ref ); +swift_case_pattern_arguments( + unique int swift_case_pattern: @swift_case_pattern ref, + unique int arguments: @swift_tuple_pattern ref +); + +swift_case_pattern_type( + unique int swift_case_pattern: @swift_case_pattern ref, + unique int type__: @swift_user_type ref +); + +swift_case_pattern_def( + unique int id: @swift_case_pattern, + int name: @swift_token_simple_identifier ref +); + swift_catch_block_body( unique int swift_catch_block: @swift_catch_block ref, unique int body: @swift_statements ref @@ -403,13 +406,6 @@ swift_class_body_member( unique int member: @swift_type_level_declaration ref ); -#keyset[swift_class_body, index] -swift_class_body_child( - int swift_class_body: @swift_class_body ref, - int index: int ref, - unique int child: @swift_token_multiline_comment ref -); - swift_class_body_def( unique int id: @swift_class_body ); @@ -432,6 +428,13 @@ case @swift_class_declaration.declaration_kind of ; +#keyset[swift_class_declaration, index] +swift_class_declaration_inherits( + int swift_class_declaration: @swift_class_declaration ref, + int index: int ref, + unique int inherits: @swift_inheritance_specifier ref +); + @swift_class_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier #keyset[swift_class_declaration, index] @@ -453,13 +456,6 @@ swift_class_declaration_type_parameters( unique int type_parameters: @swift_type_parameters ref ); -#keyset[swift_class_declaration, index] -swift_class_declaration_child( - int swift_class_declaration: @swift_class_declaration ref, - int index: int ref, - unique int child: @swift_inheritance_specifier ref -); - swift_class_declaration_def( unique int id: @swift_class_declaration, int body: @swift_class_declaration_body_type ref, @@ -482,6 +478,49 @@ swift_comparison_expression_def( int rhs: @swift_expression ref ); +swift_compilation_condition_inner( + unique int swift_compilation_condition: @swift_compilation_condition ref, + unique int inner: @swift_compilation_condition ref +); + +swift_compilation_condition_lhs( + unique int swift_compilation_condition: @swift_compilation_condition ref, + unique int lhs: @swift_compilation_condition ref +); + +#keyset[swift_compilation_condition, index] +swift_compilation_condition_name( + int swift_compilation_condition: @swift_compilation_condition ref, + int index: int ref, + unique int name: @swift_token_simple_identifier ref +); + +swift_compilation_condition_operand( + unique int swift_compilation_condition: @swift_compilation_condition ref, + unique int operand: @swift_compilation_condition ref +); + +swift_compilation_condition_rhs( + unique int swift_compilation_condition: @swift_compilation_condition ref, + unique int rhs: @swift_compilation_condition ref +); + +swift_compilation_condition_value( + unique int swift_compilation_condition: @swift_compilation_condition ref, + unique int value: @swift_token_boolean_literal ref +); + +#keyset[swift_compilation_condition, index] +swift_compilation_condition_version( + int swift_compilation_condition: @swift_compilation_condition ref, + int index: int ref, + unique int version: @swift_token_integer_literal ref +); + +swift_compilation_condition_def( + unique int id: @swift_compilation_condition +); + #keyset[swift_computed_getter, index] swift_computed_getter_attribute( int swift_computed_getter: @swift_computed_getter ref, @@ -576,6 +615,18 @@ swift_constructor_expression_def( int suffix: @swift_constructor_suffix ref ); +swift_constructor_suffix_arguments( + unique int swift_constructor_suffix: @swift_constructor_suffix ref, + unique int arguments: @swift_value_arguments ref +); + +#keyset[swift_constructor_suffix, index] +swift_constructor_suffix_lambda( + int swift_constructor_suffix: @swift_constructor_suffix ref, + int index: int ref, + unique int lambda: @swift_lambda_literal ref +); + #keyset[swift_constructor_suffix, index] swift_constructor_suffix_name( int swift_constructor_suffix: @swift_constructor_suffix ref, @@ -583,42 +634,20 @@ swift_constructor_suffix_name( unique int name: @swift_token_simple_identifier ref ); -@swift_constructor_suffix_child_type = @swift_lambda_literal | @swift_value_arguments - -#keyset[swift_constructor_suffix, index] -swift_constructor_suffix_child( - int swift_constructor_suffix: @swift_constructor_suffix ref, - int index: int ref, - unique int child: @swift_constructor_suffix_child_type ref -); - swift_constructor_suffix_def( unique int id: @swift_constructor_suffix ); -@swift_control_transfer_statement_kind_type = @swift_reserved_word - -swift_control_transfer_statement_kind( - unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, - unique int kind: @swift_control_transfer_statement_kind_type ref -); +@swift_control_transfer_statement_kind_type = @swift_reserved_word | @swift_token_throw_keyword swift_control_transfer_statement_result( unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, unique int result: @swift_expression ref ); -@swift_control_transfer_statement_child_type = @swift_expression | @swift_token_throw_keyword - -#keyset[swift_control_transfer_statement, index] -swift_control_transfer_statement_child( - int swift_control_transfer_statement: @swift_control_transfer_statement ref, - int index: int ref, - unique int child: @swift_control_transfer_statement_child_type ref -); - swift_control_transfer_statement_def( - unique int id: @swift_control_transfer_statement + unique int id: @swift_control_transfer_statement, + int kind: @swift_control_transfer_statement_kind_type ref ); swift_deinit_declaration_modifiers( @@ -631,13 +660,13 @@ swift_deinit_declaration_def( int body: @swift_function_body ref ); -@swift_deprecated_operator_declaration_body_child_type = @swift_line_string_literal | @swift_multi_line_string_literal | @swift_raw_string_literal | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_simple_identifier +@swift_deprecated_operator_declaration_body_entry_type = @swift_line_string_literal | @swift_multi_line_string_literal | @swift_raw_string_literal | @swift_reserved_word | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_simple_identifier #keyset[swift_deprecated_operator_declaration_body, index] -swift_deprecated_operator_declaration_body_child( +swift_deprecated_operator_declaration_body_entry( int swift_deprecated_operator_declaration_body: @swift_deprecated_operator_declaration_body ref, int index: int ref, - unique int child: @swift_deprecated_operator_declaration_body_child_type ref + unique int entry: @swift_deprecated_operator_declaration_body_entry_type ref ); swift_deprecated_operator_declaration_body_def( @@ -687,13 +716,9 @@ swift_didset_clause_def( unique int id: @swift_didset_clause ); -@swift_directive_child_type = @swift_token_boolean_literal | @swift_token_integer_literal | @swift_token_simple_identifier - -#keyset[swift_directive, index] -swift_directive_child( - int swift_directive: @swift_directive ref, - int index: int ref, - unique int child: @swift_directive_child_type ref +swift_directive_condition( + unique int swift_directive: @swift_directive ref, + unique int condition: @swift_compilation_condition ref ); swift_directive_def( @@ -776,13 +801,31 @@ swift_enum_entry_def( unique int id: @swift_enum_entry ); -@swift_enum_type_parameters_child_type = @swift_expression | @swift_token_wildcard_pattern | @swift_type__ +swift_enum_type_parameter_default_value( + unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, + unique int default_value: @swift_expression ref +); + +swift_enum_type_parameter_external_name( + unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, + unique int external_name: @swift_token_wildcard_pattern ref +); + +swift_enum_type_parameter_name( + unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, + unique int name: @swift_token_simple_identifier ref +); + +swift_enum_type_parameter_def( + unique int id: @swift_enum_type_parameter, + int type__: @swift_type__ ref +); #keyset[swift_enum_type_parameters, index] -swift_enum_type_parameters_child( +swift_enum_type_parameters_parameter( int swift_enum_type_parameters: @swift_enum_type_parameters ref, int index: int ref, - unique int child: @swift_enum_type_parameters_child_type ref + unique int parameter: @swift_enum_type_parameter ref ); swift_enum_type_parameters_def( @@ -868,7 +911,7 @@ swift_function_body_def( swift_function_declaration_async( unique int swift_function_declaration: @swift_function_declaration ref, - unique int async: @swift_token_async_keyword ref + unique int async: @swift_reserved_word ref ); #keyset[swift_function_declaration, index] @@ -935,7 +978,7 @@ swift_function_declaration_def( swift_function_type_async( unique int swift_function_type: @swift_function_type ref, - unique int async: @swift_token_async_keyword ref + unique int async: @swift_reserved_word ref ); @swift_function_type_throws_type = @swift_throws_clause | @swift_token_throws @@ -1006,9 +1049,9 @@ swift_if_condition_def( int kind: @swift_if_condition_kind_type ref ); -swift_if_let_binding_bound_identifier( +swift_if_let_binding_type( unique int swift_if_let_binding: @swift_if_let_binding ref, - unique int bound_identifier: @swift_token_simple_identifier ref + unique int type__: @swift_type_annotation ref ); swift_if_let_binding_value( @@ -1021,17 +1064,9 @@ swift_if_let_binding_where( unique int where: @swift_where_clause ref ); -@swift_if_let_binding_child_type = @swift_pattern | @swift_token_simple_identifier | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern - -#keyset[swift_if_let_binding, index] -swift_if_let_binding_child( - int swift_if_let_binding: @swift_if_let_binding ref, - int index: int ref, - unique int child: @swift_if_let_binding_child_type ref -); - swift_if_let_binding_def( - unique int id: @swift_if_let_binding + unique int id: @swift_if_let_binding, + int pattern: @swift_pattern ref ); #keyset[swift_if_statement, index] @@ -1110,7 +1145,7 @@ swift_inheritance_specifier_def( swift_init_declaration_async( unique int swift_init_declaration: @swift_init_declaration ref, - unique int async: @swift_token_async_keyword ref + unique int async: @swift_reserved_word ref ); #keyset[swift_init_declaration, index] @@ -1202,19 +1237,56 @@ swift_interpolated_expression_def( unique int id: @swift_interpolated_expression ); -@swift_key_path_expression_child_type = @swift_array_type | @swift_dictionary_type | @swift_token_bang | @swift_token_simple_identifier | @swift_token_type_identifier | @swift_type_arguments | @swift_value_argument +swift_key_path_component_name( + unique int swift_key_path_component: @swift_key_path_component ref, + unique int name: @swift_token_simple_identifier ref +); + +#keyset[swift_key_path_component, index] +swift_key_path_component_postfix( + int swift_key_path_component: @swift_key_path_component ref, + int index: int ref, + unique int postfix: @swift_key_path_postfix ref +); + +swift_key_path_component_def( + unique int id: @swift_key_path_component +); #keyset[swift_key_path_expression, index] -swift_key_path_expression_child( +swift_key_path_expression_component( int swift_key_path_expression: @swift_key_path_expression ref, int index: int ref, - unique int child: @swift_key_path_expression_child_type ref + unique int component: @swift_key_path_component ref +); + +@swift_key_path_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_simple_user_type + +swift_key_path_expression_type( + unique int swift_key_path_expression: @swift_key_path_expression ref, + unique int type__: @swift_key_path_expression_type_type ref ); swift_key_path_expression_def( unique int id: @swift_key_path_expression ); +#keyset[swift_key_path_postfix, index] +swift_key_path_postfix_argument( + int swift_key_path_postfix: @swift_key_path_postfix ref, + int index: int ref, + unique int argument: @swift_value_argument ref +); + +swift_key_path_postfix_force_unwrap( + unique int swift_key_path_postfix: @swift_key_path_postfix ref, + unique int force_unwrap: @swift_token_bang ref +); + +swift_key_path_postfix_def( + unique int id: @swift_key_path_postfix +); + swift_key_path_string_expression_def( unique int id: @swift_key_path_string_expression, int expr: @swift_expression ref @@ -1222,7 +1294,7 @@ swift_key_path_string_expression_def( swift_lambda_function_type_async( unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int async: @swift_token_async_keyword ref + unique int async: @swift_reserved_word ref ); swift_lambda_function_type_params( @@ -1350,6 +1422,11 @@ swift_macro_declaration_definition( unique int definition: @swift_macro_definition ref ); +swift_macro_declaration_modifiers( + unique int swift_macro_declaration: @swift_macro_declaration ref, + unique int modifiers: @swift_modifiers ref +); + #keyset[swift_macro_declaration, index] swift_macro_declaration_parameter( int swift_macro_declaration: @swift_macro_declaration ref, @@ -1357,17 +1434,24 @@ swift_macro_declaration_parameter( unique int parameter: @swift_parameter ref ); -@swift_macro_declaration_child_type = @swift_modifiers | @swift_token_simple_identifier | @swift_type_constraints | @swift_type_parameters | @swift_unannotated_type +swift_macro_declaration_return_type( + unique int swift_macro_declaration: @swift_macro_declaration ref, + unique int return_type: @swift_unannotated_type ref +); -#keyset[swift_macro_declaration, index] -swift_macro_declaration_child( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int child: @swift_macro_declaration_child_type ref +swift_macro_declaration_type_constraints( + unique int swift_macro_declaration: @swift_macro_declaration ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_macro_declaration_type_parameters( + unique int swift_macro_declaration: @swift_macro_declaration ref, + unique int type_parameters: @swift_type_parameters ref ); swift_macro_declaration_def( - unique int id: @swift_macro_declaration + unique int id: @swift_macro_declaration, + int name: @swift_token_simple_identifier ref ); @swift_macro_definition_body_type = @swift_expression | @swift_external_macro_definition @@ -1449,18 +1533,12 @@ swift_multiplicative_expression_def( int rhs: @swift_expression ref ); -@swift_navigation_expression_target_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_expression | @swift_opaque_type | @swift_reserved_word | @swift_user_type - -#keyset[swift_navigation_expression, index] -swift_navigation_expression_target( - int swift_navigation_expression: @swift_navigation_expression ref, - int index: int ref, - unique int target: @swift_navigation_expression_target_type ref -); +@swift_navigation_expression_target_type = @swift_array_type | @swift_dictionary_type | @swift_expression | @swift_parenthesized_type | @swift_user_type swift_navigation_expression_def( unique int id: @swift_navigation_expression, - int suffix: @swift_navigation_suffix ref + int suffix: @swift_navigation_suffix ref, + int target: @swift_navigation_expression_target_type ref ); @swift_navigation_suffix_suffix_type = @swift_token_integer_literal | @swift_token_simple_identifier @@ -1567,22 +1645,28 @@ swift_parameter_modifiers_def( unique int id: @swift_parameter_modifiers ); +@swift_parenthesized_type_type_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type + +swift_parenthesized_type_def( + unique int id: @swift_parenthesized_type, + int type__: @swift_parenthesized_type_type_type ref +); + +swift_pattern_binding( + unique int swift_pattern: @swift_pattern ref, + unique int binding: @swift_value_binding_pattern ref +); + swift_pattern_bound_identifier( unique int swift_pattern: @swift_pattern ref, unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_pattern_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_user_type | @swift_value_binding_pattern - -#keyset[swift_pattern, index] -swift_pattern_child( - int swift_pattern: @swift_pattern ref, - int index: int ref, - unique int child: @swift_pattern_child_type ref -); +@swift_pattern_kind_type = @swift_binding_pattern | @swift_case_pattern | @swift_expression | @swift_token_wildcard_pattern | @swift_tuple_pattern | @swift_type_casting_pattern swift_pattern_def( - unique int id: @swift_pattern + unique int id: @swift_pattern, + int kind: @swift_pattern_kind_type ref ); #keyset[swift_playground_literal, index] @@ -1671,6 +1755,27 @@ swift_property_declaration_name( unique int name: @swift_pattern ref ); +#keyset[swift_property_declaration, index] +swift_property_declaration_observers( + int swift_property_declaration: @swift_property_declaration ref, + int index: int ref, + unique int observers: @swift_willset_didset_block ref +); + +#keyset[swift_property_declaration, index] +swift_property_declaration_type( + int swift_property_declaration: @swift_property_declaration ref, + int index: int ref, + unique int type__: @swift_type_annotation ref +); + +#keyset[swift_property_declaration, index] +swift_property_declaration_type_constraints( + int swift_property_declaration: @swift_property_declaration ref, + int index: int ref, + unique int type_constraints: @swift_type_constraints ref +); + #keyset[swift_property_declaration, index] swift_property_declaration_value( int swift_property_declaration: @swift_property_declaration ref, @@ -1678,17 +1783,9 @@ swift_property_declaration_value( unique int value: @swift_expression ref ); -@swift_property_declaration_child_type = @swift_type_annotation | @swift_type_constraints | @swift_value_binding_pattern | @swift_willset_didset_block - -#keyset[swift_property_declaration, index] -swift_property_declaration_child( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int child: @swift_property_declaration_child_type ref -); - swift_property_declaration_def( - unique int id: @swift_property_declaration + unique int id: @swift_property_declaration, + int binding: @swift_value_binding_pattern ref ); #keyset[swift_protocol_body, index] @@ -1725,6 +1822,13 @@ case @swift_protocol_declaration.declaration_kind of ; +#keyset[swift_protocol_declaration, index] +swift_protocol_declaration_inherits( + int swift_protocol_declaration: @swift_protocol_declaration ref, + int index: int ref, + unique int inherits: @swift_inheritance_specifier ref +); + swift_protocol_declaration_modifiers( unique int swift_protocol_declaration: @swift_protocol_declaration ref, unique int modifiers: @swift_modifiers ref @@ -1740,13 +1844,6 @@ swift_protocol_declaration_type_parameters( unique int type_parameters: @swift_type_parameters ref ); -#keyset[swift_protocol_declaration, index] -swift_protocol_declaration_child( - int swift_protocol_declaration: @swift_protocol_declaration ref, - int index: int ref, - unique int child: @swift_inheritance_specifier ref -); - swift_protocol_declaration_def( unique int id: @swift_protocol_declaration, int body: @swift_protocol_body ref, @@ -1756,7 +1853,7 @@ swift_protocol_declaration_def( swift_protocol_function_declaration_async( unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int async: @swift_token_async_keyword ref + unique int async: @swift_reserved_word ref ); #keyset[swift_protocol_function_declaration, index] @@ -1946,6 +2043,16 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); +swift_simple_user_type_arguments( + unique int swift_simple_user_type: @swift_simple_user_type ref, + unique int arguments: @swift_type_arguments ref +); + +swift_simple_user_type_def( + unique int id: @swift_simple_user_type, + int name: @swift_token_type_identifier ref +); + swift_source_file_shebang( unique int swift_source_file: @swift_source_file ref, unique int shebang: @swift_token_shebang_line ref @@ -2030,22 +2137,36 @@ swift_suppressed_constraint_def( int suppressed: @swift_token_type_identifier ref ); -@swift_switch_entry_child_type = @swift_expression | @swift_modifiers | @swift_statements | @swift_switch_pattern | @swift_token_default_keyword | @swift_token_where_keyword +swift_switch_entry_default( + unique int swift_switch_entry: @swift_switch_entry ref, + unique int default: @swift_token_default_keyword ref +); + +swift_switch_entry_modifiers( + unique int swift_switch_entry: @swift_switch_entry ref, + unique int modifiers: @swift_modifiers ref +); #keyset[swift_switch_entry, index] -swift_switch_entry_child( +swift_switch_entry_pattern( int swift_switch_entry: @swift_switch_entry ref, int index: int ref, - unique int child: @swift_switch_entry_child_type ref + unique int pattern: @swift_switch_pattern ref +); + +swift_switch_entry_where( + unique int swift_switch_entry: @swift_switch_entry ref, + unique int where: @swift_where_clause ref ); swift_switch_entry_def( - unique int id: @swift_switch_entry + unique int id: @swift_switch_entry, + int body: @swift_statements ref ); swift_switch_pattern_def( unique int id: @swift_switch_pattern, - int child: @swift_pattern ref + int pattern: @swift_pattern ref ); #keyset[swift_switch_statement, index] @@ -2096,6 +2217,27 @@ swift_tuple_expression_def( unique int id: @swift_tuple_expression ); +#keyset[swift_tuple_pattern, index] +swift_tuple_pattern_item( + int swift_tuple_pattern: @swift_tuple_pattern ref, + int index: int ref, + unique int item: @swift_tuple_pattern_item ref +); + +swift_tuple_pattern_def( + unique int id: @swift_tuple_pattern +); + +swift_tuple_pattern_item_name( + unique int swift_tuple_pattern_item: @swift_tuple_pattern_item ref, + unique int name: @swift_token_simple_identifier ref +); + +swift_tuple_pattern_item_def( + unique int id: @swift_tuple_pattern_item, + int pattern: @swift_pattern ref +); + #keyset[swift_tuple_type, index] swift_tuple_type_element( int swift_tuple_type: @swift_tuple_type ref, @@ -2103,15 +2245,15 @@ swift_tuple_type_element( unique int element: @swift_tuple_type_item ref ); -swift_tuple_type_child( - unique int swift_tuple_type: @swift_tuple_type ref, - unique int child: @swift_tuple_type_item ref -); - swift_tuple_type_def( unique int id: @swift_tuple_type ); +swift_tuple_type_item_external_name( + unique int swift_tuple_type_item: @swift_tuple_type_item ref, + unique int external_name: @swift_token_wildcard_pattern ref +); + swift_tuple_type_item_modifiers( unique int swift_tuple_type_item: @swift_tuple_type_item ref, unique int modifiers: @swift_parameter_modifiers ref @@ -2122,20 +2264,11 @@ swift_tuple_type_item_name( unique int name: @swift_token_simple_identifier ref ); -swift_tuple_type_item_type( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int type__: @swift_type__ ref -); - -@swift_tuple_type_item_child_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_token_wildcard_pattern - -swift_tuple_type_item_child( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int child: @swift_tuple_type_item_child_type ref -); +@swift_tuple_type_item_type_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_type__ swift_tuple_type_item_def( - unique int id: @swift_tuple_type_item + unique int id: @swift_tuple_type_item, + int type__: @swift_tuple_type_item_type_type ref ); swift_type_modifiers( @@ -2166,6 +2299,16 @@ swift_type_arguments_def( unique int id: @swift_type_arguments ); +swift_type_casting_pattern_pattern( + unique int swift_type_casting_pattern: @swift_type_casting_pattern ref, + unique int pattern: @swift_pattern ref +); + +swift_type_casting_pattern_def( + unique int id: @swift_type_casting_pattern, + int type__: @swift_type__ ref +); + @swift_type_constraint_constraint_type = @swift_equality_constraint | @swift_inheritance_constraint swift_type_constraint_def( @@ -2274,13 +2417,11 @@ swift_typealias_declaration_def( @swift_unannotated_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type -@swift_user_type_part_type = @swift_token_type_identifier | @swift_type_arguments - #keyset[swift_user_type, index] swift_user_type_part( int swift_user_type: @swift_user_type ref, int index: int ref, - unique int part: @swift_user_type_part_type ref + unique int part: @swift_simple_user_type ref ); swift_user_type_def( @@ -2315,7 +2456,7 @@ swift_value_argument_def( swift_value_argument_label_def( unique int id: @swift_value_argument_label, - int child: @swift_token_simple_identifier ref + int name: @swift_token_simple_identifier ref ); #keyset[swift_value_arguments, index] @@ -2462,7 +2603,7 @@ case @swift_token.kind of ; -@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block +@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block swift_ast_node_location( unique int node: @swift_ast_node ref, From 5d6dc5c3c34e3e0e82809b70ecc05df6c88467b7 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 13:06:34 +0000 Subject: [PATCH 30/85] unified: Clean up statements/block mess Introduces (by making it named) a `block` node, and conversely makes `statements` anonymous. This enables us to sensibly distinguish between the "then" and "else" branch of an `if_statement`, which we were not able to previously. --- .../extractor/tree-sitter-swift/grammar.js | 51 +++++++++---------- .../tree-sitter-swift/node-types.yml | 46 ++++++++--------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 566b7d5567a..2112413b0c6 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -979,7 +979,7 @@ module.exports = grammar({ seq( choice("{", "^{"), optional($._lambda_type_declaration), - field("body", optional($.statements)), + optional($._statements), "}" ) ), @@ -1041,14 +1041,14 @@ module.exports = grammar({ ), self_expression: ($) => "self", super_expression: ($) => seq("super"), - _else_options: ($) => choice($._block, field("else_branch", $.if_statement)), + _else_options: ($) => choice(field("else_branch", $.block), field("else_branch", $.if_statement)), if_statement: ($) => prec.right( PRECS["if"], seq( "if", sep1(field("condition", $.if_condition), ","), - $._block, + field("body", $.block), optional(seq(field("else_keyword", $["else"]), $._else_options)) ) ), @@ -1067,7 +1067,7 @@ module.exports = grammar({ "guard", sep1(field("condition", $.if_condition), ","), field("else_keyword", $["else"]), - $._block + field("body", $.block) ) ), switch_statement: ($) => @@ -1094,18 +1094,18 @@ module.exports = grammar({ field("default", $.default_keyword) ), ":", - field("body", $.statements), + $._statements, optional("fallthrough") ), switch_pattern: ($) => field("pattern", alias($._binding_pattern_with_expr, $.pattern)), do_statement: ($) => - prec.right(PRECS["do"], seq("do", $._block, repeat(field("catch", $.catch_block)))), + prec.right(PRECS["do"], seq("do", field("body", $.block), repeat(field("catch", $.catch_block)))), catch_block: ($) => seq( field("keyword", $.catch_keyword), field("error", optional(alias($._binding_pattern_no_expr, $.pattern))), field("where", optional($.where_clause)), - $._block + field("body", $.block) ), where_clause: ($) => prec.left(seq(field("keyword", $.where_keyword), field("expr", $.expression))), key_path_expression: ($) => @@ -1181,7 +1181,7 @@ module.exports = grammar({ //////////////////////////////// // Statements - https://docs.swift.org/swift-book/ReferenceManual/Statements.html //////////////////////////////// - statements: ($) => + _statements: ($) => prec.left( // Left precedence is required in switch statements seq( @@ -1204,7 +1204,7 @@ module.exports = grammar({ $._labeled_statement, $._throw_statement ), - _block: ($) => prec(PRECS.block, seq("{", field("body", optional($.statements)), "}")), + block: ($) => prec(PRECS.block, seq("{", optional($._statements), "}")), _labeled_statement: ($) => seq( optional($.statement_label), @@ -1231,7 +1231,7 @@ module.exports = grammar({ "in", field("collection", $._for_statement_collection), field("where", optional($.where_clause)), - $._block + field("body", $.block) ) ), _for_statement_collection: ($) => @@ -1248,9 +1248,7 @@ module.exports = grammar({ seq( "while", sep1(field("condition", $.if_condition), ","), - "{", - field("body", optional($.statements)), - "}" + field("body", $.block) ) ), repeat_while_statement: ($) => @@ -1258,9 +1256,7 @@ module.exports = grammar({ PRECS.loop, seq( "repeat", - "{", - field("body", optional($.statements)), - "}", + field("body", $.block), // Make sure we make it to the `while` before assuming this is a parameter pack. repeat($._implicit_semi), "while", @@ -1443,14 +1439,14 @@ module.exports = grammar({ field("modifiers", optional($.modifiers)), "willSet", optional(seq("(", field("parameter", $.simple_identifier), ")")), - $._block + field("body", $.block) ), didset_clause: ($) => seq( field("modifiers", optional($.modifiers)), "didSet", optional(seq("(", field("parameter", $.simple_identifier), ")")), - $._block + field("body", $.block) ), typealias_declaration: ($) => seq(field("modifiers", optional($.modifiers)), $._modifierless_typealias_declaration), @@ -1464,13 +1460,13 @@ module.exports = grammar({ ), function_declaration: ($) => prec.right( - seq($._bodyless_function_declaration, field("body", $.function_body)) + seq($._bodyless_function_declaration, field("body", $.block)) ), _modifierless_function_declaration: ($) => prec.right( seq( $._modifierless_function_declaration_no_body, - field("body", $.function_body) + field("body", $.block) ) ), _bodyless_function_declaration: ($) => @@ -1496,7 +1492,6 @@ module.exports = grammar({ field("type_constraints", optional($.type_constraints)) ) ), - function_body: ($) => $._block, macro_declaration: ($) => seq( $._macro_head, @@ -1742,7 +1737,7 @@ module.exports = grammar({ protocol_function_declaration: ($) => seq( $._bodyless_function_declaration, - optional(field("body", $.function_body)) + optional(field("body", $.block)) ), init_declaration: ($) => prec.right( @@ -1756,12 +1751,12 @@ module.exports = grammar({ field("async", optional($._async_keyword)), field("throws", optional(choice($.throws_clause, $.throws))), field("type_constraints", optional($.type_constraints)), - optional(field("body", $.function_body)) + optional(field("body", $.block)) ) ), deinit_declaration: ($) => prec.right( - seq(field("modifiers", optional($.modifiers)), "deinit", field("body", $.function_body)) + seq(field("modifiers", optional($.modifiers)), "deinit", field("body", $.block)) ), subscript_declaration: ($) => prec.right( @@ -1784,7 +1779,7 @@ module.exports = grammar({ seq( "{", choice( - field("body", optional($.statements)), + optional($._statements), repeat( field("accessor", choice($.computed_getter, $.computed_setter, $.computed_modify)) ) @@ -1792,15 +1787,15 @@ module.exports = grammar({ "}" ), computed_getter: ($) => - seq(repeat(field("attribute", $.attribute)), field("specifier", $.getter_specifier), optional($._block)), + seq(repeat(field("attribute", $.attribute)), field("specifier", $.getter_specifier), optional(field("body", $.block))), computed_modify: ($) => - seq(repeat(field("attribute", $.attribute)), field("specifier", $.modify_specifier), optional($._block)), + seq(repeat(field("attribute", $.attribute)), field("specifier", $.modify_specifier), optional(field("body", $.block))), computed_setter: ($) => seq( repeat(field("attribute", $.attribute)), field("specifier", $.setter_specifier), optional(seq("(", field("parameter", $.simple_identifier), ")")), - optional($._block) + optional(field("body", $.block)) ), getter_specifier: ($) => seq(field("mutation", optional($.mutation_modifier)), "get", optional($._getter_effects)), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 47f56435d03..125a26a7679 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -155,6 +155,8 @@ named: lhs: expression op: ["&", "<<", ">>", "^", "|"] rhs: expression + block: + statement*: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] boolean_literal: call_expression: function: expression @@ -174,7 +176,7 @@ named: name: simple_identifier type?: user_type catch_block: - body?: statements + body: block error?: pattern keyword: catch_keyword where?: where_clause @@ -209,18 +211,18 @@ named: version*: integer_literal computed_getter: attribute*: attribute - body?: statements + body?: block specifier: getter_specifier computed_modify: attribute*: attribute - body?: statements + body?: block specifier: modify_specifier computed_property: accessor*: [computed_getter, computed_modify, computed_setter] - body?: statements + statement*: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] computed_setter: attribute*: attribute - body?: statements + body?: block parameter?: simple_identifier specifier: setter_specifier conjunction_expression: @@ -240,7 +242,7 @@ named: custom_operator: default_keyword: deinit_declaration: - body: function_body + body: block modifiers?: modifiers deprecated_operator_declaration_body: entry*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, "nil", oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] @@ -252,7 +254,7 @@ named: key: type value: type didset_clause: - body?: statements + body: block modifiers?: modifiers parameter?: simple_identifier directive: @@ -264,7 +266,7 @@ named: op: "||" rhs: expression do_statement: - body?: statements + body: block catch*: catch_block else: enum_class_body: @@ -294,19 +296,17 @@ named: external_macro_definition: arguments: value_arguments for_statement: - body?: statements + body: block collection: expression item: pattern try?: try_operator type?: type_annotation where?: where_clause fully_open_range: - function_body: - body?: statements function_declaration: async?: "async" attribute*: attribute - body: function_body + body: block default_value*: expression modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: [referenceable_operator, simple_identifier] @@ -325,7 +325,7 @@ named: effect*: [async_keyword, throws, throws_clause] mutation?: mutation_modifier guard_statement: - body?: statements + body: block condition+: if_condition else_keyword: else hex_literal: @@ -339,9 +339,9 @@ named: value?: expression where?: where_clause if_statement: - body*: statements + body: block condition+: if_condition - else_branch?: if_statement + else_branch?: [block, if_statement] else_keyword?: else implicitly_unwrapped_type: name: type @@ -363,7 +363,7 @@ named: async?: "async" attribute*: attribute bang?: bang - body?: function_body + body?: block default_value*: expression modifiers?: modifiers name: "init" @@ -397,8 +397,8 @@ named: parameter+: lambda_parameter lambda_literal: attribute*: attribute - body?: statements captures?: capture_list + statement*: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] type?: lambda_function_type lambda_parameter: external_name?: simple_identifier @@ -528,7 +528,7 @@ named: protocol_function_declaration: async?: "async" attribute*: attribute - body?: function_body + body?: block default_value*: expression modifiers?: modifiers name: [referenceable_operator, simple_identifier] @@ -565,7 +565,7 @@ named: operator: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", bang, custom_operator, "|", "~"] regex_literal: repeat_while_statement: - body?: statements + body: block condition+: if_condition selector_expression: expr: expression @@ -582,8 +582,6 @@ named: statement*: [do_statement, expression, for_statement, global_declaration, guard_statement, repeat_while_statement, statement_label, throw_keyword, while_statement] special_literal: statement_label: - statements: - statement+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] str_escaped_char: subscript_declaration: attribute*: attribute @@ -598,10 +596,10 @@ named: suppressed_constraint: suppressed: type_identifier switch_entry: - body: statements default?: default_keyword modifiers?: modifiers pattern*: switch_pattern + statement+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] where?: where_clause switch_pattern: pattern: pattern @@ -694,11 +692,11 @@ named: keyword: where_keyword where_keyword: while_statement: - body?: statements + body: block condition+: if_condition wildcard_pattern: willset_clause: - body?: statements + body: block modifiers?: modifiers parameter?: simple_identifier willset_didset_block: From ea6f3a9568223b554c7c4434051859c335dcff2a Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 13:20:58 +0000 Subject: [PATCH 31/85] unified: Encapsulate function parameters The field representation would have made it difficult to figure out which parameters correspond to which default values and attributes, so instead we now encapsulate these in a new `function_parameter` node. --- .../extractor/tree-sitter-swift/grammar.js | 4 ++-- .../tree-sitter-swift/node-types.yml | 24 +++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 2112413b0c6..50c1a08c66c 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1611,9 +1611,9 @@ module.exports = grammar({ ), _function_value_parameters: ($) => repeat1( - seq("(", optional(sep1Opt($._function_value_parameter, ",")), ")") + seq("(", optional(sep1Opt(field("parameter", $.function_parameter), ",")), ")") ), - _function_value_parameter: ($) => + function_parameter: ($) => seq( field("attribute", optional($.attribute)), field("parameter", $.parameter), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 125a26a7679..1f2e27ea337 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -305,17 +305,19 @@ named: fully_open_range: function_declaration: async?: "async" - attribute*: attribute body: block - default_value*: expression modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] name: [referenceable_operator, simple_identifier] - parameter*: parameter + parameter*: function_parameter return_type?: [implicitly_unwrapped_type, type] throws?: [throws, throws_clause] type_constraints?: type_constraints type_parameters?: type_parameters function_modifier: + function_parameter: + attribute?: attribute + default_value?: expression + parameter: parameter function_type: async?: "async" params: unannotated_type @@ -361,13 +363,11 @@ named: inherits_from: [function_type, suppressed_constraint, user_type] init_declaration: async?: "async" - attribute*: attribute bang?: bang body?: block - default_value*: expression modifiers?: modifiers name: "init" - parameter*: parameter + parameter*: function_parameter throws?: [throws, throws_clause] type_constraints?: type_constraints type_parameters?: type_parameters @@ -410,12 +410,10 @@ named: interpolation*: interpolated_expression text*: [line_str_text, str_escaped_char] macro_declaration: - attribute*: attribute - default_value*: expression definition?: macro_definition modifiers?: modifiers name: simple_identifier - parameter*: parameter + parameter*: function_parameter return_type?: unannotated_type type_constraints?: type_constraints type_parameters?: type_parameters @@ -527,12 +525,10 @@ named: type_parameters?: type_parameters protocol_function_declaration: async?: "async" - attribute*: attribute body?: block - default_value*: expression modifiers?: modifiers name: [referenceable_operator, simple_identifier] - parameter*: parameter + parameter*: function_parameter return_type?: [implicitly_unwrapped_type, type] throws?: [throws, throws_clause] type_constraints?: type_constraints @@ -584,11 +580,9 @@ named: statement_label: str_escaped_char: subscript_declaration: - attribute*: attribute body: computed_property - default_value*: expression modifiers?: modifiers - parameter*: parameter + parameter*: function_parameter return_type?: [implicitly_unwrapped_type, type] type_constraints?: type_constraints type_parameters?: type_parameters From c8f7c3d7f2d199f593104f91bfb125e0c854e8a4 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 13:49:30 +0000 Subject: [PATCH 32/85] unified: Group more paired items Same as in the preceding commit, these items do not make sense as separate fields on the parent node, so we materialise (or create new) intermediate nodes to group them together. --- .../extractor/tree-sitter-swift/grammar.js | 27 ++++++++++--------- .../tree-sitter-swift/node-types.yml | 19 ++++++++----- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 50c1a08c66c..385aeb4d867 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -105,8 +105,8 @@ module.exports = grammar({ // { (foo, bar) ... [$.expression, $.lambda_parameter], [$._primary_expression, $.lambda_parameter], - // (start: start, end: end) - [$._tuple_type_item_identifier, $.tuple_expression], + // (foo) where foo could be a binding pattern or a tuple expression item. + [$._binding_pattern_with_expr, $.tuple_expression_item], // After a `{` in a function or switch context, it's ambigous whether we're starting a set of local statements or // applying some modifiers to a capture or pattern. [$.modifiers], @@ -931,26 +931,25 @@ module.exports = grammar({ PRECS.tuple, seq( "(", - sep1Opt( - seq( - optional(seq(field("name", $.simple_identifier), ":")), - field("value", $.expression) - ), - "," - ), + sep1Opt(field("element", $.tuple_expression_item), ","), ")" ) ), + tuple_expression_item: ($) => + seq( + optional(seq(field("name", $.simple_identifier), ":")), + field("value", $.expression) + ), array_literal: ($) => seq("[", optional(sep1Opt(field("element", $.expression), ",")), "]"), dictionary_literal: ($) => seq( "[", - choice(":", sep1Opt($._dictionary_literal_item, ",")), + choice(":", sep1Opt(field("element", $.dictionary_literal_item), ",")), optional(","), "]" ), - _dictionary_literal_item: ($) => + dictionary_literal_item: ($) => seq(field("key", $.expression), ":", field("value", $.expression)), special_literal: ($) => seq( @@ -968,11 +967,13 @@ module.exports = grammar({ playground_literal: ($) => seq( $._hash_symbol, - choice("colorLiteral", "fileLiteral", "imageLiteral"), + field("kind", choice("colorLiteral", "fileLiteral", "imageLiteral")), "(", - sep1Opt(seq(field("name", $.simple_identifier), ":", field("value", $.expression)), ","), + sep1Opt(field("argument", $.playground_literal_argument), ","), ")" ), + playground_literal_argument: ($) => + seq(field("name", $.simple_identifier), ":", field("value", $.expression)), lambda_literal: ($) => prec.left( PRECS.lambda, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 1f2e27ea337..64e69142fb0 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -248,8 +248,10 @@ named: entry*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, "nil", oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: dictionary_literal: - key*: expression - value*: expression + element*: dictionary_literal_item + dictionary_literal_item: + key: expression + value: expression dictionary_type: key: type value: type @@ -483,8 +485,11 @@ named: bound_identifier?: simple_identifier kind: [binding_pattern, case_pattern, expression, tuple_pattern, type_casting_pattern, wildcard_pattern] playground_literal: - name+: simple_identifier - value+: expression + argument+: playground_literal_argument + kind: ["colorLiteral", "fileLiteral", "imageLiteral"] + playground_literal_argument: + name: simple_identifier + value: expression postfix_expression: operation: ["++", "--", bang] target: expression @@ -613,8 +618,10 @@ named: operator: try_operator try_operator: tuple_expression: - name*: simple_identifier - value+: expression + element+: tuple_expression_item + tuple_expression_item: + name?: simple_identifier + value: expression tuple_pattern: item+: tuple_pattern_item tuple_pattern_item: From 9787a8b072802b3ba5777c218f47b4e87ee08f32 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 13:51:25 +0000 Subject: [PATCH 33/85] unified: Group enum entries Same as in the preceding commit. --- unified/extractor/tree-sitter-swift/grammar.js | 13 ++++++------- unified/extractor/tree-sitter-swift/node-types.yml | 8 +++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 385aeb4d867..8b6bf33b62e 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1681,15 +1681,14 @@ module.exports = grammar({ field("modifiers", optional($.modifiers)), optional("indirect"), "case", - sep1( - seq( - field("name", $.simple_identifier), - optional($._enum_entry_suffix) - ), - "," - ), + sep1(field("case", $.enum_case_entry), ","), optional(";") ), + enum_case_entry: ($) => + seq( + field("name", $.simple_identifier), + optional($._enum_entry_suffix) + ), _enum_entry_suffix: ($) => choice( field("data_contents", $.enum_type_parameters), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 64e69142fb0..8f136ead220 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -271,13 +271,15 @@ named: body: block catch*: catch_block else: + enum_case_entry: + data_contents?: enum_type_parameters + name: simple_identifier + raw_value?: expression enum_class_body: member*: [enum_entry, type_level_declaration] enum_entry: - data_contents*: enum_type_parameters + case+: enum_case_entry modifiers?: modifiers - name+: simple_identifier - raw_value*: expression enum_type_parameter: default_value?: expression external_name?: wildcard_pattern From caef72b0476bda5012e9d3b7303f4e3de25cd77a Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 13:54:21 +0000 Subject: [PATCH 34/85] unified: Introduced named `property_binding` node This groups together a bunch of related values that would otherwise be impossible to match up correctly. --- unified/extractor/tree-sitter-swift/grammar.js | 4 ++-- unified/extractor/tree-sitter-swift/node-types.yml | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 8b6bf33b62e..f92ff68e5e5 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1400,10 +1400,10 @@ module.exports = grammar({ prec.right( seq( $._possibly_async_binding_pattern_kind, - sep1($._single_modifierless_property_declaration, ",") + sep1(field("declarator", $.property_binding), ",") ) ), - _single_modifierless_property_declaration: ($) => + property_binding: ($) => prec.left( seq( field("name", alias($._no_expr_pattern_already_bound, $.pattern)), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 8f136ead220..b6271b38a8c 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -507,15 +507,17 @@ named: operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] target: expression property_behavior_modifier: + property_binding: + computed_value?: computed_property + name: pattern + observers?: willset_didset_block + type?: type_annotation + type_constraints?: type_constraints + value?: expression property_declaration: binding: value_binding_pattern - computed_value*: computed_property + declarator+: property_binding modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier] - name+: pattern - observers*: willset_didset_block - type*: type_annotation - type_constraints*: type_constraints - value*: expression property_modifier: protocol_body: member*: protocol_member_declaration From f4f85b58ca7181cb5b0d3a3e954bee972b762d48 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 14:22:06 +0000 Subject: [PATCH 35/85] unified: Remove some pointless fields All of these fields have contents that are uniquely determined by the node they appear on, so they convey no information. --- unified/extractor/tree-sitter-swift/grammar.js | 8 ++++---- unified/extractor/tree-sitter-swift/node-types.yml | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index f92ff68e5e5..b6197b345e0 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1050,7 +1050,7 @@ module.exports = grammar({ "if", sep1(field("condition", $.if_condition), ","), field("body", $.block), - optional(seq(field("else_keyword", $["else"]), $._else_options)) + optional(seq(alias($["else"], "else"), $._else_options)) ) ), if_condition: ($) => @@ -1067,7 +1067,7 @@ module.exports = grammar({ seq( "guard", sep1(field("condition", $.if_condition), ","), - field("else_keyword", $["else"]), + alias($["else"], "else"), field("body", $.block) ) ), @@ -1712,7 +1712,7 @@ module.exports = grammar({ prec.right( seq( field("modifiers", optional($.modifiers)), - field("declaration_kind", "protocol"), + "protocol", field("name", alias($.simple_identifier, $.type_identifier)), field("type_parameters", optional($.type_parameters)), optional(seq(":", $._inheritance_specifiers)), @@ -1744,7 +1744,7 @@ module.exports = grammar({ seq( field("modifiers", optional($.modifiers)), optional("class"), - field("name", "init"), + "init", optional(choice($._quest, field("bang", $.bang))), field("type_parameters", optional($.type_parameters)), $._function_value_parameters, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index b6271b38a8c..8e1a4209d74 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -270,7 +270,6 @@ named: do_statement: body: block catch*: catch_block - else: enum_case_entry: data_contents?: enum_type_parameters name: simple_identifier @@ -333,7 +332,6 @@ named: guard_statement: body: block condition+: if_condition - else_keyword: else hex_literal: identifier: part+: simple_identifier @@ -348,7 +346,6 @@ named: body: block condition+: if_condition else_branch?: [block, if_statement] - else_keyword?: else implicitly_unwrapped_type: name: type import_declaration: @@ -370,7 +367,6 @@ named: bang?: bang body?: block modifiers?: modifiers - name: "init" parameter*: function_parameter throws?: [throws, throws_clause] type_constraints?: type_constraints @@ -526,7 +522,6 @@ named: protocol_declaration: attribute*: attribute body: protocol_body - declaration_kind: "protocol" inherits*: inheritance_specifier modifiers?: modifiers name: type_identifier @@ -794,6 +789,7 @@ unnamed: - "dsohandle" - "dynamic" - "each" + - "else" - "enum" - "extension" - "externalMacro" From dd9c066c6139ccc4eeba6610a780e8cfffef7d8a Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 14:24:12 +0000 Subject: [PATCH 36/85] unified: Regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 430 +++++++++++----------- unified/ql/lib/unified.dbscheme | 510 +++++++++++--------------- 2 files changed, 429 insertions(+), 511 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index db2e73df01b..1835f2c449a 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -364,6 +364,18 @@ module Swift { } } + /** A class representing `block` nodes. */ + class Block extends @swift_block, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "Block" } + + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_block_statement(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_block_statement(this, _, result) } + } + /** A class representing `boolean_literal` tokens. */ class BooleanLiteral extends @swift_token_boolean_literal, Token { /** Gets the name of the primary QL class for this element. */ @@ -471,22 +483,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "CatchBlock" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_catch_block_body(this, result) } + final Block getBody() { swift_catch_block_def(this, result, _) } /** Gets the node corresponding to the field `error`. */ final Pattern getError() { swift_catch_block_error(this, result) } /** Gets the node corresponding to the field `keyword`. */ - final CatchKeyword getKeyword() { swift_catch_block_def(this, result) } + final CatchKeyword getKeyword() { swift_catch_block_def(this, _, result) } /** Gets the node corresponding to the field `where`. */ final WhereClause getWhere() { swift_catch_block_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_catch_block_body(this, result) or + swift_catch_block_def(this, result, _) or swift_catch_block_error(this, result) or - swift_catch_block_def(this, result) or + swift_catch_block_def(this, _, result) or swift_catch_block_where(this, result) } } @@ -677,7 +689,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_getter_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_getter_body(this, result) } + final Block getBody() { swift_computed_getter_body(this, result) } /** Gets the node corresponding to the field `specifier`. */ final GetterSpecifier getSpecifier() { swift_computed_getter_def(this, result) } @@ -699,7 +711,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_modify_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_modify_body(this, result) } + final Block getBody() { swift_computed_modify_body(this, result) } /** Gets the node corresponding to the field `specifier`. */ final ModifySpecifier getSpecifier() { swift_computed_modify_def(this, result) } @@ -720,13 +732,13 @@ module Swift { /** Gets the node corresponding to the field `accessor`. */ final AstNode getAccessor(int i) { swift_computed_property_accessor(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_property_body(this, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_computed_property_statement(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_computed_property_accessor(this, _, result) or - swift_computed_property_body(this, result) + swift_computed_property_statement(this, _, result) } } @@ -739,7 +751,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_setter_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_setter_body(this, result) } + final Block getBody() { swift_computed_setter_body(this, result) } /** Gets the node corresponding to the field `parameter`. */ final SimpleIdentifier getParameter() { swift_computed_setter_parameter(this, result) } @@ -857,7 +869,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "DeinitDeclaration" } /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_deinit_declaration_def(this, result) } + final Block getBody() { swift_deinit_declaration_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_deinit_declaration_modifiers(this, result) } @@ -897,16 +909,30 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DictionaryLiteral" } + /** Gets the node corresponding to the field `element`. */ + final DictionaryLiteralItem getElement(int i) { + swift_dictionary_literal_element(this, i, result) + } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_dictionary_literal_element(this, _, result) } + } + + /** A class representing `dictionary_literal_item` nodes. */ + class DictionaryLiteralItem extends @swift_dictionary_literal_item, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "DictionaryLiteralItem" } + /** Gets the node corresponding to the field `key`. */ - final Expression getKey(int i) { swift_dictionary_literal_key(this, i, result) } + final Expression getKey() { swift_dictionary_literal_item_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_dictionary_literal_value(this, i, result) } + final Expression getValue() { swift_dictionary_literal_item_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_dictionary_literal_key(this, _, result) or - swift_dictionary_literal_value(this, _, result) + swift_dictionary_literal_item_def(this, result, _) or + swift_dictionary_literal_item_def(this, _, result) } } @@ -933,7 +959,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "DidsetClause" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_didset_clause_body(this, result) } + final Block getBody() { swift_didset_clause_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_didset_clause_modifiers(this, result) } @@ -943,7 +969,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_didset_clause_body(this, result) or + swift_didset_clause_def(this, result) or swift_didset_clause_modifiers(this, result) or swift_didset_clause_parameter(this, result) } @@ -1006,21 +1032,37 @@ module Swift { final override string getAPrimaryQlClass() { result = "DoStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_do_statement_body(this, result) } + final Block getBody() { swift_do_statement_def(this, result) } /** Gets the node corresponding to the field `catch`. */ final CatchBlock getCatch(int i) { swift_do_statement_catch(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_do_statement_body(this, result) or swift_do_statement_catch(this, _, result) + swift_do_statement_def(this, result) or swift_do_statement_catch(this, _, result) } } - /** A class representing `else` tokens. */ - class Else extends @swift_token_else, Token { + /** A class representing `enum_case_entry` nodes. */ + class EnumCaseEntry extends @swift_enum_case_entry, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Else" } + final override string getAPrimaryQlClass() { result = "EnumCaseEntry" } + + /** Gets the node corresponding to the field `data_contents`. */ + final EnumTypeParameters getDataContents() { swift_enum_case_entry_data_contents(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_enum_case_entry_def(this, result) } + + /** Gets the node corresponding to the field `raw_value`. */ + final Expression getRawValue() { swift_enum_case_entry_raw_value(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_enum_case_entry_data_contents(this, result) or + swift_enum_case_entry_def(this, result) or + swift_enum_case_entry_raw_value(this, result) + } } /** A class representing `enum_class_body` nodes. */ @@ -1040,26 +1082,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EnumEntry" } - /** Gets the node corresponding to the field `data_contents`. */ - final EnumTypeParameters getDataContents(int i) { - swift_enum_entry_data_contents(this, i, result) - } + /** Gets the node corresponding to the field `case`. */ + final EnumCaseEntry getCase(int i) { swift_enum_entry_case(this, i, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_enum_entry_modifiers(this, result) } - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_enum_entry_name(this, i, result) } - - /** Gets the node corresponding to the field `raw_value`. */ - final Expression getRawValue(int i) { swift_enum_entry_raw_value(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_enum_entry_data_contents(this, _, result) or - swift_enum_entry_modifiers(this, result) or - swift_enum_entry_name(this, _, result) or - swift_enum_entry_raw_value(this, _, result) + swift_enum_entry_case(this, _, result) or swift_enum_entry_modifiers(this, result) } } @@ -1192,13 +1223,13 @@ module Swift { final override string getAPrimaryQlClass() { result = "ForStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_for_statement_body(this, result) } + final Block getBody() { swift_for_statement_def(this, result, _, _) } /** Gets the node corresponding to the field `collection`. */ - final Expression getCollection() { swift_for_statement_def(this, result, _) } + final Expression getCollection() { swift_for_statement_def(this, _, result, _) } /** Gets the node corresponding to the field `item`. */ - final Pattern getItem() { swift_for_statement_def(this, _, result) } + final Pattern getItem() { swift_for_statement_def(this, _, _, result) } /** Gets the node corresponding to the field `try`. */ final TryOperator getTry() { swift_for_statement_try(this, result) } @@ -1211,9 +1242,9 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_for_statement_body(this, result) or - swift_for_statement_def(this, result, _) or - swift_for_statement_def(this, _, result) or + swift_for_statement_def(this, result, _, _) or + swift_for_statement_def(this, _, result, _) or + swift_for_statement_def(this, _, _, result) or swift_for_statement_try(this, result) or swift_for_statement_type(this, result) or swift_for_statement_where(this, result) @@ -1226,18 +1257,6 @@ module Swift { final override string getAPrimaryQlClass() { result = "FullyOpenRange" } } - /** A class representing `function_body` nodes. */ - class FunctionBody extends @swift_function_body, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionBody" } - - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_function_body_body(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_function_body_body(this, result) } - } - /** A class representing `function_declaration` nodes. */ class FunctionDeclaration extends @swift_function_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1246,16 +1265,8 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_function_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_function_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_function_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_function_declaration_default_value(this, i, result) - } + final Block getBody() { swift_function_declaration_def(this, result, _) } /** Gets the node corresponding to the field `modifiers`. */ final AstNode getModifiers(int i) { swift_function_declaration_modifiers(this, i, result) } @@ -1264,7 +1275,9 @@ module Swift { final AstNode getName() { swift_function_declaration_def(this, _, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_function_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_function_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_function_declaration_return_type(this, result) } @@ -1285,9 +1298,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_function_declaration_async(this, result) or - swift_function_declaration_attribute(this, _, result) or swift_function_declaration_def(this, result, _) or - swift_function_declaration_default_value(this, _, result) or swift_function_declaration_modifiers(this, _, result) or swift_function_declaration_def(this, _, result) or swift_function_declaration_parameter(this, _, result) or @@ -1304,6 +1315,28 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionModifier" } } + /** A class representing `function_parameter` nodes. */ + class FunctionParameter extends @swift_function_parameter, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "FunctionParameter" } + + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute() { swift_function_parameter_attribute(this, result) } + + /** Gets the node corresponding to the field `default_value`. */ + final Expression getDefaultValue() { swift_function_parameter_default_value(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter() { swift_function_parameter_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_function_parameter_attribute(this, result) or + swift_function_parameter_default_value(this, result) or + swift_function_parameter_def(this, result) + } + } + /** A class representing `function_type` nodes. */ class FunctionType extends @swift_function_type, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1356,19 +1389,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "GuardStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_guard_statement_body(this, result) } + final Block getBody() { swift_guard_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_guard_statement_condition(this, i, result) } - /** Gets the node corresponding to the field `else_keyword`. */ - final Else getElseKeyword() { swift_guard_statement_def(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_guard_statement_body(this, result) or - swift_guard_statement_condition(this, _, result) or - swift_guard_statement_def(this, result) + swift_guard_statement_def(this, result) or swift_guard_statement_condition(this, _, result) } } @@ -1434,23 +1462,19 @@ module Swift { final override string getAPrimaryQlClass() { result = "IfStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody(int i) { swift_if_statement_body(this, i, result) } + final Block getBody() { swift_if_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_if_statement_condition(this, i, result) } /** Gets the node corresponding to the field `else_branch`. */ - final IfStatement getElseBranch() { swift_if_statement_else_branch(this, result) } - - /** Gets the node corresponding to the field `else_keyword`. */ - final Else getElseKeyword() { swift_if_statement_else_keyword(this, result) } + final AstNode getElseBranch() { swift_if_statement_else_branch(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_statement_body(this, _, result) or + swift_if_statement_def(this, result) or swift_if_statement_condition(this, _, result) or - swift_if_statement_else_branch(this, result) or - swift_if_statement_else_keyword(this, result) + swift_if_statement_else_branch(this, result) } } @@ -1553,30 +1577,19 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_init_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_init_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `bang`. */ final Bang getBang() { swift_init_declaration_bang(this, result) } /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_init_declaration_body(this, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_init_declaration_default_value(this, i, result) - } + final Block getBody() { swift_init_declaration_body(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_init_declaration_modifiers(this, result) } - /** Gets the node corresponding to the field `name`. */ - final string getName() { - exists(int value | swift_init_declaration_def(this, value) | (result = "init" and value = 0)) - } - /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_init_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_init_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `throws`. */ final AstNode getThrows() { swift_init_declaration_throws(this, result) } @@ -1594,10 +1607,8 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_init_declaration_async(this, result) or - swift_init_declaration_attribute(this, _, result) or swift_init_declaration_bang(this, result) or swift_init_declaration_body(this, result) or - swift_init_declaration_default_value(this, _, result) or swift_init_declaration_modifiers(this, result) or swift_init_declaration_parameter(this, _, result) or swift_init_declaration_throws(this, result) or @@ -1762,20 +1773,20 @@ module Swift { /** Gets the node corresponding to the field `attribute`. */ final Attribute getAttribute(int i) { swift_lambda_literal_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_lambda_literal_body(this, result) } - /** Gets the node corresponding to the field `captures`. */ final CaptureList getCaptures() { swift_lambda_literal_captures(this, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_lambda_literal_statement(this, i, result) } + /** Gets the node corresponding to the field `type`. */ final LambdaFunctionType getType() { swift_lambda_literal_type(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_lambda_literal_attribute(this, _, result) or - swift_lambda_literal_body(this, result) or swift_lambda_literal_captures(this, result) or + swift_lambda_literal_statement(this, _, result) or swift_lambda_literal_type(this, result) } } @@ -1839,14 +1850,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "MacroDeclaration" } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_macro_declaration_attribute(this, i, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_macro_declaration_default_value(this, i, result) - } - /** Gets the node corresponding to the field `definition`. */ final MacroDefinition getDefinition() { swift_macro_declaration_definition(this, result) } @@ -1857,7 +1860,9 @@ module Swift { final SimpleIdentifier getName() { swift_macro_declaration_def(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_macro_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_macro_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final UnannotatedType getReturnType() { swift_macro_declaration_return_type(this, result) } @@ -1874,8 +1879,6 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_macro_declaration_attribute(this, _, result) or - swift_macro_declaration_default_value(this, _, result) or swift_macro_declaration_definition(this, result) or swift_macro_declaration_modifiers(this, result) or swift_macro_declaration_def(this, result) or @@ -2295,16 +2298,41 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PlaygroundLiteral" } + /** Gets the node corresponding to the field `argument`. */ + final PlaygroundLiteralArgument getArgument(int i) { + swift_playground_literal_argument(this, i, result) + } + + /** Gets the node corresponding to the field `kind`. */ + final string getKind() { + exists(int value | swift_playground_literal_def(this, value) | + result = "colorLiteral" and value = 0 + or + result = "fileLiteral" and value = 1 + or + result = "imageLiteral" and value = 2 + ) + } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_playground_literal_argument(this, _, result) } + } + + /** A class representing `playground_literal_argument` nodes. */ + class PlaygroundLiteralArgument extends @swift_playground_literal_argument, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "PlaygroundLiteralArgument" } + /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_playground_literal_name(this, i, result) } + final SimpleIdentifier getName() { swift_playground_literal_argument_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_playground_literal_value(this, i, result) } + final Expression getValue() { swift_playground_literal_argument_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_playground_literal_name(this, _, result) or - swift_playground_literal_value(this, _, result) + swift_playground_literal_argument_def(this, result, _) or + swift_playground_literal_argument_def(this, _, result) } } @@ -2402,6 +2430,44 @@ module Swift { final override string getAPrimaryQlClass() { result = "PropertyBehaviorModifier" } } + /** A class representing `property_binding` nodes. */ + class PropertyBinding extends @swift_property_binding, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "PropertyBinding" } + + /** Gets the node corresponding to the field `computed_value`. */ + final ComputedProperty getComputedValue() { + swift_property_binding_computed_value(this, result) + } + + /** Gets the node corresponding to the field `name`. */ + final Pattern getName() { swift_property_binding_def(this, result) } + + /** Gets the node corresponding to the field `observers`. */ + final WillsetDidsetBlock getObservers() { swift_property_binding_observers(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType() { swift_property_binding_type(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_property_binding_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `value`. */ + final Expression getValue() { swift_property_binding_value(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_property_binding_computed_value(this, result) or + swift_property_binding_def(this, result) or + swift_property_binding_observers(this, result) or + swift_property_binding_type(this, result) or + swift_property_binding_type_constraints(this, result) or + swift_property_binding_value(this, result) + } + } + /** A class representing `property_declaration` nodes. */ class PropertyDeclaration extends @swift_property_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -2410,43 +2476,19 @@ module Swift { /** Gets the node corresponding to the field `binding`. */ final ValueBindingPattern getBinding() { swift_property_declaration_def(this, result) } - /** Gets the node corresponding to the field `computed_value`. */ - final ComputedProperty getComputedValue(int i) { - swift_property_declaration_computed_value(this, i, result) + /** Gets the node corresponding to the field `declarator`. */ + final PropertyBinding getDeclarator(int i) { + swift_property_declaration_declarator(this, i, result) } /** Gets the node corresponding to the field `modifiers`. */ final AstNode getModifiers(int i) { swift_property_declaration_modifiers(this, i, result) } - /** Gets the node corresponding to the field `name`. */ - final Pattern getName(int i) { swift_property_declaration_name(this, i, result) } - - /** Gets the node corresponding to the field `observers`. */ - final WillsetDidsetBlock getObservers(int i) { - swift_property_declaration_observers(this, i, result) - } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType(int i) { swift_property_declaration_type(this, i, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints(int i) { - swift_property_declaration_type_constraints(this, i, result) - } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_property_declaration_value(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_property_declaration_def(this, result) or - swift_property_declaration_computed_value(this, _, result) or - swift_property_declaration_modifiers(this, _, result) or - swift_property_declaration_name(this, _, result) or - swift_property_declaration_observers(this, _, result) or - swift_property_declaration_type(this, _, result) or - swift_property_declaration_type_constraints(this, _, result) or - swift_property_declaration_value(this, _, result) + swift_property_declaration_declarator(this, _, result) or + swift_property_declaration_modifiers(this, _, result) } } @@ -2491,14 +2533,7 @@ module Swift { final Attribute getAttribute(int i) { swift_protocol_declaration_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _, _) } - - /** Gets the node corresponding to the field `declaration_kind`. */ - final string getDeclarationKind() { - exists(int value | swift_protocol_declaration_def(this, _, value, _) | - (result = "protocol" and value = 0) - ) - } + final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _) } /** Gets the node corresponding to the field `inherits`. */ final InheritanceSpecifier getInherits(int i) { @@ -2509,7 +2544,7 @@ module Swift { final Modifiers getModifiers() { swift_protocol_declaration_modifiers(this, result) } /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, _, result) } + final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, result) } /** Gets the node corresponding to the field `type_constraints`. */ final TypeConstraints getTypeConstraints() { @@ -2524,10 +2559,10 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_declaration_attribute(this, _, result) or - swift_protocol_declaration_def(this, result, _, _) or + swift_protocol_declaration_def(this, result, _) or swift_protocol_declaration_inherits(this, _, result) or swift_protocol_declaration_modifiers(this, result) or - swift_protocol_declaration_def(this, _, _, result) or + swift_protocol_declaration_def(this, _, result) or swift_protocol_declaration_type_constraints(this, result) or swift_protocol_declaration_type_parameters(this, result) } @@ -2541,18 +2576,8 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_protocol_function_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { - swift_protocol_function_declaration_attribute(this, i, result) - } - /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_protocol_function_declaration_body(this, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_protocol_function_declaration_default_value(this, i, result) - } + final Block getBody() { swift_protocol_function_declaration_body(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_protocol_function_declaration_modifiers(this, result) } @@ -2561,7 +2586,7 @@ module Swift { final AstNode getName() { swift_protocol_function_declaration_def(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { + final FunctionParameter getParameter(int i) { swift_protocol_function_declaration_parameter(this, i, result) } @@ -2584,9 +2609,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_function_declaration_async(this, result) or - swift_protocol_function_declaration_attribute(this, _, result) or swift_protocol_function_declaration_body(this, result) or - swift_protocol_function_declaration_default_value(this, _, result) or swift_protocol_function_declaration_modifiers(this, result) or swift_protocol_function_declaration_def(this, result) or swift_protocol_function_declaration_parameter(this, _, result) or @@ -2776,7 +2799,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "RepeatWhileStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_repeat_while_statement_body(this, result) } + final Block getBody() { swift_repeat_while_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { @@ -2785,7 +2808,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_repeat_while_statement_body(this, result) or + swift_repeat_while_statement_def(this, result) or swift_repeat_while_statement_condition(this, _, result) } } @@ -2878,18 +2901,6 @@ module Swift { final override string getAPrimaryQlClass() { result = "StatementLabel" } } - /** A class representing `statements` nodes. */ - class Statements extends @swift_statements, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Statements" } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_statements_statement(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_statements_statement(this, _, result) } - } - /** A class representing `str_escaped_char` tokens. */ class StrEscapedChar extends @swift_token_str_escaped_char, Token { /** Gets the name of the primary QL class for this element. */ @@ -2901,22 +2912,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SubscriptDeclaration" } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_subscript_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ final ComputedProperty getBody() { swift_subscript_declaration_def(this, result) } - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_subscript_declaration_default_value(this, i, result) - } - /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_subscript_declaration_modifiers(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_subscript_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_subscript_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_subscript_declaration_return_type(this, result) } @@ -2933,9 +2938,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_subscript_declaration_attribute(this, _, result) or swift_subscript_declaration_def(this, result) or - swift_subscript_declaration_default_value(this, _, result) or swift_subscript_declaration_modifiers(this, result) or swift_subscript_declaration_parameter(this, _, result) or swift_subscript_declaration_return_type(this, result) or @@ -2967,9 +2970,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SwitchEntry" } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_switch_entry_def(this, result) } - /** Gets the node corresponding to the field `default`. */ final DefaultKeyword getDefault() { swift_switch_entry_default(this, result) } @@ -2979,15 +2979,18 @@ module Swift { /** Gets the node corresponding to the field `pattern`. */ final SwitchPattern getPattern(int i) { swift_switch_entry_pattern(this, i, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_switch_entry_statement(this, i, result) } + /** Gets the node corresponding to the field `where`. */ final WhereClause getWhere() { swift_switch_entry_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_switch_entry_def(this, result) or swift_switch_entry_default(this, result) or swift_switch_entry_modifiers(this, result) or swift_switch_entry_pattern(this, _, result) or + swift_switch_entry_statement(this, _, result) or swift_switch_entry_where(this, result) } } @@ -3095,15 +3098,28 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TupleExpression" } + /** Gets the node corresponding to the field `element`. */ + final TupleExpressionItem getElement(int i) { swift_tuple_expression_element(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_tuple_expression_element(this, _, result) } + } + + /** A class representing `tuple_expression_item` nodes. */ + class TupleExpressionItem extends @swift_tuple_expression_item, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "TupleExpressionItem" } + /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_tuple_expression_name(this, i, result) } + final SimpleIdentifier getName() { swift_tuple_expression_item_name(this, result) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_tuple_expression_value(this, i, result) } + final Expression getValue() { swift_tuple_expression_item_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_tuple_expression_name(this, _, result) or swift_tuple_expression_value(this, _, result) + swift_tuple_expression_item_name(this, result) or + swift_tuple_expression_item_def(this, result) } } @@ -3533,14 +3549,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "WhileStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_while_statement_body(this, result) } + final Block getBody() { swift_while_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_while_statement_condition(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_while_statement_body(this, result) or swift_while_statement_condition(this, _, result) + swift_while_statement_def(this, result) or swift_while_statement_condition(this, _, result) } } @@ -3556,7 +3572,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "WillsetClause" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_willset_clause_body(this, result) } + final Block getBody() { swift_willset_clause_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_willset_clause_modifiers(this, result) } @@ -3566,7 +3582,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_willset_clause_body(this, result) or + swift_willset_clause_def(this, result) or swift_willset_clause_modifiers(this, result) or swift_willset_clause_parameter(this, result) } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 0c3f023b001..5cf748c1571 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -295,6 +295,19 @@ swift_bitwise_operation_def( int rhs: @swift_expression ref ); +@swift_block_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_block, index] +swift_block_statement( + int swift_block: @swift_block ref, + int index: int ref, + unique int statement: @swift_block_statement_type ref +); + +swift_block_def( + unique int id: @swift_block +); + swift_call_expression_def( unique int id: @swift_call_expression, int function: @swift_expression ref, @@ -367,11 +380,6 @@ swift_case_pattern_def( int name: @swift_token_simple_identifier ref ); -swift_catch_block_body( - unique int swift_catch_block: @swift_catch_block ref, - unique int body: @swift_statements ref -); - swift_catch_block_error( unique int swift_catch_block: @swift_catch_block ref, unique int error: @swift_pattern ref @@ -384,6 +392,7 @@ swift_catch_block_where( swift_catch_block_def( unique int id: @swift_catch_block, + int body: @swift_block ref, int keyword: @swift_token_catch_keyword ref ); @@ -530,7 +539,7 @@ swift_computed_getter_attribute( swift_computed_getter_body( unique int swift_computed_getter: @swift_computed_getter ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_getter_def( @@ -547,7 +556,7 @@ swift_computed_modify_attribute( swift_computed_modify_body( unique int swift_computed_modify: @swift_computed_modify ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_modify_def( @@ -564,9 +573,13 @@ swift_computed_property_accessor( unique int accessor: @swift_computed_property_accessor_type ref ); -swift_computed_property_body( - unique int swift_computed_property: @swift_computed_property ref, - unique int body: @swift_statements ref +@swift_computed_property_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_computed_property, index] +swift_computed_property_statement( + int swift_computed_property: @swift_computed_property ref, + int index: int ref, + unique int statement: @swift_computed_property_statement_type ref ); swift_computed_property_def( @@ -582,7 +595,7 @@ swift_computed_setter_attribute( swift_computed_setter_body( unique int swift_computed_setter: @swift_computed_setter ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_setter_parameter( @@ -657,7 +670,7 @@ swift_deinit_declaration_modifiers( swift_deinit_declaration_def( unique int id: @swift_deinit_declaration, - int body: @swift_function_body ref + int body: @swift_block ref ); @swift_deprecated_operator_declaration_body_entry_type = @swift_line_string_literal | @swift_multi_line_string_literal | @swift_raw_string_literal | @swift_reserved_word | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_simple_identifier @@ -674,34 +687,28 @@ swift_deprecated_operator_declaration_body_def( ); #keyset[swift_dictionary_literal, index] -swift_dictionary_literal_key( +swift_dictionary_literal_element( int swift_dictionary_literal: @swift_dictionary_literal ref, int index: int ref, - unique int key__: @swift_expression ref -); - -#keyset[swift_dictionary_literal, index] -swift_dictionary_literal_value( - int swift_dictionary_literal: @swift_dictionary_literal ref, - int index: int ref, - unique int value: @swift_expression ref + unique int element: @swift_dictionary_literal_item ref ); swift_dictionary_literal_def( unique int id: @swift_dictionary_literal ); +swift_dictionary_literal_item_def( + unique int id: @swift_dictionary_literal_item, + int key__: @swift_expression ref, + int value: @swift_expression ref +); + swift_dictionary_type_def( unique int id: @swift_dictionary_type, int key__: @swift_type__ ref, int value: @swift_type__ ref ); -swift_didset_clause_body( - unique int swift_didset_clause: @swift_didset_clause ref, - unique int body: @swift_statements ref -); - swift_didset_clause_modifiers( unique int swift_didset_clause: @swift_didset_clause ref, unique int modifiers: @swift_modifiers ref @@ -713,7 +720,8 @@ swift_didset_clause_parameter( ); swift_didset_clause_def( - unique int id: @swift_didset_clause + unique int id: @swift_didset_clause, + int body: @swift_block ref ); swift_directive_condition( @@ -742,11 +750,6 @@ swift_disjunction_expression_def( int rhs: @swift_expression ref ); -swift_do_statement_body( - unique int swift_do_statement: @swift_do_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_do_statement, index] swift_do_statement_catch( int swift_do_statement: @swift_do_statement ref, @@ -755,7 +758,23 @@ swift_do_statement_catch( ); swift_do_statement_def( - unique int id: @swift_do_statement + unique int id: @swift_do_statement, + int body: @swift_block ref +); + +swift_enum_case_entry_data_contents( + unique int swift_enum_case_entry: @swift_enum_case_entry ref, + unique int data_contents: @swift_enum_type_parameters ref +); + +swift_enum_case_entry_raw_value( + unique int swift_enum_case_entry: @swift_enum_case_entry ref, + unique int raw_value: @swift_expression ref +); + +swift_enum_case_entry_def( + unique int id: @swift_enum_case_entry, + int name: @swift_token_simple_identifier ref ); @swift_enum_class_body_member_type = @swift_enum_entry | @swift_type_level_declaration @@ -772,10 +791,10 @@ swift_enum_class_body_def( ); #keyset[swift_enum_entry, index] -swift_enum_entry_data_contents( +swift_enum_entry_case( int swift_enum_entry: @swift_enum_entry ref, int index: int ref, - unique int data_contents: @swift_enum_type_parameters ref + unique int case__: @swift_enum_case_entry ref ); swift_enum_entry_modifiers( @@ -783,20 +802,6 @@ swift_enum_entry_modifiers( unique int modifiers: @swift_modifiers ref ); -#keyset[swift_enum_entry, index] -swift_enum_entry_name( - int swift_enum_entry: @swift_enum_entry ref, - int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -#keyset[swift_enum_entry, index] -swift_enum_entry_raw_value( - int swift_enum_entry: @swift_enum_entry ref, - int index: int ref, - unique int raw_value: @swift_expression ref -); - swift_enum_entry_def( unique int id: @swift_enum_entry ); @@ -874,11 +879,6 @@ swift_external_macro_definition_def( int arguments: @swift_value_arguments ref ); -swift_for_statement_body( - unique int swift_for_statement: @swift_for_statement ref, - unique int body: @swift_statements ref -); - swift_for_statement_try( unique int swift_for_statement: @swift_for_statement ref, unique int try: @swift_token_try_operator ref @@ -896,38 +896,16 @@ swift_for_statement_where( swift_for_statement_def( unique int id: @swift_for_statement, + int body: @swift_block ref, int collection: @swift_expression ref, int item: @swift_pattern ref ); -swift_function_body_body( - unique int swift_function_body: @swift_function_body ref, - unique int body: @swift_statements ref -); - -swift_function_body_def( - unique int id: @swift_function_body -); - swift_function_declaration_async( unique int swift_function_declaration: @swift_function_declaration ref, unique int async: @swift_reserved_word ref ); -#keyset[swift_function_declaration, index] -swift_function_declaration_attribute( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_function_declaration, index] -swift_function_declaration_default_value( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - @swift_function_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier #keyset[swift_function_declaration, index] @@ -943,7 +921,7 @@ swift_function_declaration_modifiers( swift_function_declaration_parameter( int swift_function_declaration: @swift_function_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -972,10 +950,25 @@ swift_function_declaration_type_parameters( swift_function_declaration_def( unique int id: @swift_function_declaration, - int body: @swift_function_body ref, + int body: @swift_block ref, int name: @swift_function_declaration_name_type ref ); +swift_function_parameter_attribute( + unique int swift_function_parameter: @swift_function_parameter ref, + unique int attribute: @swift_attribute ref +); + +swift_function_parameter_default_value( + unique int swift_function_parameter: @swift_function_parameter ref, + unique int default_value: @swift_expression ref +); + +swift_function_parameter_def( + unique int id: @swift_function_parameter, + int parameter: @swift_parameter ref +); + swift_function_type_async( unique int swift_function_type: @swift_function_type ref, unique int async: @swift_reserved_word ref @@ -1014,11 +1007,6 @@ swift_getter_specifier_def( @swift_global_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_typealias_declaration -swift_guard_statement_body( - unique int swift_guard_statement: @swift_guard_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_guard_statement, index] swift_guard_statement_condition( int swift_guard_statement: @swift_guard_statement ref, @@ -1028,7 +1016,7 @@ swift_guard_statement_condition( swift_guard_statement_def( unique int id: @swift_guard_statement, - int else_keyword: @swift_token_else ref + int body: @swift_block ref ); #keyset[swift_identifier, index] @@ -1069,13 +1057,6 @@ swift_if_let_binding_def( int pattern: @swift_pattern ref ); -#keyset[swift_if_statement, index] -swift_if_statement_body( - int swift_if_statement: @swift_if_statement ref, - int index: int ref, - unique int body: @swift_statements ref -); - #keyset[swift_if_statement, index] swift_if_statement_condition( int swift_if_statement: @swift_if_statement ref, @@ -1083,18 +1064,16 @@ swift_if_statement_condition( unique int condition: @swift_if_condition ref ); +@swift_if_statement_else_branch_type = @swift_block | @swift_if_statement + swift_if_statement_else_branch( unique int swift_if_statement: @swift_if_statement ref, - unique int else_branch: @swift_if_statement ref -); - -swift_if_statement_else_keyword( - unique int swift_if_statement: @swift_if_statement ref, - unique int else_keyword: @swift_token_else ref + unique int else_branch: @swift_if_statement_else_branch_type ref ); swift_if_statement_def( - unique int id: @swift_if_statement + unique int id: @swift_if_statement, + int body: @swift_block ref ); swift_implicitly_unwrapped_type_def( @@ -1148,13 +1127,6 @@ swift_init_declaration_async( unique int async: @swift_reserved_word ref ); -#keyset[swift_init_declaration, index] -swift_init_declaration_attribute( - int swift_init_declaration: @swift_init_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - swift_init_declaration_bang( unique int swift_init_declaration: @swift_init_declaration ref, unique int bang: @swift_token_bang ref @@ -1162,14 +1134,7 @@ swift_init_declaration_bang( swift_init_declaration_body( unique int swift_init_declaration: @swift_init_declaration ref, - unique int body: @swift_function_body ref -); - -#keyset[swift_init_declaration, index] -swift_init_declaration_default_value( - int swift_init_declaration: @swift_init_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref + unique int body: @swift_block ref ); swift_init_declaration_modifiers( @@ -1177,16 +1142,11 @@ swift_init_declaration_modifiers( unique int modifiers: @swift_modifiers ref ); -case @swift_init_declaration.name of - 0 = @swift_init_declaration_init -; - - #keyset[swift_init_declaration, index] swift_init_declaration_parameter( int swift_init_declaration: @swift_init_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_init_declaration_throws_type = @swift_throws_clause | @swift_token_throws @@ -1207,8 +1167,7 @@ swift_init_declaration_type_parameters( ); swift_init_declaration_def( - unique int id: @swift_init_declaration, - int name: int ref + unique int id: @swift_init_declaration ); swift_interpolated_expression_name( @@ -1338,16 +1297,20 @@ swift_lambda_literal_attribute( unique int attribute: @swift_attribute ref ); -swift_lambda_literal_body( - unique int swift_lambda_literal: @swift_lambda_literal ref, - unique int body: @swift_statements ref -); - swift_lambda_literal_captures( unique int swift_lambda_literal: @swift_lambda_literal ref, unique int captures: @swift_capture_list ref ); +@swift_lambda_literal_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_lambda_literal, index] +swift_lambda_literal_statement( + int swift_lambda_literal: @swift_lambda_literal ref, + int index: int ref, + unique int statement: @swift_lambda_literal_statement_type ref +); + swift_lambda_literal_type( unique int swift_lambda_literal: @swift_lambda_literal ref, unique int type__: @swift_lambda_function_type ref @@ -1403,20 +1366,6 @@ swift_line_string_literal_def( @swift_local_declaration = @swift_class_declaration | @swift_function_declaration | @swift_property_declaration | @swift_typealias_declaration -#keyset[swift_macro_declaration, index] -swift_macro_declaration_attribute( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_macro_declaration, index] -swift_macro_declaration_default_value( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - swift_macro_declaration_definition( unique int swift_macro_declaration: @swift_macro_declaration ref, unique int definition: @swift_macro_definition ref @@ -1431,7 +1380,7 @@ swift_macro_declaration_modifiers( swift_macro_declaration_parameter( int swift_macro_declaration: @swift_macro_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); swift_macro_declaration_return_type( @@ -1670,21 +1619,28 @@ swift_pattern_def( ); #keyset[swift_playground_literal, index] -swift_playground_literal_name( +swift_playground_literal_argument( int swift_playground_literal: @swift_playground_literal ref, int index: int ref, - unique int name: @swift_token_simple_identifier ref + unique int argument: @swift_playground_literal_argument ref ); -#keyset[swift_playground_literal, index] -swift_playground_literal_value( - int swift_playground_literal: @swift_playground_literal ref, - int index: int ref, - unique int value: @swift_expression ref -); +case @swift_playground_literal.kind of + 0 = @swift_playground_literal_color_literal +| 1 = @swift_playground_literal_file_literal +| 2 = @swift_playground_literal_image_literal +; + swift_playground_literal_def( - unique int id: @swift_playground_literal + unique int id: @swift_playground_literal, + int kind: int ref +); + +swift_playground_literal_argument_def( + unique int id: @swift_playground_literal_argument, + int name: @swift_token_simple_identifier ref, + int value: @swift_expression ref ); @swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang @@ -1732,11 +1688,41 @@ swift_prefix_expression_def( int target: @swift_expression ref ); +swift_property_binding_computed_value( + unique int swift_property_binding: @swift_property_binding ref, + unique int computed_value: @swift_computed_property ref +); + +swift_property_binding_observers( + unique int swift_property_binding: @swift_property_binding ref, + unique int observers: @swift_willset_didset_block ref +); + +swift_property_binding_type( + unique int swift_property_binding: @swift_property_binding ref, + unique int type__: @swift_type_annotation ref +); + +swift_property_binding_type_constraints( + unique int swift_property_binding: @swift_property_binding ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_property_binding_value( + unique int swift_property_binding: @swift_property_binding ref, + unique int value: @swift_expression ref +); + +swift_property_binding_def( + unique int id: @swift_property_binding, + int name: @swift_pattern ref +); + #keyset[swift_property_declaration, index] -swift_property_declaration_computed_value( +swift_property_declaration_declarator( int swift_property_declaration: @swift_property_declaration ref, int index: int ref, - unique int computed_value: @swift_computed_property ref + unique int declarator: @swift_property_binding ref ); @swift_property_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier @@ -1748,41 +1734,6 @@ swift_property_declaration_modifiers( unique int modifiers: @swift_property_declaration_modifiers_type ref ); -#keyset[swift_property_declaration, index] -swift_property_declaration_name( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int name: @swift_pattern ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_observers( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int observers: @swift_willset_didset_block ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_type( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int type__: @swift_type_annotation ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_type_constraints( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int type_constraints: @swift_type_constraints ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_value( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int value: @swift_expression ref -); - swift_property_declaration_def( unique int id: @swift_property_declaration, int binding: @swift_value_binding_pattern ref @@ -1817,11 +1768,6 @@ swift_protocol_declaration_attribute( unique int attribute: @swift_attribute ref ); -case @swift_protocol_declaration.declaration_kind of - 0 = @swift_protocol_declaration_protocol -; - - #keyset[swift_protocol_declaration, index] swift_protocol_declaration_inherits( int swift_protocol_declaration: @swift_protocol_declaration ref, @@ -1847,7 +1793,6 @@ swift_protocol_declaration_type_parameters( swift_protocol_declaration_def( unique int id: @swift_protocol_declaration, int body: @swift_protocol_body ref, - int declaration_kind: int ref, int name: @swift_token_type_identifier ref ); @@ -1856,23 +1801,9 @@ swift_protocol_function_declaration_async( unique int async: @swift_reserved_word ref ); -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_attribute( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - swift_protocol_function_declaration_body( unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int body: @swift_function_body ref -); - -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_default_value( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref + unique int body: @swift_block ref ); swift_protocol_function_declaration_modifiers( @@ -1886,7 +1817,7 @@ swift_protocol_function_declaration_modifiers( swift_protocol_function_declaration_parameter( int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -2013,11 +1944,6 @@ swift_referenceable_operator_def( int operator: @swift_referenceable_operator_operator_type ref ); -swift_repeat_while_statement_body( - unique int swift_repeat_while_statement: @swift_repeat_while_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_condition( int swift_repeat_while_statement: @swift_repeat_while_statement ref, @@ -2026,7 +1952,8 @@ swift_repeat_while_statement_condition( ); swift_repeat_while_statement_def( - unique int id: @swift_repeat_while_statement + unique int id: @swift_repeat_while_statement, + int body: @swift_block ref ); swift_selector_expression_def( @@ -2071,33 +1998,6 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_statements, index] -swift_statements_statement( - int swift_statements: @swift_statements ref, - int index: int ref, - unique int statement: @swift_statements_statement_type ref -); - -swift_statements_def( - unique int id: @swift_statements -); - -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_attribute( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_default_value( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - swift_subscript_declaration_modifiers( unique int swift_subscript_declaration: @swift_subscript_declaration ref, unique int modifiers: @swift_modifiers ref @@ -2107,7 +2007,7 @@ swift_subscript_declaration_modifiers( swift_subscript_declaration_parameter( int swift_subscript_declaration: @swift_subscript_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -2154,14 +2054,22 @@ swift_switch_entry_pattern( unique int pattern: @swift_switch_pattern ref ); +@swift_switch_entry_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_switch_entry, index] +swift_switch_entry_statement( + int swift_switch_entry: @swift_switch_entry ref, + int index: int ref, + unique int statement: @swift_switch_entry_statement_type ref +); + swift_switch_entry_where( unique int swift_switch_entry: @swift_switch_entry ref, unique int where: @swift_where_clause ref ); swift_switch_entry_def( - unique int id: @swift_switch_entry, - int body: @swift_statements ref + unique int id: @swift_switch_entry ); swift_switch_pattern_def( @@ -2200,23 +2108,26 @@ swift_try_expression_def( ); #keyset[swift_tuple_expression, index] -swift_tuple_expression_name( +swift_tuple_expression_element( int swift_tuple_expression: @swift_tuple_expression ref, int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -#keyset[swift_tuple_expression, index] -swift_tuple_expression_value( - int swift_tuple_expression: @swift_tuple_expression ref, - int index: int ref, - unique int value: @swift_expression ref + unique int element: @swift_tuple_expression_item ref ); swift_tuple_expression_def( unique int id: @swift_tuple_expression ); +swift_tuple_expression_item_name( + unique int swift_tuple_expression_item: @swift_tuple_expression_item ref, + unique int name: @swift_token_simple_identifier ref +); + +swift_tuple_expression_item_def( + unique int id: @swift_tuple_expression_item, + int value: @swift_expression ref +); + #keyset[swift_tuple_pattern, index] swift_tuple_pattern_item( int swift_tuple_pattern: @swift_tuple_pattern ref, @@ -2497,11 +2408,6 @@ swift_where_clause_def( int keyword: @swift_token_where_keyword ref ); -swift_while_statement_body( - unique int swift_while_statement: @swift_while_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_while_statement, index] swift_while_statement_condition( int swift_while_statement: @swift_while_statement ref, @@ -2510,12 +2416,8 @@ swift_while_statement_condition( ); swift_while_statement_def( - unique int id: @swift_while_statement -); - -swift_willset_clause_body( - unique int swift_willset_clause: @swift_willset_clause ref, - unique int body: @swift_statements ref + unique int id: @swift_while_statement, + int body: @swift_block ref ); swift_willset_clause_modifiers( @@ -2529,7 +2431,8 @@ swift_willset_clause_parameter( ); swift_willset_clause_def( - unique int id: @swift_willset_clause + unique int id: @swift_willset_clause, + int body: @swift_block ref ); swift_willset_didset_block_didset( @@ -2564,46 +2467,45 @@ case @swift_token.kind of | 8 = @swift_token_custom_operator | 9 = @swift_token_default_keyword | 10 = @swift_token_diagnostic -| 11 = @swift_token_else -| 12 = @swift_token_fully_open_range -| 13 = @swift_token_function_modifier -| 14 = @swift_token_hex_literal -| 15 = @swift_token_inheritance_modifier -| 16 = @swift_token_integer_literal -| 17 = @swift_token_line_str_text -| 18 = @swift_token_member_modifier -| 19 = @swift_token_multi_line_str_text -| 20 = @swift_token_multiline_comment -| 21 = @swift_token_mutation_modifier -| 22 = @swift_token_oct_literal -| 23 = @swift_token_ownership_modifier -| 24 = @swift_token_parameter_modifier -| 25 = @swift_token_property_behavior_modifier -| 26 = @swift_token_property_modifier -| 27 = @swift_token_raw_str_continuing_indicator -| 28 = @swift_token_raw_str_end_part -| 29 = @swift_token_raw_str_interpolation_start -| 30 = @swift_token_raw_str_part -| 31 = @swift_token_real_literal -| 32 = @swift_token_regex_literal -| 33 = @swift_token_self_expression -| 34 = @swift_token_shebang_line -| 35 = @swift_token_simple_identifier -| 36 = @swift_token_special_literal -| 37 = @swift_token_statement_label -| 38 = @swift_token_str_escaped_char -| 39 = @swift_token_super_expression -| 40 = @swift_token_throw_keyword -| 41 = @swift_token_throws -| 42 = @swift_token_try_operator -| 43 = @swift_token_type_identifier -| 44 = @swift_token_visibility_modifier -| 45 = @swift_token_where_keyword -| 46 = @swift_token_wildcard_pattern +| 11 = @swift_token_fully_open_range +| 12 = @swift_token_function_modifier +| 13 = @swift_token_hex_literal +| 14 = @swift_token_inheritance_modifier +| 15 = @swift_token_integer_literal +| 16 = @swift_token_line_str_text +| 17 = @swift_token_member_modifier +| 18 = @swift_token_multi_line_str_text +| 19 = @swift_token_multiline_comment +| 20 = @swift_token_mutation_modifier +| 21 = @swift_token_oct_literal +| 22 = @swift_token_ownership_modifier +| 23 = @swift_token_parameter_modifier +| 24 = @swift_token_property_behavior_modifier +| 25 = @swift_token_property_modifier +| 26 = @swift_token_raw_str_continuing_indicator +| 27 = @swift_token_raw_str_end_part +| 28 = @swift_token_raw_str_interpolation_start +| 29 = @swift_token_raw_str_part +| 30 = @swift_token_real_literal +| 31 = @swift_token_regex_literal +| 32 = @swift_token_self_expression +| 33 = @swift_token_shebang_line +| 34 = @swift_token_simple_identifier +| 35 = @swift_token_special_literal +| 36 = @swift_token_statement_label +| 37 = @swift_token_str_escaped_char +| 38 = @swift_token_super_expression +| 39 = @swift_token_throw_keyword +| 40 = @swift_token_throws +| 41 = @swift_token_try_operator +| 42 = @swift_token_type_identifier +| 43 = @swift_token_visibility_modifier +| 44 = @swift_token_where_keyword +| 45 = @swift_token_wildcard_pattern ; -@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block +@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_block | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_literal_item | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_case_entry | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_declaration | @swift_function_parameter | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_playground_literal_argument | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_binding | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_expression_item | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block swift_ast_node_location( unique int node: @swift_ast_node ref, From cb0fc786c74e282d985a2dda66628614dceddbb3 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 18 May 2026 13:05:14 +0200 Subject: [PATCH 37/85] Ruby: Minor cleanup, Callable is a StmtSequence. --- ruby/ql/lib/codeql/ruby/ast/Method.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruby/ql/lib/codeql/ruby/ast/Method.qll b/ruby/ql/lib/codeql/ruby/ast/Method.qll index 147782e3d08..1594b6e6311 100644 --- a/ruby/ql/lib/codeql/ruby/ast/Method.qll +++ b/ruby/ql/lib/codeql/ruby/ast/Method.qll @@ -342,7 +342,7 @@ class Lambda extends Callable, BodyStmt, TLambda { } /** A block. */ -class Block extends Callable, StmtSequence, Scope, TBlock { +class Block extends Callable, Scope, TBlock { /** * Gets a local variable declared by this block. * For example `local` in `{ | param; local| puts param }`. @@ -358,8 +358,6 @@ class Block extends Callable, StmtSequence, Scope, TBlock { override AstNode getAChild(string pred) { result = Callable.super.getAChild(pred) or - result = StmtSequence.super.getAChild(pred) - or pred = "getLocalVariable" and result = this.getLocalVariable(_) } } From 42aaae7cf3ff429d2ae47691d2c324e2c2984da1 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 09:27:55 +0200 Subject: [PATCH 38/85] C#: Add test case for property calls and update test expected for other files. --- .../properties/PrintAst.expected | 47 +++++++++++++++++++ .../properties/Properties17.expected | 1 + .../properties/Properties19.expected | 7 +++ .../library-tests/properties/Properties19.ql | 8 ++++ .../library-tests/properties/properties.cs | 27 +++++++++++ 5 files changed, 90 insertions(+) create mode 100644 csharp/ql/test/library-tests/properties/Properties19.expected create mode 100644 csharp/ql/test/library-tests/properties/Properties19.ql diff --git a/csharp/ql/test/library-tests/properties/PrintAst.expected b/csharp/ql/test/library-tests/properties/PrintAst.expected index 711e417558e..ef482ed33d0 100644 --- a/csharp/ql/test/library-tests/properties/PrintAst.expected +++ b/csharp/ql/test/library-tests/properties/PrintAst.expected @@ -246,3 +246,50 @@ properties.cs: # 133| 0: [FieldAccess] access to field Prop.field # 133| 1: [ParameterAccess] access to parameter value # 130| 7: [Field] Prop.field +# 137| 11: [RefStruct] S +# 139| 6: [Field] x +# 139| -1: [TypeMention] int +# 141| 7: [InstanceConstructor] S +#-----| 2: (Parameters) +# 141| 0: [Parameter] v +# 141| -1: [TypeMention] int +# 142| 4: [BlockStmt] {...} +# 143| 0: [ExprStmt] ...; +# 143| 0: [AssignExpr] ... = ... +# 143| 0: [FieldAccess] access to field x +# 143| 1: [RefExpr] ref ... +# 143| 0: [ParameterAccess] access to parameter v +# 146| 8: [Property] Prop +# 146| -1: [TypeMention] int +# 148| 3: [Getter] get_Prop +# 148| 4: [BlockStmt] {...} +# 148| 0: [ReturnStmt] return ...; +# 148| 0: [RefExpr] ref ... +# 148| 0: [FieldAccess] access to field x +# 152| 12: [Class] TestRefReturns +# 154| 6: [Method] M +# 154| -1: [TypeMention] Void +# 155| 4: [BlockStmt] {...} +# 156| 0: [LocalVariableDeclStmt] ... ...; +# 156| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... +# 156| -1: [TypeMention] int +# 156| 0: [LocalVariableAccess] access to local variable a +# 156| 1: [IntLiteral] 0 +# 158| 1: [LocalVariableDeclStmt] ... ...; +# 158| 0: [LocalVariableDeclAndInitExpr] S s = ... +# 158| -1: [TypeMention] S +# 158| 0: [LocalVariableAccess] access to local variable s +# 158| 1: [ObjectCreation] object creation of type S +# 158| -1: [TypeMention] S +# 158| 0: [LocalVariableAccess] access to local variable a +# 159| 2: [ExprStmt] ...; +# 159| 0: [AssignExpr] ... = ... +# 159| 0: [PropertyCall] access to property Prop +# 159| -1: [LocalVariableAccess] access to local variable s +# 159| 1: [IntLiteral] 1 +# 160| 3: [LocalVariableDeclStmt] ... ...; +# 160| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... +# 160| -1: [TypeMention] int +# 160| 0: [LocalVariableAccess] access to local variable x +# 160| 1: [PropertyCall] access to property Prop +# 160| -1: [LocalVariableAccess] access to local variable s diff --git a/csharp/ql/test/library-tests/properties/Properties17.expected b/csharp/ql/test/library-tests/properties/Properties17.expected index ee817a63df9..74efae145f7 100644 --- a/csharp/ql/test/library-tests/properties/Properties17.expected +++ b/csharp/ql/test/library-tests/properties/Properties17.expected @@ -1,5 +1,6 @@ | Prop.field | | caption | | next | +| x | | y | | z | diff --git a/csharp/ql/test/library-tests/properties/Properties19.expected b/csharp/ql/test/library-tests/properties/Properties19.expected new file mode 100644 index 00000000000..1ae4493a6b5 --- /dev/null +++ b/csharp/ql/test/library-tests/properties/Properties19.expected @@ -0,0 +1,7 @@ +| properties.cs:12:23:12:29 | Caption | properties.cs:29:13:29:28 | access to property Caption | properties.cs:17:13:17:15 | set_Caption | +| properties.cs:12:23:12:29 | Caption | properties.cs:30:24:30:39 | access to property Caption | properties.cs:15:13:15:15 | get_Caption | +| properties.cs:57:20:57:20 | X | properties.cs:61:13:61:13 | access to property X | properties.cs:57:37:57:39 | set_X | +| properties.cs:58:20:58:20 | Y | properties.cs:62:13:62:13 | access to property Y | properties.cs:58:37:58:39 | set_Y | +| properties.cs:70:28:70:28 | X | properties.cs:82:46:82:51 | access to property X | properties.cs:70:32:70:34 | get_X | +| properties.cs:71:28:71:28 | Y | properties.cs:83:39:83:44 | access to property Y | properties.cs:74:13:74:15 | set_Y | +| properties.cs:146:24:146:27 | Prop | properties.cs:160:21:160:26 | access to property Prop | properties.cs:148:13:148:15 | get_Prop | diff --git a/csharp/ql/test/library-tests/properties/Properties19.ql b/csharp/ql/test/library-tests/properties/Properties19.ql new file mode 100644 index 00000000000..ea34f1d5635 --- /dev/null +++ b/csharp/ql/test/library-tests/properties/Properties19.ql @@ -0,0 +1,8 @@ +import csharp + +from PropertyCall pc, Property p, Accessor target +where + pc.getProperty() = p and + pc.getTarget() = target and + p.fromSource() +select p, pc, target diff --git a/csharp/ql/test/library-tests/properties/properties.cs b/csharp/ql/test/library-tests/properties/properties.cs index 2f88214ec75..391245e3497 100644 --- a/csharp/ql/test/library-tests/properties/properties.cs +++ b/csharp/ql/test/library-tests/properties/properties.cs @@ -133,4 +133,31 @@ namespace Properties set { field = value; } } } + + public ref struct S + { + private ref int x; + + public S(ref int v) + { + x = ref v; + } + + public ref int Prop + { + get { return ref x; } + } + } + + public class TestRefReturns + { + public void M() + { + int a = 0; + + S s = new S(ref a); + s.Prop = 1; + var x = s.Prop; + } + } } From a2ac0ab7d559fe724895329ab7e49a046e4877e2 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 09:38:37 +0200 Subject: [PATCH 39/85] C#: Add test case for indexer calls and update test expected for other files. --- .../indexers/Indexers13.expected | 3 ++ .../test/library-tests/indexers/Indexers13.ql | 8 +++ .../library-tests/indexers/PrintAst.expected | 54 +++++++++++++++++++ .../test/library-tests/indexers/indexers.cs | 27 ++++++++++ 4 files changed, 92 insertions(+) create mode 100644 csharp/ql/test/library-tests/indexers/Indexers13.expected create mode 100644 csharp/ql/test/library-tests/indexers/Indexers13.ql diff --git a/csharp/ql/test/library-tests/indexers/Indexers13.expected b/csharp/ql/test/library-tests/indexers/Indexers13.expected new file mode 100644 index 00000000000..0e7281cf645 --- /dev/null +++ b/csharp/ql/test/library-tests/indexers/Indexers13.expected @@ -0,0 +1,3 @@ +| indexers.cs:24:21:24:24 | Item | indexers.cs:62:22:62:29 | access to indexer | indexers.cs:26:13:26:15 | get_Item | +| indexers.cs:24:21:24:24 | Item | indexers.cs:65:25:65:32 | access to indexer | indexers.cs:34:13:34:15 | set_Item | +| indexers.cs:143:24:143:27 | Item | indexers.cs:157:21:157:24 | access to indexer | indexers.cs:145:13:145:15 | get_Item | diff --git a/csharp/ql/test/library-tests/indexers/Indexers13.ql b/csharp/ql/test/library-tests/indexers/Indexers13.ql new file mode 100644 index 00000000000..63680269007 --- /dev/null +++ b/csharp/ql/test/library-tests/indexers/Indexers13.ql @@ -0,0 +1,8 @@ +import csharp + +from IndexerCall ic, Indexer i, Accessor target +where + ic.getIndexer() = i and + ic.getTarget() = target and + i.fromSource() +select i, ic, target diff --git a/csharp/ql/test/library-tests/indexers/PrintAst.expected b/csharp/ql/test/library-tests/indexers/PrintAst.expected index 93160309c79..57b83223c36 100644 --- a/csharp/ql/test/library-tests/indexers/PrintAst.expected +++ b/csharp/ql/test/library-tests/indexers/PrintAst.expected @@ -360,3 +360,57 @@ indexers.cs: # 130| 4: [BlockStmt] {...} # 130| 0: [ReturnStmt] return ...; # 130| 0: [IntLiteral] 0 +# 134| 5: [RefStruct] S +# 136| 6: [Field] x +# 136| -1: [TypeMention] int +# 138| 7: [InstanceConstructor] S +#-----| 2: (Parameters) +# 138| 0: [Parameter] v +# 138| -1: [TypeMention] int +# 139| 4: [BlockStmt] {...} +# 140| 0: [ExprStmt] ...; +# 140| 0: [AssignExpr] ... = ... +# 140| 0: [FieldAccess] access to field x +# 140| 1: [RefExpr] ref ... +# 140| 0: [ParameterAccess] access to parameter v +# 143| 8: [Indexer] Item +# 143| -1: [TypeMention] int +#-----| 1: (Parameters) +# 143| 0: [Parameter] i +# 143| -1: [TypeMention] int +# 145| 3: [Getter] get_Item +#-----| 2: (Parameters) +# 143| 0: [Parameter] i +# 145| 4: [BlockStmt] {...} +# 145| 0: [ReturnStmt] return ...; +# 145| 0: [RefExpr] ref ... +# 145| 0: [FieldAccess] access to field x +# 149| 6: [Class] TestRefReturns +# 151| 6: [Method] M +# 151| -1: [TypeMention] Void +# 152| 4: [BlockStmt] {...} +# 153| 0: [LocalVariableDeclStmt] ... ...; +# 153| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... +# 153| -1: [TypeMention] int +# 153| 0: [LocalVariableAccess] access to local variable a +# 153| 1: [IntLiteral] 0 +# 155| 1: [LocalVariableDeclStmt] ... ...; +# 155| 0: [LocalVariableDeclAndInitExpr] S s = ... +# 155| -1: [TypeMention] S +# 155| 0: [LocalVariableAccess] access to local variable s +# 155| 1: [ObjectCreation] object creation of type S +# 155| -1: [TypeMention] S +# 155| 0: [LocalVariableAccess] access to local variable a +# 156| 2: [ExprStmt] ...; +# 156| 0: [AssignExpr] ... = ... +# 156| 0: [IndexerCall] access to indexer +# 156| -1: [LocalVariableAccess] access to local variable s +# 156| 0: [IntLiteral] 0 +# 156| 1: [IntLiteral] 1 +# 157| 3: [LocalVariableDeclStmt] ... ...; +# 157| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... +# 157| -1: [TypeMention] int +# 157| 0: [LocalVariableAccess] access to local variable x +# 157| 1: [IndexerCall] access to indexer +# 157| -1: [LocalVariableAccess] access to local variable s +# 157| 0: [IntLiteral] 0 diff --git a/csharp/ql/test/library-tests/indexers/indexers.cs b/csharp/ql/test/library-tests/indexers/indexers.cs index 6da14ae769d..55011d82755 100644 --- a/csharp/ql/test/library-tests/indexers/indexers.cs +++ b/csharp/ql/test/library-tests/indexers/indexers.cs @@ -130,4 +130,31 @@ namespace Indexers get { return 0; } } } + + public ref struct S + { + private ref int x; + + public S(ref int v) + { + x = ref v; + } + + public ref int this[int i] + { + get { return ref x; } + } + } + + public class TestRefReturns + { + public void M() + { + int a = 0; + + S s = new S(ref a); + s[0] = 1; + var x = s[0]; + } + } } From 9d0d4e4912f9b5e31fa4280b2692f1eb8e5487de Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 08:44:22 +0200 Subject: [PATCH 40/85] C#: Add ref return info for accessors. --- csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs index ed409e23b39..7e30d4d5f7c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs @@ -69,6 +69,7 @@ namespace Semmle.Extraction.CSharp.Entities } Overrides(trapFile); + ExtractRefReturn(trapFile, Symbol, this); if (Symbol.FromSource() && !HasBody) { From c3bb5e8effe92d883310e2985d71e5ab35a45ce2 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 08:46:48 +0200 Subject: [PATCH 41/85] C#: Use ref return getters for properties/indexers in write contexts. --- .../ql/lib/semmle/code/csharp/exprs/Call.qll | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll index c9b8e61f493..a358e73970c 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll @@ -766,7 +766,16 @@ class PropertyCall extends AccessorCall, PropertyAccessExpr { } override Accessor getWriteTarget() { - this instanceof AssignableWrite and result = this.getProperty().getSetter() + this instanceof AssignableWrite and + exists(Property p | p = this.getProperty() | + result = p.getSetter() + or + result = + any(Getter g | + g = p.getGetter() and + g.getAnnotatedReturnType().isRef() + ) + ) } override Expr getArgument(int i) { @@ -801,7 +810,16 @@ class IndexerCall extends AccessorCall, IndexerAccessExpr { } override Accessor getWriteTarget() { - this instanceof AssignableWrite and result = this.getIndexer().getSetter() + this instanceof AssignableWrite and + exists(Indexer i | i = this.getIndexer() | + result = i.getSetter() + or + result = + any(Getter g | + g = i.getGetter() and + g.getAnnotatedReturnType().isRef() + ) + ) } override Expr getArgument(int i) { From 1c01bb32d9ffcdae69f8be7281a4050eaf7092cc Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 09:48:04 +0200 Subject: [PATCH 42/85] C#: Update test expected output. --- csharp/ql/test/library-tests/indexers/Indexers13.expected | 1 + csharp/ql/test/library-tests/properties/Properties19.expected | 1 + 2 files changed, 2 insertions(+) diff --git a/csharp/ql/test/library-tests/indexers/Indexers13.expected b/csharp/ql/test/library-tests/indexers/Indexers13.expected index 0e7281cf645..a5e831421f8 100644 --- a/csharp/ql/test/library-tests/indexers/Indexers13.expected +++ b/csharp/ql/test/library-tests/indexers/Indexers13.expected @@ -1,3 +1,4 @@ | indexers.cs:24:21:24:24 | Item | indexers.cs:62:22:62:29 | access to indexer | indexers.cs:26:13:26:15 | get_Item | | indexers.cs:24:21:24:24 | Item | indexers.cs:65:25:65:32 | access to indexer | indexers.cs:34:13:34:15 | set_Item | +| indexers.cs:143:24:143:27 | Item | indexers.cs:156:13:156:16 | access to indexer | indexers.cs:145:13:145:15 | get_Item | | indexers.cs:143:24:143:27 | Item | indexers.cs:157:21:157:24 | access to indexer | indexers.cs:145:13:145:15 | get_Item | diff --git a/csharp/ql/test/library-tests/properties/Properties19.expected b/csharp/ql/test/library-tests/properties/Properties19.expected index 1ae4493a6b5..7c027119067 100644 --- a/csharp/ql/test/library-tests/properties/Properties19.expected +++ b/csharp/ql/test/library-tests/properties/Properties19.expected @@ -4,4 +4,5 @@ | properties.cs:58:20:58:20 | Y | properties.cs:62:13:62:13 | access to property Y | properties.cs:58:37:58:39 | set_Y | | properties.cs:70:28:70:28 | X | properties.cs:82:46:82:51 | access to property X | properties.cs:70:32:70:34 | get_X | | properties.cs:71:28:71:28 | Y | properties.cs:83:39:83:44 | access to property Y | properties.cs:74:13:74:15 | set_Y | +| properties.cs:146:24:146:27 | Prop | properties.cs:159:13:159:18 | access to property Prop | properties.cs:148:13:148:15 | get_Prop | | properties.cs:146:24:146:27 | Prop | properties.cs:160:21:160:26 | access to property Prop | properties.cs:148:13:148:15 | get_Prop | From c0273ae94fc0bffa765f7e253c49c0b8323099a0 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 13:21:26 +0200 Subject: [PATCH 43/85] C#: Update other affected tests (including database quality). --- csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected | 2 +- .../Telemetry/DatabaseQuality/IsNotOkayCall.expected | 1 - .../query-tests/Telemetry/DatabaseQuality/NoTarget.expected | 1 - csharp/ql/test/query-tests/Telemetry/DatabaseQuality/Quality.cs | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected b/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected index 6ab83277fcf..d6965f85da5 100644 --- a/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected +++ b/csharp/ql/test/library-tests/csharp8/NullableRefTypes.expected @@ -227,7 +227,7 @@ returnTypes | NullableRefTypes.cs:107:26:107:36 | ReturnsRef5 | readonly MyClass! | | NullableRefTypes.cs:108:26:108:36 | ReturnsRef6 | readonly MyClass! | | NullableRefTypes.cs:110:10:110:20 | Parameters1 | Void! | -| NullableRefTypes.cs:113:32:113:44 | get_RefProperty | MyClass! | +| NullableRefTypes.cs:113:32:113:44 | get_RefProperty | ref MyClass! | | NullableRefTypes.cs:116:7:116:23 | | Void | | NullableRefTypes.cs:116:7:116:23 | ToStringWithTypes | Void! | | NullableRefTypes.cs:136:7:136:24 | | Void | diff --git a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/IsNotOkayCall.expected b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/IsNotOkayCall.expected index 7555a37394b..dcdb8b09058 100644 --- a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/IsNotOkayCall.expected +++ b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/IsNotOkayCall.expected @@ -1,3 +1,2 @@ | Quality.cs:26:19:26:26 | access to indexer | Call without target $@. | Quality.cs:26:19:26:26 | access to indexer | access to indexer | | Quality.cs:29:21:29:27 | access to indexer | Call without target $@. | Quality.cs:29:21:29:27 | access to indexer | access to indexer | -| Quality.cs:32:9:32:21 | access to indexer | Call without target $@. | Quality.cs:32:9:32:21 | access to indexer | access to indexer | diff --git a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/NoTarget.expected b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/NoTarget.expected index 7ae469cf84e..a76dd08cdb6 100644 --- a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/NoTarget.expected +++ b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/NoTarget.expected @@ -9,6 +9,5 @@ | Quality.cs:23:9:23:30 | delegate call | Call without target $@. | Quality.cs:23:9:23:30 | delegate call | delegate call | | Quality.cs:26:19:26:26 | access to indexer | Call without target $@. | Quality.cs:26:19:26:26 | access to indexer | access to indexer | | Quality.cs:29:21:29:27 | access to indexer | Call without target $@. | Quality.cs:29:21:29:27 | access to indexer | access to indexer | -| Quality.cs:32:9:32:21 | access to indexer | Call without target $@. | Quality.cs:32:9:32:21 | access to indexer | access to indexer | | Quality.cs:38:16:38:26 | access to property MyProperty2 | Call without target $@. | Quality.cs:38:16:38:26 | access to property MyProperty2 | access to property MyProperty2 | | Quality.cs:50:20:50:26 | object creation of type T | Call without target $@. | Quality.cs:50:20:50:26 | object creation of type T | object creation of type T | diff --git a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/Quality.cs b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/Quality.cs index 31f4deda5df..e10ce10f6c4 100644 --- a/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/Quality.cs +++ b/csharp/ql/test/query-tests/Telemetry/DatabaseQuality/Quality.cs @@ -29,7 +29,7 @@ public class Test var slice = sp[..3]; // TODO: this is not an indexer call, but rather a `sp.Slice(0, 3)` call. Span guidBytes = stackalloc byte[16]; - guidBytes[08] = 1; // TODO: this indexer call has no target, because the target is a `ref` returning getter. + guidBytes[08] = 1; new MyList([new(), new Test()]); } From 6825ccc74f9fe5b06eaf8402062cd5adc195e4dc Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 19 May 2026 13:36:58 +0200 Subject: [PATCH 44/85] C#: Add change-note. --- .../change-notes/2026-05-19-properties-indexers-refreturn.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 csharp/ql/lib/change-notes/2026-05-19-properties-indexers-refreturn.md diff --git a/csharp/ql/lib/change-notes/2026-05-19-properties-indexers-refreturn.md b/csharp/ql/lib/change-notes/2026-05-19-properties-indexers-refreturn.md new file mode 100644 index 00000000000..d92d5fdf819 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-05-19-properties-indexers-refreturn.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Improved call target resolution for ref-return properties and indexers. From b6c2915f24a04f34a7a6e45a0cca89aa4ae497a3 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 19 May 2026 11:49:00 +0200 Subject: [PATCH 45/85] Ruby: Split callable and its body into two AST nodes. --- ruby/ql/consistency-queries/CfgConsistency.ql | 4 +- ruby/ql/lib/codeql/ruby/ast/Expr.qll | 2 + ruby/ql/lib/codeql/ruby/ast/Method.qll | 48 +++++++------- ruby/ql/lib/codeql/ruby/ast/internal/AST.qll | 64 +++++++++++-------- ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll | 33 ++++------ .../lib/codeql/ruby/ast/internal/Method.qll | 7 +- .../codeql/ruby/ast/internal/Synthesis.qll | 51 ++++++++++++--- .../dataflow/internal/DataFlowPrivate.qll | 2 +- .../ruby/dataflow/internal/DataFlowPublic.qll | 2 +- ruby/ql/lib/codeql/ruby/experimental/Rbi.qll | 8 +-- ruby/ql/lib/codeql/ruby/frameworks/Slim.qll | 2 +- .../lib/codeql/ruby/frameworks/XmlParsing.qll | 1 + .../actiondispatch/internal/Routing.qll | 10 +-- .../security/ImproperMemoizationQuery.qll | 2 +- .../ruby/security/InsecureDependencyQuery.qll | 2 +- 15 files changed, 139 insertions(+), 99 deletions(-) diff --git a/ruby/ql/consistency-queries/CfgConsistency.ql b/ruby/ql/consistency-queries/CfgConsistency.ql index c8d797b71f4..297b81678ee 100644 --- a/ruby/ql/consistency-queries/CfgConsistency.ql +++ b/ruby/ql/consistency-queries/CfgConsistency.ql @@ -27,7 +27,7 @@ query predicate scopeNoFirst(CfgScope scope) { not scope = any(Callable c | not exists(c.getAParameter()) and - not c.(BodyStmt).hasEnsure() and - not exists(c.(BodyStmt).getARescue()) + not c.getBody().hasEnsure() and + not exists(c.getBody().getARescue()) ) } diff --git a/ruby/ql/lib/codeql/ruby/ast/Expr.qll b/ruby/ql/lib/codeql/ruby/ast/Expr.qll index e932202e53f..a49cafa8299 100644 --- a/ruby/ql/lib/codeql/ruby/ast/Expr.qll +++ b/ruby/ql/lib/codeql/ruby/ast/Expr.qll @@ -167,6 +167,8 @@ class StmtSequence extends Expr, TStmtSequence { */ class BodyStmt extends StmtSequence, TBodyStmt { final override Stmt getStmt(int n) { + synthChild(this, n, result) + or toGenerated(result) = rank[n + 1](Ruby::AstNode node, int i | node = getBodyStmtChild(this, i) and diff --git a/ruby/ql/lib/codeql/ruby/ast/Method.qll b/ruby/ql/lib/codeql/ruby/ast/Method.qll index 1594b6e6311..38892da721e 100644 --- a/ruby/ql/lib/codeql/ruby/ast/Method.qll +++ b/ruby/ql/lib/codeql/ruby/ast/Method.qll @@ -8,7 +8,7 @@ private import internal.TreeSitter private import internal.Method /** A callable. */ -class Callable extends StmtSequence, Expr, Scope, TCallable { +class Callable extends Expr, Scope, TCallable { /** Gets the number of parameters of this callable. */ final int getNumberOfParameters() { result = count(this.getAParameter()) } @@ -18,27 +18,26 @@ class Callable extends StmtSequence, Expr, Scope, TCallable { /** Gets the `n`th parameter of this callable. */ Parameter getParameter(int n) { none() } + /** Gets the body of this callable. */ + BodyStmt getBody() { none() } + override AstNode getAChild(string pred) { result = super.getAChild(pred) or + pred = "getBody" and result = this.getBody() + or pred = "getParameter" and result = this.getParameter(_) } } /** A method. */ -class MethodBase extends Callable, BodyStmt, Scope, TMethodBase { +class MethodBase extends Callable, Scope, TMethodBase { /** Gets the name of this method. */ string getName() { none() } /** Holds if the name of this method is `name`. */ final predicate hasName(string name) { this.getName() = name } - override AstNode getAChild(string pred) { - result = Callable.super.getAChild(pred) - or - result = BodyStmt.super.getAChild(pred) - } - /** * Holds if this method is public. * Methods are public by default. @@ -218,6 +217,10 @@ class Method extends MethodBase, TMethod { toGenerated(result) = g.getParameters().getChild(n) } + final override BodyStmt getBody() { + toGenerated(result) = g.getBody() or synthChild(this, _, result) + } + final override string toString() { result = this.getName() } overlay[global] @@ -280,6 +283,10 @@ class SingletonMethod extends MethodBase, TSingletonMethod { toGenerated(result) = g.getParameters().getChild(n) } + final override BodyStmt getBody() { + toGenerated(result) = g.getBody() or synthChild(this, _, result) + } + final override string toString() { result = this.getName() } final override AstNode getAChild(string pred) { @@ -321,7 +328,7 @@ class SingletonMethod extends MethodBase, TSingletonMethod { * -> (x) { x + 1 } * ``` */ -class Lambda extends Callable, BodyStmt, TLambda { +class Lambda extends Callable, TLambda { private Ruby::Lambda g; Lambda() { this = TLambda(g) } @@ -332,13 +339,12 @@ class Lambda extends Callable, BodyStmt, TLambda { toGenerated(result) = g.getParameters().getChild(n) } - final override string toString() { result = "-> { ... }" } - - final override AstNode getAChild(string pred) { - result = Callable.super.getAChild(pred) - or - result = BodyStmt.super.getAChild(pred) + final override BodyStmt getBody() { + toGenerated(result) = g.getBody().(Ruby::DoBlock).getBody() or + toGenerated(result) = g.getBody().(Ruby::Block).getBody() } + + final override string toString() { result = "-> { ... }" } } /** A block. */ @@ -355,7 +361,7 @@ class Block extends Callable, Scope, TBlock { */ LocalVariableWriteAccess getLocalVariable(int n) { none() } - override AstNode getAChild(string pred) { + final override AstNode getAChild(string pred) { result = Callable.super.getAChild(pred) or pred = "getLocalVariable" and result = this.getLocalVariable(_) @@ -363,7 +369,7 @@ class Block extends Callable, Scope, TBlock { } /** A block enclosed within `do` and `end`. */ -class DoBlock extends Block, BodyStmt, TDoBlock { +class DoBlock extends Block, TDoBlock { private Ruby::DoBlock g; DoBlock() { this = TDoBlock(g) } @@ -376,13 +382,9 @@ class DoBlock extends Block, BodyStmt, TDoBlock { toGenerated(result) = g.getParameters().getChild(n) } - final override string toString() { result = "do ... end" } + final override BodyStmt getBody() { toGenerated(result) = g.getBody() } - final override AstNode getAChild(string pred) { - result = Block.super.getAChild(pred) - or - result = BodyStmt.super.getAChild(pred) - } + final override string toString() { result = "do ... end" } final override string getAPrimaryQlClass() { result = "DoBlock" } } diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/AST.qll b/ruby/ql/lib/codeql/ruby/ast/internal/AST.qll index ee46fbe8b66..bf187e22699 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/AST.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/AST.qll @@ -100,9 +100,16 @@ private module Cached { } or TBlockArgument(Ruby::BlockArgument g) or TBlockParameter(Ruby::BlockParameter g) or + TBodyStatement(Ruby::BodyStatement g) { + any(Ruby::Method m).getBody() = g or + any(Ruby::SingletonMethod m).getBody() = g or + any(Ruby::DoBlock b).getBody() = g + } or + TBodyStmtSynth(Ast::AstNode parent, int i) { mkSynthChild(BodyStmtKind(), parent, i) } or TBooleanLiteralSynth(Ast::AstNode parent, int i, boolean value) { mkSynthChild(BooleanLiteralKind(value), parent, i) } or + TBraceBlockBody(Ruby::BlockBody g) or TBraceBlockSynth(Ast::AstNode parent, int i) { mkSynthChild(BraceBlockKind(), parent, i) } or TBraceBlockReal(Ruby::Block g) { not g.getParent() instanceof Ruby::Lambda } or TBreakStmt(Ruby::Break g) or @@ -362,23 +369,24 @@ private module Cached { TAssignMulExpr or TAssignRShiftExpr or TAssignSubExpr or TBareStringLiteral or TBareSymbolLiteral or TBeginBlock or TBeginExpr or TBitwiseAndExprReal or TBitwiseOrExprReal or TBitwiseXorExprReal or TBlockArgument or TBlockParameter or - TBraceBlockReal or TBreakStmt or TCaseEqExpr or TCaseExpr or TCaseMatchReal or - TCharacterLiteral or TClassDeclaration or TClassVariableAccessReal or TComplementExpr or - TComplexLiteral or TDefinedExprReal or TDelimitedSymbolLiteral or - TDestructuredLeftAssignment or TDestructuredParameter or TDivExprReal or TDo or TDoBlock or - TElementReference or TElseReal or TElsif or TEmptyStmt or TEncoding or TEndBlock or - TEnsure or TEqExpr or TExponentExprReal or TFalseLiteral or TFile or TFindPattern or - TFloatLiteral or TForExpr or TForwardParameter or TForwardArgument or TGEExpr or TGTExpr or - TGlobalVariableAccessReal or THashKeySymbolLiteral or THashLiteral or THashPattern or - THashSplatExprReal or THashSplatNilParameter or THashSplatParameter or THereDoc or - TIdentifierMethodCall or TIfReal or TIfModifierExpr or TInClauseReal or - TInstanceVariableAccessReal or TIntegerLiteralReal or TKeywordParameter or TLEExpr or - TLShiftExprReal or TLTExpr or TLambda or TLeftAssignmentList or TLine or - TLocalVariableAccessReal or TLogicalAndExprReal or TLogicalOrExprReal or TMethod or - TMatchPattern or TModuleDeclaration or TModuloExprReal or TMulExprReal or TNEExpr or - TNextStmt or TNilLiteralReal or TNoRegExpMatchExpr or TNotExprReal or TOptionalParameter or - TPairReal or TParenthesizedExpr or TParenthesizedPattern or TRShiftExprReal or - TRangeLiteralReal or TRationalLiteral or TRedoStmt or TRegExpLiteral or TRegExpMatchExpr or + TBodyStatement or TBraceBlockBody or TBraceBlockReal or TBreakStmt or TCaseEqExpr or + TCaseExpr or TCaseMatchReal or TCharacterLiteral or TClassDeclaration or + TClassVariableAccessReal or TComplementExpr or TComplexLiteral or TDefinedExprReal or + TDelimitedSymbolLiteral or TDestructuredLeftAssignment or TDestructuredParameter or + TDivExprReal or TDo or TDoBlock or TElementReference or TElseReal or TElsif or TEmptyStmt or + TEncoding or TEndBlock or TEnsure or TEqExpr or TExponentExprReal or TFalseLiteral or + TFile or TFindPattern or TFloatLiteral or TForExpr or TForwardParameter or + TForwardArgument or TGEExpr or TGTExpr or TGlobalVariableAccessReal or + THashKeySymbolLiteral or THashLiteral or THashPattern or THashSplatExprReal or + THashSplatNilParameter or THashSplatParameter or THereDoc or TIdentifierMethodCall or + TIfReal or TIfModifierExpr or TInClauseReal or TInstanceVariableAccessReal or + TIntegerLiteralReal or TKeywordParameter or TLEExpr or TLShiftExprReal or TLTExpr or + TLambda or TLeftAssignmentList or TLine or TLocalVariableAccessReal or + TLogicalAndExprReal or TLogicalOrExprReal or TMethod or TMatchPattern or + TModuleDeclaration or TModuloExprReal or TMulExprReal or TNEExpr or TNextStmt or + TNilLiteralReal or TNoRegExpMatchExpr or TNotExprReal or TOptionalParameter or TPairReal or + TParenthesizedExpr or TParenthesizedPattern or TRShiftExprReal or TRangeLiteralReal or + TRationalLiteral or TRedoStmt or TRegExpLiteral or TRegExpMatchExpr or TRegularArrayLiteral or TRegularMethodCall or TRegularStringLiteral or TRegularSuperCall or TRescueClause or TRescueModifierExpr or TRetryStmt or TReturnStmt or TScopeResolutionConstantAccess or TSelfReal or TSimpleParameterReal or @@ -393,13 +401,13 @@ private module Cached { class TAstNodeSynth = TAddExprSynth or TAssignExprSynth or TBitwiseAndExprSynth or TBitwiseOrExprSynth or - TBitwiseXorExprSynth or TBraceBlockSynth or TBooleanLiteralSynth or TCaseMatchSynth or - TClassVariableAccessSynth or TConstantReadAccessSynth or TConstantWriteAccessSynth or - TDivExprSynth or TElseSynth or TExponentExprSynth or TGlobalVariableAccessSynth or - TIfSynth or TInClauseSynth or TInstanceVariableAccessSynth or TIntegerLiteralSynth or - TLShiftExprSynth or TLocalVariableAccessSynth or TLogicalAndExprSynth or - TLogicalOrExprSynth or TMethodCallSynth or TModuloExprSynth or TMulExprSynth or - TNilLiteralSynth or TRShiftExprSynth or TRangeLiteralSynth or TSelfSynth or + TBitwiseXorExprSynth or TBraceBlockSynth or TBodyStmtSynth or TBooleanLiteralSynth or + TCaseMatchSynth or TClassVariableAccessSynth or TConstantReadAccessSynth or + TConstantWriteAccessSynth or TDivExprSynth or TElseSynth or TExponentExprSynth or + TGlobalVariableAccessSynth or TIfSynth or TInClauseSynth or TInstanceVariableAccessSynth or + TIntegerLiteralSynth or TLShiftExprSynth or TLocalVariableAccessSynth or + TLogicalAndExprSynth or TLogicalOrExprSynth or TMethodCallSynth or TModuloExprSynth or + TMulExprSynth or TNilLiteralSynth or TRShiftExprSynth or TRangeLiteralSynth or TSelfSynth or TSimpleParameterSynth or TSplatExprSynth or THashSplatExprSynth or TStmtSequenceSynth or TSubExprSynth or TPairSynth or TSimpleSymbolLiteralSynth; @@ -439,6 +447,8 @@ private module Cached { n = TBitwiseXorExprReal(result) or n = TBlockArgument(result) or n = TBlockParameter(result) or + n = TBodyStatement(result) or + n = TBraceBlockBody(result) or n = TBraceBlockReal(result) or n = TBreakStmt(result) or n = TCaseEqExpr(result) or @@ -584,6 +594,8 @@ private module Cached { or result = TBitwiseXorExprSynth(parent, i) or + result = TBodyStmtSynth(parent, i) + or result = TBooleanLiteralSynth(parent, i, _) or result = TBraceBlockSynth(parent, i) @@ -757,9 +769,9 @@ class TElse = TElseReal or TElseSynth; class TStmtSequence = TBeginBlock or TEndBlock or TThen or TElse or TDo or TEnsure or TStringInterpolationComponent or - TBlock or TBodyStmt or TParenthesizedExpr or TStmtSequenceSynth; + TBodyStmt or TParenthesizedExpr or TStmtSequenceSynth; -class TBodyStmt = TBeginExpr or TModuleBase or TMethod or TLambda or TDoBlock or TSingletonMethod; +class TBodyStmt = TBeginExpr or TModuleBase or TBraceBlockBody or TBodyStatement or TBodyStmtSynth; class TNilLiteral = TNilLiteralReal or TNilLiteralSynth; diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll b/ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll index fdeec446a93..656b53eec46 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll @@ -14,6 +14,18 @@ class StmtSequenceSynth extends StmtSequence, TStmtSequenceSynth { final override string toString() { result = "..." } } +class BodyStatement extends BodyStmt, TBodyStatement { + final override string toString() { result = "..." } +} + +class BraceBlockBody extends BodyStmt, TBraceBlockBody { + final override string toString() { result = "..." } +} + +class BodyStmtSynth extends BodyStmt, TBodyStmtSynth { + final override string toString() { result = "..." } +} + class Then extends StmtSequence, TThen { private Ruby::Then g; @@ -64,26 +76,9 @@ class Ensure extends StmtSequence, TEnsure { // Not defined by dispatch, as it should not be exposed Ruby::AstNode getBodyStmtChild(TBodyStmt b, int i) { - exists(Ruby::Method g, Ruby::AstNode body | b = TMethod(g) and body = g.getBody() | - result = body.(Ruby::BodyStatement).getChild(i) - or - i = 0 and result = body and not body instanceof Ruby::BodyStatement - ) + result = any(Ruby::BlockBody g | b = TBraceBlockBody(g)).getChild(i) or - exists(Ruby::SingletonMethod g, Ruby::AstNode body | - b = TSingletonMethod(g) and body = g.getBody() - | - result = body.(Ruby::BodyStatement).getChild(i) - or - i = 0 and result = body and not body instanceof Ruby::BodyStatement - ) - or - exists(Ruby::Lambda g | b = TLambda(g) | - result = g.getBody().(Ruby::DoBlock).getBody().getChild(i) or - result = g.getBody().(Ruby::Block).getBody().getChild(i) - ) - or - result = any(Ruby::DoBlock g | b = TDoBlock(g)).getBody().getChild(i) + result = any(Ruby::BodyStatement g | b = TBodyStatement(g)).getChild(i) or result = any(Ruby::Program g | b = TToplevel(g)).getChild(i) and not result instanceof Ruby::BeginBlock diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/Method.qll b/ruby/ql/lib/codeql/ruby/ast/internal/Method.qll index c4dd1abbee0..fc30ec0c44f 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/Method.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/Method.qll @@ -18,7 +18,7 @@ class BraceBlockReal extends BraceBlock, TBraceBlockReal { toGenerated(result) = g.getParameters().getChild(n) } - final override Stmt getStmt(int i) { toGenerated(result) = g.getBody().getChild(i) } + final override BodyStmt getBody() { toGenerated(result) = g.getBody() } } /** @@ -28,8 +28,5 @@ class BraceBlockReal extends BraceBlock, TBraceBlockReal { class BraceBlockSynth extends BraceBlock, TBraceBlockSynth { final override Parameter getParameter(int n) { synthChild(this, n, result) } - final override Stmt getStmt(int i) { - i >= 0 and - synthChild(this, i + this.getNumberOfParameters(), result) - } + final override BodyStmt getBody() { synthChild(this, _, result) } } diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll b/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll index f2be91a63e5..072f453826c 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll @@ -19,6 +19,7 @@ newtype TSynthKind = BitwiseAndExprKind() or BitwiseOrExprKind() or BitwiseXorExprKind() or + BodyStmtKind() or BooleanLiteralKind(boolean value) { value = true or value = false } or BraceBlockKind() or CaseMatchKind() or @@ -73,6 +74,8 @@ class SynthKind extends TSynthKind { or this = BitwiseXorExprKind() and result = "BitwiseXorExprKind" or + this = BodyStmtKind() and result = "BodyStmtKind" + or this = BooleanLiteralKind(_) and result = "BooleanLiteralKind" or this = BraceBlockKind() and result = "BraceBlockKind" @@ -1475,17 +1478,24 @@ private module ForLoopDesugar { i = 0 and child = SynthChild(SimpleParameterKind()) or - exists(SimpleParameter param | param = TSimpleParameterSynth(block, 0) | + // block body + parent = block and + i = 1 and + child = SynthChild(BodyStmtKind()) + or + exists(SimpleParameter param, BodyStmt body | + param = TSimpleParameterSynth(block, 0) and body = TBodyStmtSynth(block, 1) + | parent = param and i = 0 and child = SynthChild(LocalVariableAccessSynthKind(TLocalVariableSynth(param, 0))) or // assignment to pattern from for loop to synth parameter - parent = block and - i = 1 and + parent = body and + i = 0 and child = SynthChild(AssignExprKind()) or - parent = TAssignExprSynth(block, 1) and + parent = TAssignExprSynth(body, 0) and ( i = 0 and child = childRef(for.getPattern()) @@ -1493,11 +1503,11 @@ private module ForLoopDesugar { i = 1 and child = SynthChild(LocalVariableAccessSynthKind(TLocalVariableSynth(param, 0))) ) + or + // rest of block body + parent = body and + child = childRef(for.getBody().(Do).getStmt(i - 1)) ) - or - // rest of block body - parent = block and - child = childRef(for.getBody().(Do).getStmt(i - 2)) ) ) ) @@ -1951,3 +1961,28 @@ private module ImplicitSuperArgsSynthesis { } } } + +private module CallableBodySynthesis { + private predicate bodySynthesis(AstNode parent, int i, Child child) { + exists(TMethodBase m, Ruby::AstNode body | + body = any(Ruby::Method g | m = TMethod(g)).getBody() + or + body = any(Ruby::SingletonMethod g | m = TSingletonMethod(g)).getBody() + | + parent = m and + not body instanceof Ruby::BodyStatement and + i = 0 and + child = SynthChild(BodyStmtKind()) + or + parent = TBodyStmtSynth(m, 0) and + i = 0 and + child = childRef(fromGenerated(body)) + ) + } + + private class CallableBodySynthesis extends Synthesis { + final override predicate child(AstNode parent, int i, Child child) { + bodySynthesis(parent, i, child) + } + } +} diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll index e4bcf2537a7..fb5ce7b0145 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll @@ -1662,7 +1662,7 @@ private module ReturnNodes { * last thing that is evaluated in the body of the callable. */ class ExprReturnNode extends SourceReturnNode, ExprNode { - ExprReturnNode() { exists(Callable c | implicitReturn(c, this) = c.getAStmt()) } + ExprReturnNode() { exists(Callable c | implicitReturn(c, this) = c.getBody().getAStmt()) } override ReturnKind getKindSource() { exists(CfgScope scope | scope = this.(NodeImpl).getCfgScope() | diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll index 6f2bc8b4acc..d0823fba0a7 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll @@ -1392,7 +1392,7 @@ class StmtSequenceNode extends ExprNode { /** * A data flow node corresponding to a method, block, or lambda expression. */ -class CallableNode extends StmtSequenceNode { +class CallableNode extends ExprNode { private Callable callable; CallableNode() { this.asExpr().getExpr() = callable } diff --git a/ruby/ql/lib/codeql/ruby/experimental/Rbi.qll b/ruby/ql/lib/codeql/ruby/experimental/Rbi.qll index 008089a6251..68efe353bb0 100644 --- a/ruby/ql/lib/codeql/ruby/experimental/Rbi.qll +++ b/ruby/ql/lib/codeql/ruby/experimental/Rbi.qll @@ -83,11 +83,7 @@ module Rbi { /** * Gets the type aliased by this call. */ - RbiType getAliasedType() { - exists(ExprNodes::MethodCallCfgNode n | n.getExpr() = this | - result = n.getBlock().(ExprNodes::StmtSequenceCfgNode).getLastStmt().getExpr() - ) - } + RbiType getAliasedType() { result = this.getBlock().getBody().getLastStmt() } } /** @@ -304,7 +300,7 @@ module Rbi { private MethodSignatureCall sigCall; MethodSignatureDefiningCall() { - exists(MethodCall c | c = sigCall.getBlock().getAChild() | + exists(MethodCall c | c = sigCall.getBlock().getBody().getAChild() | // The typical pattern for the contents of a `sig` block is something // like `params().returns()` - we want to // pick up both of these calls. diff --git a/ruby/ql/lib/codeql/ruby/frameworks/Slim.qll b/ruby/ql/lib/codeql/ruby/frameworks/Slim.qll index 3c3c3987383..7f85737bc04 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/Slim.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/Slim.qll @@ -18,7 +18,7 @@ module Slim { override DataFlow::Node getTemplate() { result.asExpr().getExpr() = - this.getBlock().(DataFlow::BlockNode).asCallableAstNode().getAStmt() + this.getBlock().(DataFlow::BlockNode).asCallableAstNode().getBody().getAStmt() } } diff --git a/ruby/ql/lib/codeql/ruby/frameworks/XmlParsing.qll b/ruby/ql/lib/codeql/ruby/frameworks/XmlParsing.qll index 91dc0ce5efa..b9b96fe1909 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/XmlParsing.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/XmlParsing.qll @@ -38,6 +38,7 @@ private class NokogiriXmlParserCall extends XmlParserCall::Range, DataFlow::Call .getExpr() .(MethodCall) .getBlock() + .getBody() .getAStmt() .getAChild*() .(MethodCall) diff --git a/ruby/ql/lib/codeql/ruby/frameworks/actiondispatch/internal/Routing.qll b/ruby/ql/lib/codeql/ruby/frameworks/actiondispatch/internal/Routing.qll index e6e453d449f..ac545481b9c 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/actiondispatch/internal/Routing.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/actiondispatch/internal/Routing.qll @@ -98,7 +98,7 @@ module Routing { Block getBlock() { result = block } - override Stmt getAStmt() { result = block.getAStmt() } + override Stmt getAStmt() { result = block.getBody().getAStmt() } override RouteBlock getParent() { none() } @@ -128,7 +128,7 @@ module Routing { override string getAPrimaryQlClass() { result = "ConstraintsRouteBlock" } - override Stmt getAStmt() { result = block.getAStmt() } + override Stmt getAStmt() { result = block.getBody().getAStmt() } override string getPathComponent() { result = "" } @@ -156,7 +156,7 @@ module Routing { override string getAPrimaryQlClass() { result = "ScopeRouteBlock" } - override Stmt getAStmt() { result = block.getAStmt() } + override Stmt getAStmt() { result = block.getBody().getAStmt() } override string toString() { result = methodCall.toString() } @@ -216,7 +216,7 @@ module Routing { override string getAPrimaryQlClass() { result = "ResourcesRouteBlock" } - override Stmt getAStmt() { result = block.getAStmt() } + override Stmt getAStmt() { result = block.getBody().getAStmt() } /** * Gets the `resources` call that gives rise to this route block. @@ -282,7 +282,7 @@ module Routing { NamespaceRouteBlock() { this = TNamespaceRouteBlock(parent, methodCall, block) } - override Stmt getAStmt() { result = block.getAStmt() } + override Stmt getAStmt() { result = block.getBody().getAStmt() } override string getPathComponent() { result = this.getNamespace() } diff --git a/ruby/ql/lib/codeql/ruby/security/ImproperMemoizationQuery.qll b/ruby/ql/lib/codeql/ruby/security/ImproperMemoizationQuery.qll index dab75f00b9e..f46540cc33a 100644 --- a/ruby/ql/lib/codeql/ruby/security/ImproperMemoizationQuery.qll +++ b/ruby/ql/lib/codeql/ruby/security/ImproperMemoizationQuery.qll @@ -70,7 +70,7 @@ private predicate memoReturnedFromMethod(Method m, MemoStmt s) { or // If we don't have flow (e.g. due to the dataflow library not supporting instance variable flow yet), // fall back to a syntactic heuristic: does the last statement in the method mention the memoization variable? - m.getLastStmt().getAChild*().(InstanceVariableReadAccess).getVariable() = + m.getBody().getLastStmt().getAChild*().(InstanceVariableReadAccess).getVariable() = s.getVariableAccess().getVariable() } diff --git a/ruby/ql/lib/codeql/ruby/security/InsecureDependencyQuery.qll b/ruby/ql/lib/codeql/ruby/security/InsecureDependencyQuery.qll index b8298420f81..dc18981a50b 100644 --- a/ruby/ql/lib/codeql/ruby/security/InsecureDependencyQuery.qll +++ b/ruby/ql/lib/codeql/ruby/security/InsecureDependencyQuery.qll @@ -33,7 +33,7 @@ private class SourceCall extends RelevantGemCall { private class GitSourceCall extends RelevantGemCall { GitSourceCall() { this.getMethodName() = "git_source" } - override Expr getAUrlPart() { result = this.getBlock().getLastStmt() } + override Expr getAUrlPart() { result = this.getBlock().getBody().getLastStmt() } } /** From 7dcd2d6ab6c903bcc7b816a8b08eb80f332f6ac2 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 21 May 2026 12:01:45 +0200 Subject: [PATCH 46/85] Ruby: Adjust CFG to updated AST. --- ruby/ql/consistency-queries/CfgConsistency.ql | 4 +- .../internal/ControlFlowGraphImpl.qll | 132 ++++++++---------- .../ruby/controlflow/internal/Splitting.qll | 2 +- 3 files changed, 62 insertions(+), 76 deletions(-) diff --git a/ruby/ql/consistency-queries/CfgConsistency.ql b/ruby/ql/consistency-queries/CfgConsistency.ql index 297b81678ee..5af4f22fc26 100644 --- a/ruby/ql/consistency-queries/CfgConsistency.ql +++ b/ruby/ql/consistency-queries/CfgConsistency.ql @@ -11,9 +11,7 @@ import codeql.ruby.controlflow.internal.ControlFlowGraphImpl as CfgImpl query predicate nonPostOrderExpr(Expr e, string cls) { cls = e.getPrimaryQlClasses() and not exists(e.getDesugared()) and - not e instanceof BeginExpr and - not e instanceof Namespace and - not e instanceof Toplevel and + not e instanceof BodyStmt and exists(AstNode last, Completion c | CfgImpl::last(e, last, c) and last != e and diff --git a/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll b/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll index f564633bb00..63198a17cf7 100644 --- a/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll +++ b/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll @@ -100,24 +100,26 @@ private class EndBlockScope extends CfgScopeImpl, EndBlock { } } -private class BodyStmtCallableScope extends CfgScopeImpl, AstInternal::TBodyStmt, Callable { - final override predicate entry(AstNode first) { this.(Trees::BodyStmtTree).firstInner(first) } - - final override predicate exit(AstNode last, Completion c) { - this.(Trees::BodyStmtTree).lastInner(last, c) - } -} - -private class BraceBlockScope extends CfgScopeImpl, BraceBlock { +private class CallableScope extends CfgScopeImpl, Callable { final override predicate entry(AstNode first) { - first(this.(Trees::BraceBlockTree).getBodyChild(0, _), first) + first(this.(Trees::CallableTree).getBodyChild(0), first) } final override predicate exit(AstNode last, Completion c) { - last(this.(Trees::BraceBlockTree).getLastBodyChild(), last, c) + this.getBody().(Trees::BodyStmtTree).last(last, c) or - last(this.(Trees::BraceBlockTree).getBodyChild(_, _), last, c) and - not c instanceof NormalCompletion + exists(int i | + not exists(this.getBody()) and + last(this.(Trees::CallableTree).getBodyChild(i), last, c) and + not exists(this.(Trees::CallableTree).getBodyChild(i + 1)) + ) + or + exists(AstNode child | + child = this.(Trees::CallableTree).getBodyChild(_) and + not child = this.getBody() and + last(child, last, c) and + not c instanceof NormalCompletion + ) } } @@ -159,10 +161,6 @@ module Trees { } private class BeginTree extends BodyStmtTree instanceof BeginExpr { - final override predicate first(AstNode first) { this.firstInner(first) } - - final override predicate last(AstNode last, Completion c) { this.lastInner(last, c) } - final override predicate propagatesAbnormal(AstNode child) { none() } } @@ -196,16 +194,14 @@ module Trees { private class BlockParameterTree extends NonDefaultValueParameterTree instanceof BlockParameter { } - abstract class BodyStmtTree extends StmtSequenceTree instanceof BodyStmt { + class BodyStmtTree extends StmtSequenceTree instanceof BodyStmt { /** Gets a rescue clause in this block. */ final RescueClause getARescue() { result = super.getRescue(_) } /** Gets the `ensure` clause in this block, if any. */ final StmtSequence getEnsure() { result = super.getEnsure() } - override predicate first(AstNode first) { first = this } - - predicate firstInner(AstNode first) { + override predicate first(AstNode first) { first(this.getBodyChild(0, _), first) or not exists(this.getBodyChild(_, _)) and @@ -217,7 +213,7 @@ module Trees { ) } - predicate lastInner(AstNode last, Completion c) { + override predicate last(AstNode last, Completion c) { exists(boolean ensurable | last = this.getAnEnsurePredecessor(c, ensurable) | not super.hasEnsure() or @@ -387,27 +383,28 @@ module Trees { private class BooleanLiteralTree extends LeafTree instanceof BooleanLiteral { } - class BraceBlockTree extends StmtSequenceTree instanceof BraceBlock { - final override predicate propagatesAbnormal(AstNode child) { none() } - - final override AstNode getBodyChild(int i, boolean rescuable) { - result = super.getParameter(i) and rescuable = false + class BraceBlockTree extends CallableTree instanceof BraceBlock { + final override AstNode getBodyChild(int i) { + result = super.getParameter(i) or - result = super.getLocalVariable(i - super.getNumberOfParameters()) and rescuable = false + result = super.getLocalVariable(i - super.getNumberOfParameters()) or - result = - StmtSequenceTree.super - .getBodyChild(i - super.getNumberOfParameters() - count(super.getALocalVariable()), - rescuable) + result = super.getBody() and + i = super.getNumberOfParameters() + count(super.getALocalVariable()) } + } + + class CallableTree extends PostOrderTree instanceof Callable { + final override predicate propagatesAbnormal(AstNode child) { none() } override predicate first(AstNode first) { first = this } + abstract AstNode getBodyChild(int i); + override predicate succ(AstNode pred, AstNode succ, Completion c) { - // Normal left-to-right evaluation in the body exists(int i | - last(this.getBodyChild(i, _), pred, c) and - first(this.getBodyChild(i + 1, _), succ) and + last(this.getBodyChild(i), pred, c) and + first(this.getBodyChild(i + 1), succ) and c instanceof NormalCompletion ) } @@ -1016,20 +1013,16 @@ module Trees { final override predicate succ(AstNode pred, AstNode succ, Completion c) { none() } } - private class DoBlockTree extends BodyStmtTree instanceof DoBlock { + private class DoBlockTree extends CallableTree instanceof DoBlock { /** Gets the `i`th child in the body of this block. */ - final override AstNode getBodyChild(int i, boolean rescuable) { - result = super.getParameter(i) and rescuable = false + final override AstNode getBodyChild(int i) { + result = super.getParameter(i) or - result = super.getLocalVariable(i - super.getNumberOfParameters()) and rescuable = false + result = super.getLocalVariable(i - super.getNumberOfParameters()) or - result = - BodyStmtTree.super - .getBodyChild(i - super.getNumberOfParameters() - count(super.getALocalVariable()), - rescuable) + result = super.getBody() and + i = super.getNumberOfParameters() + count(super.getALocalVariable()) } - - override predicate propagatesAbnormal(AstNode child) { none() } } private class EmptyStatementTree extends LeafTree instanceof EmptyStmt { } @@ -1073,14 +1066,12 @@ module Trees { final override AstNode getAccessNode() { result = super.getDefiningAccess() } } - private class LambdaTree extends BodyStmtTree instanceof Lambda { - final override predicate propagatesAbnormal(AstNode child) { none() } - + private class LambdaTree extends CallableTree instanceof Lambda { /** Gets the `i`th child in the body of this block. */ - final override AstNode getBodyChild(int i, boolean rescuable) { - result = super.getParameter(i) and rescuable = false + final override AstNode getBodyChild(int i) { + result = super.getParameter(i) or - result = BodyStmtTree.super.getBodyChild(i - super.getNumberOfParameters(), rescuable) + result = super.getBody() and i = super.getNumberOfParameters() } } @@ -1151,14 +1142,12 @@ module Trees { private class MethodNameTree extends LeafTree instanceof MethodName, AstInternal::TTokenMethodName { } - private class MethodTree extends BodyStmtTree instanceof Method { - final override predicate propagatesAbnormal(AstNode child) { none() } - + private class MethodTree extends CallableTree instanceof Method { /** Gets the `i`th child in the body of this block. */ - final override AstNode getBodyChild(int i, boolean rescuable) { - result = super.getParameter(i) and rescuable = false + final override AstNode getBodyChild(int i) { + result = super.getParameter(i) or - result = BodyStmtTree.super.getBodyChild(i - super.getNumberOfParameters(), rescuable) + result = super.getBody() and i = super.getNumberOfParameters() } } @@ -1183,12 +1172,12 @@ module Trees { BodyStmtTree.super.succ(pred, succ, c) or pred = this and - this.firstInner(succ) and + super.first(succ) and c instanceof SimpleCompletion } final override predicate last(AstNode last, Completion c) { - this.lastInner(last, c) + super.last(last, c) or not exists(this.getAChild(_)) and last = this and @@ -1328,7 +1317,7 @@ module Trees { private class SingletonClassTree extends BodyStmtTree instanceof SingletonClass { final override predicate first(AstNode first) { - this.firstInner(first) + super.first(first) or not exists(this.getAChild(_)) and first = this @@ -1338,7 +1327,12 @@ module Trees { BodyStmtTree.super.succ(pred, succ, c) or succ = this and - this.lastInner(pred, c) + super.last(pred, c) + } + + final override predicate last(AstNode last, Completion c) { + last = this and + c.isValidFor(this) } /** Gets the `i`th child in the body of this block. */ @@ -1351,20 +1345,18 @@ module Trees { } } - private class SingletonMethodTree extends BodyStmtTree instanceof SingletonMethod { - final override predicate propagatesAbnormal(AstNode child) { none() } - + private class SingletonMethodTree extends CallableTree instanceof SingletonMethod { /** Gets the `i`th child in the body of this block. */ - final override AstNode getBodyChild(int i, boolean rescuable) { - result = super.getParameter(i) and rescuable = false + final override AstNode getBodyChild(int i) { + result = super.getParameter(i) or - result = BodyStmtTree.super.getBodyChild(i - super.getNumberOfParameters(), rescuable) + result = super.getBody() and i = super.getNumberOfParameters() } override predicate first(AstNode first) { first(super.getObject(), first) } override predicate succ(AstNode pred, AstNode succ, Completion c) { - BodyStmtTree.super.succ(pred, succ, c) + CallableTree.super.succ(pred, succ, c) or last(super.getObject(), pred, c) and succ = this and @@ -1443,10 +1435,6 @@ module Trees { or result = BodyStmtTree.super.getBodyChild(i - count(super.getABeginBlock()), rescuable) } - - final override predicate first(AstNode first) { super.firstInner(first) } - - final override predicate last(AstNode last, Completion c) { super.lastInner(last, c) } } private class UndefStmtTree extends StandardPreOrderTree instanceof UndefStmt { diff --git a/ruby/ql/lib/codeql/ruby/controlflow/internal/Splitting.qll b/ruby/ql/lib/codeql/ruby/controlflow/internal/Splitting.qll index 782315dc14c..737f450b4f2 100644 --- a/ruby/ql/lib/codeql/ruby/controlflow/internal/Splitting.qll +++ b/ruby/ql/lib/codeql/ruby/controlflow/internal/Splitting.qll @@ -246,7 +246,7 @@ module EnsureSplitting { private predicate exit0(AstNode pred, Trees::BodyStmtTree block, int nestLevel, Completion c) { this.appliesToPredecessor(pred) and nestLevel = block.getNestLevel() and - block.lastInner(pred, c) + block.last(pred, c) } /** From 3adb7043e8c94f4c7ca86c8b6c679ca058be1bda Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 22 May 2026 13:29:45 +0200 Subject: [PATCH 47/85] Ruby: Fix pre-existing bug. --- .../ruby/controlflow/internal/ControlFlowGraphImpl.qll | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll b/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll index 63198a17cf7..9658c51d673 100644 --- a/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll +++ b/ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll @@ -205,12 +205,7 @@ module Trees { first(this.getBodyChild(0, _), first) or not exists(this.getBodyChild(_, _)) and - ( - first(super.getRescue(_), first) - or - not exists(super.getRescue(_)) and - first(super.getEnsure(), first) - ) + first(super.getEnsure(), first) } override predicate last(AstNode last, Completion c) { From e07f45fff4f7417411d449cc7ec8bf0b6eb7a587 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 22 May 2026 13:36:59 +0200 Subject: [PATCH 48/85] Ruby: Accept test changes. --- ruby/ql/test/library-tests/ast/Ast.expected | 761 ++++++++++-------- .../library-tests/ast/AstDesugar.expected | 277 ++++--- .../library-tests/modules/methods.expected | 95 +++ .../library-tests/modules/modules.expected | 114 +++ 4 files changed, 762 insertions(+), 485 deletions(-) diff --git a/ruby/ql/test/library-tests/ast/Ast.expected b/ruby/ql/test/library-tests/ast/Ast.expected index 0bece506bfb..c391b7f584d 100644 --- a/ruby/ql/test/library-tests/ast/Ast.expected +++ b/ruby/ql/test/library-tests/ast/Ast.expected @@ -15,18 +15,19 @@ gems/Gemfile: # 5| getArgument: [StringLiteral] "https://gems.example.com" # 5| getComponent: [StringTextComponent] https://gems.example.com # 5| getBlock: [DoBlock] do ... end -# 6| getStmt: [MethodCall] call to gem -# 6| getReceiver: [SelfVariableAccess] self -# 6| getArgument: [StringLiteral] "my_gem" -# 6| getComponent: [StringTextComponent] my_gem -# 6| getArgument: [StringLiteral] "1.0" -# 6| getComponent: [StringTextComponent] 1.0 -# 7| getStmt: [MethodCall] call to gem -# 7| getReceiver: [SelfVariableAccess] self -# 7| getArgument: [StringLiteral] "another_gem" -# 7| getComponent: [StringTextComponent] another_gem -# 7| getArgument: [StringLiteral] "3.1.4" -# 7| getComponent: [StringTextComponent] 3.1.4 +# 6| getBody: [StmtSequence] ... +# 6| getStmt: [MethodCall] call to gem +# 6| getReceiver: [SelfVariableAccess] self +# 6| getArgument: [StringLiteral] "my_gem" +# 6| getComponent: [StringTextComponent] my_gem +# 6| getArgument: [StringLiteral] "1.0" +# 6| getComponent: [StringTextComponent] 1.0 +# 7| getStmt: [MethodCall] call to gem +# 7| getReceiver: [SelfVariableAccess] self +# 7| getArgument: [StringLiteral] "another_gem" +# 7| getComponent: [StringTextComponent] another_gem +# 7| getArgument: [StringLiteral] "3.1.4" +# 7| getComponent: [StringTextComponent] 3.1.4 calls/calls.rb: # 1| [Toplevel] calls.rb # 2| getStmt: [MethodCall] call to foo @@ -45,17 +46,19 @@ calls/calls.rb: # 14| getBlock: [BraceBlock] { ... } # 14| getParameter: [SimpleParameter] x # 14| getDefiningAccess: [LocalVariableAccess] x -# 14| getStmt: [AddExpr] ... + ... -# 14| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 14| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 14| getBody: [StmtSequence] ... +# 14| getStmt: [AddExpr] ... + ... +# 14| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 14| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 # 17| getStmt: [MethodCall] call to foo # 17| getReceiver: [SelfVariableAccess] self # 17| getBlock: [DoBlock] do ... end # 17| getParameter: [SimpleParameter] x # 17| getDefiningAccess: [LocalVariableAccess] x -# 18| getStmt: [AddExpr] ... + ... -# 18| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 18| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 18| getBody: [StmtSequence] ... +# 18| getStmt: [AddExpr] ... + ... +# 18| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 18| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 # 22| getStmt: [MethodCall] call to bar # 22| getReceiver: [IntegerLiteral] 123 # 22| getArgument: [StringLiteral] "foo" @@ -63,15 +66,18 @@ calls/calls.rb: # 22| getBlock: [DoBlock] do ... end # 22| getParameter: [SimpleParameter] x # 22| getDefiningAccess: [LocalVariableAccess] x -# 23| getStmt: [AddExpr] ... + ... -# 23| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 23| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 23| getBody: [StmtSequence] ... +# 23| getStmt: [AddExpr] ... + ... +# 23| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 23| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 # 27| getStmt: [Method] method_that_yields -# 28| getStmt: [YieldCall] yield ... +# 28| getBody: [StmtSequence] ... +# 28| getStmt: [YieldCall] yield ... # 32| getStmt: [Method] another_method_that_yields -# 33| getStmt: [YieldCall] yield ... -# 33| getArgument: [IntegerLiteral] 100 -# 33| getArgument: [IntegerLiteral] 200 +# 33| getBody: [StmtSequence] ... +# 33| getStmt: [YieldCall] yield ... +# 33| getArgument: [IntegerLiteral] 100 +# 33| getArgument: [IntegerLiteral] 200 # 43| getStmt: [MethodCall] call to foo # 43| getReceiver: [SelfVariableAccess] self # 44| getStmt: [MethodCall] call to foo @@ -148,17 +154,19 @@ calls/calls.rb: # 89| getStmt: [MethodCall] call to foo # 89| getReceiver: [SelfVariableAccess] self # 89| getBlock: [BraceBlock] { ... } -# 89| getStmt: [MethodCall] call to bar -# 89| getReceiver: [SelfVariableAccess] self -# 89| getStmt: [MethodCall] call to baz -# 89| getReceiver: [ConstantReadAccess] X +# 89| getBody: [StmtSequence] ... +# 89| getStmt: [MethodCall] call to bar +# 89| getReceiver: [SelfVariableAccess] self +# 89| getStmt: [MethodCall] call to baz +# 89| getReceiver: [ConstantReadAccess] X # 92| getStmt: [MethodCall] call to foo # 92| getReceiver: [SelfVariableAccess] self # 92| getBlock: [DoBlock] do ... end -# 93| getStmt: [MethodCall] call to bar -# 93| getReceiver: [SelfVariableAccess] self -# 94| getStmt: [MethodCall] call to baz -# 94| getReceiver: [ConstantReadAccess] X +# 93| getBody: [StmtSequence] ... +# 93| getStmt: [MethodCall] call to bar +# 93| getReceiver: [SelfVariableAccess] self +# 94| getStmt: [MethodCall] call to baz +# 94| getReceiver: [ConstantReadAccess] X # 98| getStmt: [MethodCall] call to bar # 98| getReceiver: [MethodCall] call to foo # 98| getReceiver: [SelfVariableAccess] self @@ -205,17 +213,19 @@ calls/calls.rb: # 129| getStmt: [MethodCall] call to bar # 129| getReceiver: [ConstantReadAccess] X # 133| getStmt: [Method] some_method -# 134| getStmt: [MethodCall] call to foo -# 134| getReceiver: [SelfVariableAccess] self -# 135| getStmt: [MethodCall] call to bar -# 135| getReceiver: [ConstantReadAccess] X +# 134| getBody: [StmtSequence] ... +# 134| getStmt: [MethodCall] call to foo +# 134| getReceiver: [SelfVariableAccess] self +# 135| getStmt: [MethodCall] call to bar +# 135| getReceiver: [ConstantReadAccess] X # 139| getStmt: [SingletonMethod] some_method # 139| getObject: [MethodCall] call to foo # 139| getReceiver: [SelfVariableAccess] self -# 140| getStmt: [MethodCall] call to bar -# 140| getReceiver: [SelfVariableAccess] self -# 141| getStmt: [MethodCall] call to baz -# 141| getReceiver: [ConstantReadAccess] X +# 140| getBody: [StmtSequence] ... +# 140| getStmt: [MethodCall] call to bar +# 140| getReceiver: [SelfVariableAccess] self +# 141| getStmt: [MethodCall] call to baz +# 141| getReceiver: [ConstantReadAccess] X # 145| getStmt: [Method] method_with_keyword_param # 145| getParameter: [KeywordParameter] keyword # 145| getDefiningAccess: [LocalVariableAccess] keyword @@ -500,56 +510,62 @@ calls/calls.rb: # 278| getReceiver: [ConstantReadAccess] X # 283| getStmt: [ClassDeclaration] MyClass # 284| getStmt: [Method] my_method -# 285| getStmt: [SuperCall] super call to my_method -# 286| getStmt: [SuperCall] super call to my_method -# 287| getStmt: [SuperCall] super call to my_method -# 287| getArgument: [StringLiteral] "blah" -# 287| getComponent: [StringTextComponent] blah -# 288| getStmt: [SuperCall] super call to my_method -# 288| getArgument: [IntegerLiteral] 1 -# 288| getArgument: [IntegerLiteral] 2 -# 288| getArgument: [IntegerLiteral] 3 -# 289| getStmt: [SuperCall] super call to my_method -# 289| getBlock: [BraceBlock] { ... } -# 289| getParameter: [SimpleParameter] x -# 289| getDefiningAccess: [LocalVariableAccess] x -# 289| getStmt: [AddExpr] ... + ... -# 289| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 289| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 -# 290| getStmt: [SuperCall] super call to my_method -# 290| getBlock: [DoBlock] do ... end -# 290| getParameter: [SimpleParameter] x -# 290| getDefiningAccess: [LocalVariableAccess] x -# 290| getStmt: [MulExpr] ... * ... -# 290| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 290| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 2 -# 291| getStmt: [SuperCall] super call to my_method -# 291| getArgument: [IntegerLiteral] 4 -# 291| getArgument: [IntegerLiteral] 5 -# 291| getBlock: [BraceBlock] { ... } -# 291| getParameter: [SimpleParameter] x -# 291| getDefiningAccess: [LocalVariableAccess] x -# 291| getStmt: [AddExpr] ... + ... -# 291| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 291| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 100 -# 292| getStmt: [SuperCall] super call to my_method -# 292| getArgument: [IntegerLiteral] 6 -# 292| getArgument: [IntegerLiteral] 7 -# 292| getBlock: [DoBlock] do ... end -# 292| getParameter: [SimpleParameter] x -# 292| getDefiningAccess: [LocalVariableAccess] x -# 292| getStmt: [AddExpr] ... + ... -# 292| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 292| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 200 +# 285| getBody: [StmtSequence] ... +# 285| getStmt: [SuperCall] super call to my_method +# 286| getStmt: [SuperCall] super call to my_method +# 287| getStmt: [SuperCall] super call to my_method +# 287| getArgument: [StringLiteral] "blah" +# 287| getComponent: [StringTextComponent] blah +# 288| getStmt: [SuperCall] super call to my_method +# 288| getArgument: [IntegerLiteral] 1 +# 288| getArgument: [IntegerLiteral] 2 +# 288| getArgument: [IntegerLiteral] 3 +# 289| getStmt: [SuperCall] super call to my_method +# 289| getBlock: [BraceBlock] { ... } +# 289| getParameter: [SimpleParameter] x +# 289| getDefiningAccess: [LocalVariableAccess] x +# 289| getBody: [StmtSequence] ... +# 289| getStmt: [AddExpr] ... + ... +# 289| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 289| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 290| getStmt: [SuperCall] super call to my_method +# 290| getBlock: [DoBlock] do ... end +# 290| getParameter: [SimpleParameter] x +# 290| getDefiningAccess: [LocalVariableAccess] x +# 290| getBody: [StmtSequence] ... +# 290| getStmt: [MulExpr] ... * ... +# 290| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 290| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 2 +# 291| getStmt: [SuperCall] super call to my_method +# 291| getArgument: [IntegerLiteral] 4 +# 291| getArgument: [IntegerLiteral] 5 +# 291| getBlock: [BraceBlock] { ... } +# 291| getParameter: [SimpleParameter] x +# 291| getDefiningAccess: [LocalVariableAccess] x +# 291| getBody: [StmtSequence] ... +# 291| getStmt: [AddExpr] ... + ... +# 291| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 291| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 100 +# 292| getStmt: [SuperCall] super call to my_method +# 292| getArgument: [IntegerLiteral] 6 +# 292| getArgument: [IntegerLiteral] 7 +# 292| getBlock: [DoBlock] do ... end +# 292| getParameter: [SimpleParameter] x +# 292| getDefiningAccess: [LocalVariableAccess] x +# 292| getBody: [StmtSequence] ... +# 292| getStmt: [AddExpr] ... + ... +# 292| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 292| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 200 # 300| getStmt: [ClassDeclaration] AnotherClass # 301| getStmt: [Method] another_method -# 302| getStmt: [MethodCall] call to super -# 302| getReceiver: [MethodCall] call to foo -# 302| getReceiver: [SelfVariableAccess] self -# 303| getStmt: [MethodCall] call to super -# 303| getReceiver: [SelfVariableAccess] self -# 304| getStmt: [MethodCall] call to super -# 304| getReceiver: [SuperCall] super call to another_method +# 302| getBody: [StmtSequence] ... +# 302| getStmt: [MethodCall] call to super +# 302| getReceiver: [MethodCall] call to foo +# 302| getReceiver: [SelfVariableAccess] self +# 303| getStmt: [MethodCall] call to super +# 303| getReceiver: [SelfVariableAccess] self +# 304| getStmt: [MethodCall] call to super +# 304| getReceiver: [SuperCall] super call to another_method # 309| getStmt: [MethodCall] call to call # 309| getReceiver: [MethodCall] call to foo # 309| getReceiver: [SelfVariableAccess] self @@ -619,49 +635,57 @@ calls/calls.rb: # 319| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 # 319| getAnOperand/getRightOperand: [IntegerLiteral] 2 # 322| getStmt: [Method] foo -# 322| getStmt: [MethodCall] call to bar -# 322| getReceiver: [SelfVariableAccess] self +# 322| getBody: [StmtSequence] ... +# 322| getStmt: [MethodCall] call to bar +# 322| getReceiver: [SelfVariableAccess] self # 323| getStmt: [Method] foo -# 323| getStmt: [MethodCall] call to bar -# 323| getReceiver: [SelfVariableAccess] self +# 323| getBody: [StmtSequence] ... +# 323| getStmt: [MethodCall] call to bar +# 323| getReceiver: [SelfVariableAccess] self # 324| getStmt: [Method] foo +# 324| getBody: [StmtSequence] ... +# 324| getStmt: [MethodCall] call to bar +# 324| getReceiver: [SelfVariableAccess] self # 324| getParameter: [SimpleParameter] x # 324| getDefiningAccess: [LocalVariableAccess] x -# 324| getStmt: [MethodCall] call to bar -# 324| getReceiver: [SelfVariableAccess] self # 325| getStmt: [SingletonMethod] foo +# 325| getBody: [StmtSequence] ... +# 325| getStmt: [MethodCall] call to bar +# 325| getReceiver: [SelfVariableAccess] self # 325| getObject: [ConstantReadAccess] Object -# 325| getStmt: [MethodCall] call to bar -# 325| getReceiver: [SelfVariableAccess] self # 326| getStmt: [SingletonMethod] foo +# 326| getBody: [StmtSequence] ... +# 326| getStmt: [MethodCall] call to bar +# 326| getReceiver: [SelfVariableAccess] self # 326| getObject: [ConstantReadAccess] Object # 326| getParameter: [SimpleParameter] x # 326| getDefiningAccess: [LocalVariableAccess] x -# 326| getStmt: [MethodCall] call to bar -# 326| getReceiver: [SelfVariableAccess] self # 327| getStmt: [Method] foo -# 327| getStmt: [RescueModifierExpr] ... rescue ... -# 327| getBody: [MethodCall] call to bar -# 327| getReceiver: [SelfVariableAccess] self -# 327| getHandler: [ParenthesizedExpr] ( ... ) -# 327| getStmt: [MethodCall] call to print +# 327| getBody: [StmtSequence] ... +# 327| getStmt: [RescueModifierExpr] ... rescue ... +# 327| getBody: [MethodCall] call to bar # 327| getReceiver: [SelfVariableAccess] self -# 327| getArgument: [StringLiteral] "error" -# 327| getComponent: [StringTextComponent] error +# 327| getHandler: [ParenthesizedExpr] ( ... ) +# 327| getStmt: [MethodCall] call to print +# 327| getReceiver: [SelfVariableAccess] self +# 327| getArgument: [StringLiteral] "error" +# 327| getComponent: [StringTextComponent] error # 330| getStmt: [Method] foo # 330| getParameter: [ForwardParameter] ... -# 331| getStmt: [SuperCall] super call to foo -# 331| getArgument: [ForwardedArguments] ... +# 331| getBody: [StmtSequence] ... +# 331| getStmt: [SuperCall] super call to foo +# 331| getArgument: [ForwardedArguments] ... # 334| getStmt: [Method] foo # 334| getParameter: [SimpleParameter] a # 334| getDefiningAccess: [LocalVariableAccess] a # 334| getParameter: [SimpleParameter] b # 334| getDefiningAccess: [LocalVariableAccess] b # 334| getParameter: [ForwardParameter] ... -# 335| getStmt: [MethodCall] call to bar -# 335| getReceiver: [SelfVariableAccess] self -# 335| getArgument: [LocalVariableAccess] b -# 335| getArgument: [ForwardedArguments] ... +# 335| getBody: [StmtSequence] ... +# 335| getStmt: [MethodCall] call to bar +# 335| getReceiver: [SelfVariableAccess] self +# 335| getArgument: [LocalVariableAccess] b +# 335| getArgument: [ForwardedArguments] ... # 339| getStmt: [ForExpr] for ... in ... # 339| getPattern: [DestructuredLhsExpr] (..., ...) # 339| getElement: [LocalVariableAccess] x @@ -718,31 +742,35 @@ calls/calls.rb: # 350| getAnOperand/getRightOperand: [Lambda] -> { ... } # 350| getParameter: [SimpleParameter] x # 350| getDefiningAccess: [LocalVariableAccess] x -# 350| getStmt: [LocalVariableAccess] y +# 350| getBody: [StmtSequence] ... +# 350| getStmt: [LocalVariableAccess] y # 351| getStmt: [AssignExpr] ... = ... # 351| getAnOperand/getLeftOperand: [LocalVariableAccess] f # 351| getAnOperand/getRightOperand: [Lambda] -> { ... } # 351| getParameter: [SimpleParameter] x # 351| getDefiningAccess: [LocalVariableAccess] x -# 351| getStmt: [MethodCall] call to foo -# 351| getReceiver: [SelfVariableAccess] self -# 351| getArgument: [LocalVariableAccess] x +# 351| getBody: [StmtSequence] ... +# 351| getStmt: [MethodCall] call to foo +# 351| getReceiver: [SelfVariableAccess] self +# 351| getArgument: [LocalVariableAccess] x # 352| getStmt: [AssignExpr] ... = ... # 352| getAnOperand/getLeftOperand: [LocalVariableAccess] g # 352| getAnOperand/getRightOperand: [Lambda] -> { ... } # 352| getParameter: [SimpleParameter] x # 352| getDefiningAccess: [LocalVariableAccess] x -# 352| getStmt: [MethodCall] call to unknown_call -# 352| getReceiver: [SelfVariableAccess] self +# 352| getBody: [StmtSequence] ... +# 352| getStmt: [MethodCall] call to unknown_call +# 352| getReceiver: [SelfVariableAccess] self # 353| getStmt: [AssignExpr] ... = ... # 353| getAnOperand/getLeftOperand: [LocalVariableAccess] h # 353| getAnOperand/getRightOperand: [Lambda] -> { ... } # 353| getParameter: [SimpleParameter] x # 353| getDefiningAccess: [LocalVariableAccess] x -# 354| getStmt: [LocalVariableAccess] x -# 355| getStmt: [LocalVariableAccess] y -# 356| getStmt: [MethodCall] call to unknown_call -# 356| getReceiver: [SelfVariableAccess] self +# 354| getBody: [StmtSequence] ... +# 354| getStmt: [LocalVariableAccess] x +# 355| getStmt: [LocalVariableAccess] y +# 356| getStmt: [MethodCall] call to unknown_call +# 356| getReceiver: [SelfVariableAccess] self # 360| getStmt: [MethodCall] call to empty? # 360| getReceiver: [MethodCall] call to list # 360| getReceiver: [SelfVariableAccess] self @@ -760,7 +788,8 @@ calls/calls.rb: # 363| getBlock: [BraceBlock] { ... } # 363| getParameter: [SimpleParameter] x # 363| getDefiningAccess: [LocalVariableAccess] x -# 363| getStmt: [LocalVariableAccess] x +# 363| getBody: [StmtSequence] ... +# 363| getStmt: [LocalVariableAccess] x control/cases.rb: # 1| [Toplevel] cases.rb # 2| getStmt: [AssignExpr] ... = ... @@ -1094,9 +1123,10 @@ control/cases.rb: # 101| getPattern: [Lambda] -> { ... } # 101| getParameter: [SimpleParameter] x # 101| getDefiningAccess: [LocalVariableAccess] x -# 101| getStmt: [EqExpr] ... == ... -# 101| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 101| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 10 +# 101| getBody: [StmtSequence] ... +# 101| getStmt: [EqExpr] ... == ... +# 101| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 101| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 10 # 102| getBranch: [InClause] in ... then ... # 102| getPattern: [SymbolLiteral] :foo # 102| getComponent: [StringTextComponent] foo @@ -1301,15 +1331,17 @@ modules/classes.rb: # 16| getScopeExpr: [ConstantReadAccess] MyModule # 20| getStmt: [ClassDeclaration] Wibble # 21| getStmt: [Method] method_a -# 22| getStmt: [MethodCall] call to puts -# 22| getReceiver: [SelfVariableAccess] self -# 22| getArgument: [StringLiteral] "a" -# 22| getComponent: [StringTextComponent] a +# 22| getBody: [StmtSequence] ... +# 22| getStmt: [MethodCall] call to puts +# 22| getReceiver: [SelfVariableAccess] self +# 22| getArgument: [StringLiteral] "a" +# 22| getComponent: [StringTextComponent] a # 25| getStmt: [Method] method_b -# 26| getStmt: [MethodCall] call to puts -# 26| getReceiver: [SelfVariableAccess] self -# 26| getArgument: [StringLiteral] "b" -# 26| getComponent: [StringTextComponent] b +# 26| getBody: [StmtSequence] ... +# 26| getStmt: [MethodCall] call to puts +# 26| getReceiver: [SelfVariableAccess] self +# 26| getArgument: [StringLiteral] "b" +# 26| getComponent: [StringTextComponent] b # 29| getStmt: [MethodCall] call to some_method_call # 29| getReceiver: [SelfVariableAccess] self # 30| getStmt: [AssignExpr] ... = ... @@ -1324,14 +1356,16 @@ modules/classes.rb: # 41| getStmt: [SingletonClass] class << ... # 41| getValue: [LocalVariableAccess] x # 42| getStmt: [Method] length -# 43| getStmt: [MulExpr] ... * ... -# 43| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 100 -# 43| getAnOperand/getArgument/getRightOperand: [SuperCall] super call to length +# 43| getBody: [StmtSequence] ... +# 43| getStmt: [MulExpr] ... * ... +# 43| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 100 +# 43| getAnOperand/getArgument/getRightOperand: [SuperCall] super call to length # 46| getStmt: [Method] wibble -# 47| getStmt: [MethodCall] call to puts -# 47| getReceiver: [SelfVariableAccess] self -# 47| getArgument: [StringLiteral] "wibble" -# 47| getComponent: [StringTextComponent] wibble +# 47| getBody: [StmtSequence] ... +# 47| getStmt: [MethodCall] call to puts +# 47| getReceiver: [SelfVariableAccess] self +# 47| getArgument: [StringLiteral] "wibble" +# 47| getComponent: [StringTextComponent] wibble # 50| getStmt: [MethodCall] call to another_method_call # 50| getReceiver: [SelfVariableAccess] self # 51| getStmt: [AssignExpr] ... = ... @@ -1533,32 +1567,34 @@ constants/constants.rb: # 17| getAnOperand/getArgument/getRightOperand: [ConstantReadAccess] CONST_B # 17| getScopeExpr: [ConstantReadAccess] ModuleA # 19| getStmt: [Method] foo -# 20| getStmt: [AssignExpr] ... = ... -# 20| getAnOperand/getLeftOperand: [ConstantAssignment] Names -# 20| getAnOperand/getRightOperand: [ArrayLiteral] [...] -# 20| getElement: [StringLiteral] "Vera" -# 20| getComponent: [StringTextComponent] Vera -# 20| getElement: [StringLiteral] "Chuck" -# 20| getComponent: [StringTextComponent] Chuck -# 20| getElement: [StringLiteral] "Dave" -# 20| getComponent: [StringTextComponent] Dave -# 22| getStmt: [MethodCall] call to each -# 22| getReceiver: [ConstantReadAccess] Names -# 22| getBlock: [DoBlock] do ... end -# 22| getParameter: [SimpleParameter] name -# 22| getDefiningAccess: [LocalVariableAccess] name -# 23| getStmt: [MethodCall] call to puts -# 23| getReceiver: [SelfVariableAccess] self -# 23| getArgument: [StringLiteral] "#{...} #{...}" -# 23| getComponent: [StringInterpolationComponent] #{...} -# 23| getStmt: [ConstantReadAccess] GREETING -# 23| getComponent: [StringTextComponent] -# 23| getComponent: [StringInterpolationComponent] #{...} -# 23| getStmt: [LocalVariableAccess] name -# 28| getStmt: [MethodCall] call to Array -# 28| getReceiver: [SelfVariableAccess] self -# 28| getArgument: [StringLiteral] "foo" -# 28| getComponent: [StringTextComponent] foo +# 20| getBody: [StmtSequence] ... +# 20| getStmt: [AssignExpr] ... = ... +# 20| getAnOperand/getLeftOperand: [ConstantAssignment] Names +# 20| getAnOperand/getRightOperand: [ArrayLiteral] [...] +# 20| getElement: [StringLiteral] "Vera" +# 20| getComponent: [StringTextComponent] Vera +# 20| getElement: [StringLiteral] "Chuck" +# 20| getComponent: [StringTextComponent] Chuck +# 20| getElement: [StringLiteral] "Dave" +# 20| getComponent: [StringTextComponent] Dave +# 22| getStmt: [MethodCall] call to each +# 22| getReceiver: [ConstantReadAccess] Names +# 22| getBlock: [DoBlock] do ... end +# 22| getParameter: [SimpleParameter] name +# 22| getDefiningAccess: [LocalVariableAccess] name +# 23| getBody: [StmtSequence] ... +# 23| getStmt: [MethodCall] call to puts +# 23| getReceiver: [SelfVariableAccess] self +# 23| getArgument: [StringLiteral] "#{...} #{...}" +# 23| getComponent: [StringInterpolationComponent] #{...} +# 23| getStmt: [ConstantReadAccess] GREETING +# 23| getComponent: [StringTextComponent] +# 23| getComponent: [StringInterpolationComponent] #{...} +# 23| getStmt: [LocalVariableAccess] name +# 28| getStmt: [MethodCall] call to Array +# 28| getReceiver: [SelfVariableAccess] self +# 28| getArgument: [StringLiteral] "foo" +# 28| getComponent: [StringTextComponent] foo # 31| getStmt: [ClassDeclaration] ClassD # 31| getScopeExpr: [ConstantReadAccess] ModuleA # 31| getSuperclassExpr: [ConstantReadAccess] ClassA @@ -2309,14 +2345,15 @@ literals/literals.rb: # 171| getComponent: [StringTextComponent] # 171| # 174| getStmt: [Method] m -# 175| getStmt: [AssignExpr] ... = ... -# 175| getAnOperand/getLeftOperand: [LocalVariableAccess] query -# 175| getAnOperand/getRightOperand: [HereDoc] <<-BLA -# 175| getComponent: [StringTextComponent] -# 175| some text -# 176| getComponent: [StringEscapeSequenceComponent] \n -# 176| getComponent: [StringTextComponent] and some more -# 176| +# 175| getBody: [StmtSequence] ... +# 175| getStmt: [AssignExpr] ... = ... +# 175| getAnOperand/getLeftOperand: [LocalVariableAccess] query +# 175| getAnOperand/getRightOperand: [HereDoc] <<-BLA +# 175| getComponent: [StringTextComponent] +# 175| some text +# 176| getComponent: [StringEscapeSequenceComponent] \n +# 176| getComponent: [StringTextComponent] and some more +# 176| # 180| getStmt: [AssignExpr] ... = ... # 180| getAnOperand/getLeftOperand: [LocalVariableAccess] query # 180| getAnOperand/getRightOperand: [HereDoc] <<~SQUIGGLY @@ -2648,9 +2685,10 @@ modules/modules.rb: # 90| getStmt: [MethodCall] call to module_eval # 90| getReceiver: [ConstantReadAccess] Object # 90| getBlock: [BraceBlock] { ... } -# 90| getStmt: [MethodCall] call to prepend -# 90| getReceiver: [SelfVariableAccess] self -# 90| getArgument: [ConstantReadAccess] Other +# 90| getBody: [StmtSequence] ... +# 90| getStmt: [MethodCall] call to prepend +# 90| getReceiver: [SelfVariableAccess] self +# 90| getArgument: [ConstantReadAccess] Other # 91| getStmt: [ModuleDeclaration] Y # 91| getScopeExpr: [ConstantReadAccess] Foo1 # 95| getStmt: [ModuleDeclaration] IncludeTest2 @@ -2745,26 +2783,27 @@ operations/operations.rb: # 28| getStmt: [DefinedExpr] defined? ... # 28| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] foo # 29| getStmt: [Method] foo -# 29| getStmt: [ReturnStmt] return -# 29| getValue: [ArgumentList] ..., ... -# 29| getElement: [IntegerLiteral] 1 -# 29| getElement: [SplatExpr] * ... -# 29| getAnOperand/getOperand/getReceiver: [ArrayLiteral] [...] -# 29| getElement: [IntegerLiteral] 2 -# 29| getElement: [Pair] Pair -# 29| getKey: [SymbolLiteral] :a -# 29| getComponent: [StringTextComponent] a -# 29| getValue: [IntegerLiteral] 3 -# 29| getElement: [HashSplatExpr] ** ... -# 29| getAnOperand/getOperand/getReceiver: [HashLiteral] {...} -# 29| getElement: [Pair] Pair -# 29| getKey: [SymbolLiteral] :b -# 29| getComponent: [StringTextComponent] b -# 29| getValue: [IntegerLiteral] 4 -# 29| getElement: [Pair] Pair -# 29| getKey: [SymbolLiteral] :c -# 29| getComponent: [StringTextComponent] c -# 29| getValue: [IntegerLiteral] 5 +# 29| getBody: [StmtSequence] ... +# 29| getStmt: [ReturnStmt] return +# 29| getValue: [ArgumentList] ..., ... +# 29| getElement: [IntegerLiteral] 1 +# 29| getElement: [SplatExpr] * ... +# 29| getAnOperand/getOperand/getReceiver: [ArrayLiteral] [...] +# 29| getElement: [IntegerLiteral] 2 +# 29| getElement: [Pair] Pair +# 29| getKey: [SymbolLiteral] :a +# 29| getComponent: [StringTextComponent] a +# 29| getValue: [IntegerLiteral] 3 +# 29| getElement: [HashSplatExpr] ** ... +# 29| getAnOperand/getOperand/getReceiver: [HashLiteral] {...} +# 29| getElement: [Pair] Pair +# 29| getKey: [SymbolLiteral] :b +# 29| getComponent: [StringTextComponent] b +# 29| getValue: [IntegerLiteral] 4 +# 29| getElement: [Pair] Pair +# 29| getKey: [SymbolLiteral] :c +# 29| getComponent: [StringTextComponent] c +# 29| getValue: [IntegerLiteral] 5 # 32| getStmt: [AddExpr] ... + ... # 32| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] w # 32| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 234 @@ -2899,10 +2938,11 @@ operations/operations.rb: # 95| getDefiningAccess: [LocalVariableAccess] a # 95| getParameter: [SimpleParameter] b # 95| getDefiningAccess: [LocalVariableAccess] b -# 96| getStmt: [ReturnStmt] return -# 96| getValue: [LogicalAndExpr] ... && ... -# 96| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a -# 97| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b +# 96| getBody: [StmtSequence] ... +# 96| getStmt: [ReturnStmt] return +# 96| getValue: [LogicalAndExpr] ... && ... +# 96| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a +# 97| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b # 107| getStmt: [ClassDeclaration] X # 108| getStmt: [AssignExpr] ... = ... # 108| getAnOperand/getLeftOperand: [InstanceVariableAccess] @x @@ -2979,14 +3019,15 @@ params/params.rb: # 9| getDefiningAccess: [LocalVariableAccess] key # 9| getParameter: [SimpleParameter] value # 9| getDefiningAccess: [LocalVariableAccess] value -# 10| getStmt: [MethodCall] call to puts -# 10| getReceiver: [SelfVariableAccess] self -# 10| getArgument: [StringLiteral] "#{...} -> #{...}" -# 10| getComponent: [StringInterpolationComponent] #{...} -# 10| getStmt: [LocalVariableAccess] key -# 10| getComponent: [StringTextComponent] -> -# 10| getComponent: [StringInterpolationComponent] #{...} -# 10| getStmt: [LocalVariableAccess] value +# 10| getBody: [StmtSequence] ... +# 10| getStmt: [MethodCall] call to puts +# 10| getReceiver: [SelfVariableAccess] self +# 10| getArgument: [StringLiteral] "#{...} -> #{...}" +# 10| getComponent: [StringInterpolationComponent] #{...} +# 10| getStmt: [LocalVariableAccess] key +# 10| getComponent: [StringTextComponent] -> +# 10| getComponent: [StringInterpolationComponent] #{...} +# 10| getStmt: [LocalVariableAccess] value # 14| getStmt: [AssignExpr] ... = ... # 14| getAnOperand/getLeftOperand: [LocalVariableAccess] sum # 14| getAnOperand/getRightOperand: [Lambda] -> { ... } @@ -2994,9 +3035,10 @@ params/params.rb: # 14| getDefiningAccess: [LocalVariableAccess] foo # 14| getParameter: [SimpleParameter] bar # 14| getDefiningAccess: [LocalVariableAccess] bar -# 14| getStmt: [AddExpr] ... + ... -# 14| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo -# 14| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] bar +# 14| getBody: [StmtSequence] ... +# 14| getStmt: [AddExpr] ... + ... +# 14| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo +# 14| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] bar # 17| getStmt: [Method] destructured_method_param # 17| getParameter: [DestructuredParameter] (..., ...) # 17| getElement: [LocalVariableAccess] a @@ -3011,11 +3053,12 @@ params/params.rb: # 22| getParameter: [DestructuredParameter] (..., ...) # 22| getElement: [LocalVariableAccess] a # 22| getElement: [LocalVariableAccess] b -# 22| getStmt: [MethodCall] call to puts -# 22| getReceiver: [SelfVariableAccess] self -# 22| getArgument: [AddExpr] ... + ... -# 22| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a -# 22| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b +# 22| getBody: [StmtSequence] ... +# 22| getStmt: [MethodCall] call to puts +# 22| getReceiver: [SelfVariableAccess] self +# 22| getArgument: [AddExpr] ... + ... +# 22| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a +# 22| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b # 25| getStmt: [AssignExpr] ... = ... # 25| getAnOperand/getLeftOperand: [LocalVariableAccess] sum_four_values # 25| getAnOperand/getRightOperand: [Lambda] -> { ... } @@ -3025,13 +3068,14 @@ params/params.rb: # 25| getParameter: [DestructuredParameter] (..., ...) # 25| getElement: [LocalVariableAccess] third # 25| getElement: [LocalVariableAccess] fourth -# 26| getStmt: [AddExpr] ... + ... -# 26| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... +# 26| getBody: [StmtSequence] ... +# 26| getStmt: [AddExpr] ... + ... # 26| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... -# 26| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] first -# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] second -# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] third -# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] fourth +# 26| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... +# 26| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] first +# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] second +# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] third +# 26| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] fourth # 30| getStmt: [Method] method_with_splat # 30| getParameter: [SimpleParameter] wibble # 30| getDefiningAccess: [LocalVariableAccess] wibble @@ -3065,26 +3109,28 @@ params/params.rb: # 41| getParameter: [KeywordParameter] bar # 41| getDefiningAccess: [LocalVariableAccess] bar # 41| getDefaultValue: [IntegerLiteral] 7 -# 42| getStmt: [AddExpr] ... + ... -# 42| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... -# 42| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 42| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] foo -# 42| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] bar +# 42| getBody: [StmtSequence] ... +# 42| getStmt: [AddExpr] ... + ... +# 42| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... +# 42| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 42| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] foo +# 42| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] bar # 46| getStmt: [Method] use_block_with_keyword # 46| getParameter: [BlockParameter] &block # 46| getDefiningAccess: [LocalVariableAccess] block -# 47| getStmt: [MethodCall] call to puts -# 47| getReceiver: [SelfVariableAccess] self -# 47| getArgument: [MethodCall] call to call -# 47| getReceiver: [LocalVariableAccess] block -# 47| getArgument: [Pair] Pair -# 47| getKey: [SymbolLiteral] :bar -# 47| getComponent: [StringTextComponent] bar -# 47| getValue: [IntegerLiteral] 2 -# 47| getArgument: [Pair] Pair -# 47| getKey: [SymbolLiteral] :foo -# 47| getComponent: [StringTextComponent] foo -# 47| getValue: [IntegerLiteral] 3 +# 47| getBody: [StmtSequence] ... +# 47| getStmt: [MethodCall] call to puts +# 47| getReceiver: [SelfVariableAccess] self +# 47| getArgument: [MethodCall] call to call +# 47| getReceiver: [LocalVariableAccess] block +# 47| getArgument: [Pair] Pair +# 47| getKey: [SymbolLiteral] :bar +# 47| getComponent: [StringTextComponent] bar +# 47| getValue: [IntegerLiteral] 2 +# 47| getArgument: [Pair] Pair +# 47| getKey: [SymbolLiteral] :foo +# 47| getComponent: [StringTextComponent] foo +# 47| getValue: [IntegerLiteral] 3 # 49| getStmt: [MethodCall] call to use_block_with_keyword # 49| getReceiver: [SelfVariableAccess] self # 49| getBlock: [DoBlock] do ... end @@ -3093,9 +3139,10 @@ params/params.rb: # 49| getParameter: [KeywordParameter] yy # 49| getDefiningAccess: [LocalVariableAccess] yy # 49| getDefaultValue: [IntegerLiteral] 100 -# 50| getStmt: [AddExpr] ... + ... -# 50| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] xx -# 50| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] yy +# 50| getBody: [StmtSequence] ... +# 50| getStmt: [AddExpr] ... + ... +# 50| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] xx +# 50| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] yy # 53| getStmt: [AssignExpr] ... = ... # 53| getAnOperand/getLeftOperand: [LocalVariableAccess] lambda_with_keyword_params # 53| getAnOperand/getRightOperand: [Lambda] -> { ... } @@ -3106,11 +3153,12 @@ params/params.rb: # 53| getParameter: [KeywordParameter] z # 53| getDefiningAccess: [LocalVariableAccess] z # 53| getDefaultValue: [IntegerLiteral] 3 -# 54| getStmt: [AddExpr] ... + ... -# 54| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... -# 54| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 54| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] y -# 54| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] z +# 54| getBody: [StmtSequence] ... +# 54| getStmt: [AddExpr] ... + ... +# 54| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... +# 54| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 54| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] y +# 54| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] z # 58| getStmt: [Method] method_with_optional_params # 58| getParameter: [SimpleParameter] val1 # 58| getDefiningAccess: [LocalVariableAccess] val1 @@ -3123,10 +3171,11 @@ params/params.rb: # 62| getStmt: [Method] use_block_with_optional # 62| getParameter: [BlockParameter] &block # 62| getDefiningAccess: [LocalVariableAccess] block -# 63| getStmt: [MethodCall] call to call -# 63| getReceiver: [LocalVariableAccess] block -# 63| getArgument: [StringLiteral] "Zeus" -# 63| getComponent: [StringTextComponent] Zeus +# 63| getBody: [StmtSequence] ... +# 63| getStmt: [MethodCall] call to call +# 63| getReceiver: [LocalVariableAccess] block +# 63| getArgument: [StringLiteral] "Zeus" +# 63| getComponent: [StringTextComponent] Zeus # 65| getStmt: [MethodCall] call to use_block_with_optional # 65| getReceiver: [SelfVariableAccess] self # 65| getBlock: [DoBlock] do ... end @@ -3135,15 +3184,16 @@ params/params.rb: # 65| getParameter: [OptionalParameter] age # 65| getDefiningAccess: [LocalVariableAccess] age # 65| getDefaultValue: [IntegerLiteral] 99 -# 66| getStmt: [MethodCall] call to puts -# 66| getReceiver: [SelfVariableAccess] self -# 66| getArgument: [StringLiteral] "#{...} is #{...} years old" -# 66| getComponent: [StringInterpolationComponent] #{...} -# 66| getStmt: [LocalVariableAccess] name -# 66| getComponent: [StringTextComponent] is -# 66| getComponent: [StringInterpolationComponent] #{...} -# 66| getStmt: [LocalVariableAccess] age -# 66| getComponent: [StringTextComponent] years old +# 66| getBody: [StmtSequence] ... +# 66| getStmt: [MethodCall] call to puts +# 66| getReceiver: [SelfVariableAccess] self +# 66| getArgument: [StringLiteral] "#{...} is #{...} years old" +# 66| getComponent: [StringInterpolationComponent] #{...} +# 66| getStmt: [LocalVariableAccess] name +# 66| getComponent: [StringTextComponent] is +# 66| getComponent: [StringInterpolationComponent] #{...} +# 66| getStmt: [LocalVariableAccess] age +# 66| getComponent: [StringTextComponent] years old # 70| getStmt: [AssignExpr] ... = ... # 70| getAnOperand/getLeftOperand: [LocalVariableAccess] lambda_with_optional_params # 70| getAnOperand/getRightOperand: [Lambda] -> { ... } @@ -3155,11 +3205,12 @@ params/params.rb: # 70| getParameter: [OptionalParameter] c # 70| getDefiningAccess: [LocalVariableAccess] c # 70| getDefaultValue: [IntegerLiteral] 20 -# 70| getStmt: [AddExpr] ... + ... -# 70| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... -# 70| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a -# 70| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b -# 70| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] c +# 70| getBody: [StmtSequence] ... +# 70| getStmt: [AddExpr] ... + ... +# 70| getAnOperand/getLeftOperand/getReceiver: [AddExpr] ... + ... +# 70| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] a +# 70| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] b +# 70| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] c # 73| getStmt: [Method] method_with_nil_splat # 73| getParameter: [SimpleParameter] wibble # 73| getDefiningAccess: [LocalVariableAccess] wibble @@ -3175,14 +3226,15 @@ params/params.rb: # 81| getDefiningAccess: [LocalVariableAccess] array # 81| getParameter: [BlockParameter] & # 81| getDefiningAccess: [LocalVariableAccess] __synth__0 -# 82| getStmt: [MethodCall] call to proc -# 82| getReceiver: [SelfVariableAccess] self -# 82| getArgument: [BlockArgument] &... -# 82| getValue: [LocalVariableAccess] __synth__0 -# 83| getStmt: [MethodCall] call to each -# 83| getReceiver: [LocalVariableAccess] array -# 83| getArgument: [BlockArgument] &... -# 83| getValue: [LocalVariableAccess] __synth__0 +# 82| getBody: [StmtSequence] ... +# 82| getStmt: [MethodCall] call to proc +# 82| getReceiver: [SelfVariableAccess] self +# 82| getArgument: [BlockArgument] &... +# 82| getValue: [LocalVariableAccess] __synth__0 +# 83| getStmt: [MethodCall] call to each +# 83| getReceiver: [LocalVariableAccess] array +# 83| getArgument: [BlockArgument] &... +# 83| getValue: [LocalVariableAccess] __synth__0 # 86| getStmt: [MethodCall] call to run_block # 86| getReceiver: [SelfVariableAccess] self # 86| getBlock: [BraceBlock] { ... } @@ -3190,27 +3242,30 @@ params/params.rb: # 86| getDefiningAccess: [LocalVariableAccess] x # 86| getLocalVariable: [LocalVariableAccess] y # 86| getLocalVariable: [LocalVariableAccess] z -# 86| getStmt: [MethodCall] call to puts -# 86| getReceiver: [SelfVariableAccess] self -# 86| getArgument: [LocalVariableAccess] x +# 86| getBody: [StmtSequence] ... +# 86| getStmt: [MethodCall] call to puts +# 86| getReceiver: [SelfVariableAccess] self +# 86| getArgument: [LocalVariableAccess] x # 89| getStmt: [Method] anonymous_splat_parameter # 89| getParameter: [SimpleParameter] array # 89| getDefiningAccess: [LocalVariableAccess] array # 89| getParameter: [SplatParameter] * # 89| getDefiningAccess: [LocalVariableAccess] __synth__0 -# 90| getStmt: [MethodCall] call to concat -# 90| getReceiver: [LocalVariableAccess] array -# 90| getArgument: [SplatExpr] * ... -# 90| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0 +# 90| getBody: [StmtSequence] ... +# 90| getStmt: [MethodCall] call to concat +# 90| getReceiver: [LocalVariableAccess] array +# 90| getArgument: [SplatExpr] * ... +# 90| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0 # 94| getStmt: [Method] anonymous_hash_splat_parameter # 94| getParameter: [SimpleParameter] hash # 94| getDefiningAccess: [LocalVariableAccess] hash # 94| getParameter: [HashSplatParameter] ** # 94| getDefiningAccess: [LocalVariableAccess] __synth__0 -# 95| getStmt: [MethodCall] call to merge -# 95| getReceiver: [LocalVariableAccess] hash -# 95| getArgument: [HashSplatExpr] ** ... -# 95| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0 +# 95| getBody: [StmtSequence] ... +# 95| getStmt: [MethodCall] call to merge +# 95| getReceiver: [LocalVariableAccess] hash +# 95| getArgument: [HashSplatExpr] ** ... +# 95| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0 # 98| getStmt: [ClassDeclaration] Sup # 99| getStmt: [Method] m # 99| getParameter: [SimpleParameter] x @@ -3221,16 +3276,17 @@ params/params.rb: # 99| getDefiningAccess: [LocalVariableAccess] k # 99| getParameter: [HashSplatParameter] **kwargs # 99| getDefiningAccess: [LocalVariableAccess] kwargs -# 100| getStmt: [MethodCall] call to print -# 100| getReceiver: [SelfVariableAccess] self -# 100| getArgument: [AddExpr] ... + ... -# 100| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x -# 100| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 -# 101| getStmt: [MethodCall] call to print -# 101| getReceiver: [SelfVariableAccess] self -# 101| getArgument: [AddExpr] ... + ... -# 101| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] k -# 101| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 100| getBody: [StmtSequence] ... +# 100| getStmt: [MethodCall] call to print +# 100| getReceiver: [SelfVariableAccess] self +# 100| getArgument: [AddExpr] ... + ... +# 100| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] x +# 100| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 +# 101| getStmt: [MethodCall] call to print +# 101| getReceiver: [SelfVariableAccess] self +# 101| getArgument: [AddExpr] ... + ... +# 101| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] k +# 101| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1 # 105| getStmt: [ClassDeclaration] Sub # 105| getSuperclassExpr: [ConstantReadAccess] Sup # 106| getStmt: [Method] m @@ -3242,15 +3298,16 @@ params/params.rb: # 106| getDefiningAccess: [LocalVariableAccess] k # 106| getParameter: [HashSplatParameter] **kwargs # 106| getDefiningAccess: [LocalVariableAccess] kwargs -# 107| getStmt: [SuperCall] super call to m -# 107| getArgument: [LocalVariableAccess] y -# 107| getArgument: [SplatExpr] * ... -# 107| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] rest -# 107| getArgument: [Pair] Pair -# 107| getKey: [SymbolLiteral] k -# 107| getValue: [LocalVariableAccess] k -# 107| getArgument: [HashSplatExpr] ** ... -# 107| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] kwargs +# 107| getBody: [StmtSequence] ... +# 107| getStmt: [SuperCall] super call to m +# 107| getArgument: [LocalVariableAccess] y +# 107| getArgument: [SplatExpr] * ... +# 107| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] rest +# 107| getArgument: [Pair] Pair +# 107| getKey: [SymbolLiteral] k +# 107| getValue: [LocalVariableAccess] k +# 107| getArgument: [HashSplatExpr] ** ... +# 107| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] kwargs # 111| getStmt: [MethodCall] call to m # 111| getReceiver: [MethodCall] call to new # 111| getReceiver: [ConstantReadAccess] Sub @@ -3288,57 +3345,59 @@ gems/test.gemspec: # 1| getBlock: [DoBlock] do ... end # 1| getParameter: [SimpleParameter] s # 1| getDefiningAccess: [LocalVariableAccess] s -# 2| getStmt: [AssignExpr] ... = ... -# 2| getAnOperand/getLeftOperand: [MethodCall] call to name -# 2| getReceiver: [LocalVariableAccess] s -# 2| getAnOperand/getRightOperand: [StringLiteral] "test" -# 2| getComponent: [StringTextComponent] test -# 3| getStmt: [AssignExpr] ... = ... -# 3| getAnOperand/getLeftOperand: [MethodCall] call to version -# 3| getReceiver: [LocalVariableAccess] s -# 3| getAnOperand/getRightOperand: [StringLiteral] "0.0.0" -# 3| getComponent: [StringTextComponent] 0.0.0 -# 4| getStmt: [AssignExpr] ... = ... -# 4| getAnOperand/getLeftOperand: [MethodCall] call to summary -# 4| getReceiver: [LocalVariableAccess] s -# 4| getAnOperand/getRightOperand: [StringLiteral] "foo!" -# 4| getComponent: [StringTextComponent] foo! -# 5| getStmt: [AssignExpr] ... = ... -# 5| getAnOperand/getLeftOperand: [MethodCall] call to description -# 5| getReceiver: [LocalVariableAccess] s -# 5| getAnOperand/getRightOperand: [StringLiteral] "A test" -# 5| getComponent: [StringTextComponent] A test -# 6| getStmt: [AssignExpr] ... = ... -# 6| getAnOperand/getLeftOperand: [MethodCall] call to authors -# 6| getReceiver: [LocalVariableAccess] s -# 6| getAnOperand/getRightOperand: [ArrayLiteral] [...] -# 6| getElement: [StringLiteral] "Mona Lisa" -# 6| getComponent: [StringTextComponent] Mona Lisa -# 7| getStmt: [AssignExpr] ... = ... -# 7| getAnOperand/getLeftOperand: [MethodCall] call to email -# 7| getReceiver: [LocalVariableAccess] s -# 7| getAnOperand/getRightOperand: [StringLiteral] "mona@example.com" -# 7| getComponent: [StringTextComponent] mona@example.com -# 8| getStmt: [AssignExpr] ... = ... -# 8| getAnOperand/getLeftOperand: [MethodCall] call to files -# 8| getReceiver: [LocalVariableAccess] s -# 8| getAnOperand/getRightOperand: [ArrayLiteral] [...] -# 8| getElement: [StringLiteral] "lib/test.rb" -# 8| getComponent: [StringTextComponent] lib/test.rb -# 9| getStmt: [AssignExpr] ... = ... -# 9| getAnOperand/getLeftOperand: [MethodCall] call to homepage -# 9| getReceiver: [LocalVariableAccess] s -# 9| getAnOperand/getRightOperand: [StringLiteral] "https://github.com/github/cod..." -# 9| getComponent: [StringTextComponent] https://github.com/github/codeql-ruby +# 2| getBody: [StmtSequence] ... +# 2| getStmt: [AssignExpr] ... = ... +# 2| getAnOperand/getLeftOperand: [MethodCall] call to name +# 2| getReceiver: [LocalVariableAccess] s +# 2| getAnOperand/getRightOperand: [StringLiteral] "test" +# 2| getComponent: [StringTextComponent] test +# 3| getStmt: [AssignExpr] ... = ... +# 3| getAnOperand/getLeftOperand: [MethodCall] call to version +# 3| getReceiver: [LocalVariableAccess] s +# 3| getAnOperand/getRightOperand: [StringLiteral] "0.0.0" +# 3| getComponent: [StringTextComponent] 0.0.0 +# 4| getStmt: [AssignExpr] ... = ... +# 4| getAnOperand/getLeftOperand: [MethodCall] call to summary +# 4| getReceiver: [LocalVariableAccess] s +# 4| getAnOperand/getRightOperand: [StringLiteral] "foo!" +# 4| getComponent: [StringTextComponent] foo! +# 5| getStmt: [AssignExpr] ... = ... +# 5| getAnOperand/getLeftOperand: [MethodCall] call to description +# 5| getReceiver: [LocalVariableAccess] s +# 5| getAnOperand/getRightOperand: [StringLiteral] "A test" +# 5| getComponent: [StringTextComponent] A test +# 6| getStmt: [AssignExpr] ... = ... +# 6| getAnOperand/getLeftOperand: [MethodCall] call to authors +# 6| getReceiver: [LocalVariableAccess] s +# 6| getAnOperand/getRightOperand: [ArrayLiteral] [...] +# 6| getElement: [StringLiteral] "Mona Lisa" +# 6| getComponent: [StringTextComponent] Mona Lisa +# 7| getStmt: [AssignExpr] ... = ... +# 7| getAnOperand/getLeftOperand: [MethodCall] call to email +# 7| getReceiver: [LocalVariableAccess] s +# 7| getAnOperand/getRightOperand: [StringLiteral] "mona@example.com" +# 7| getComponent: [StringTextComponent] mona@example.com +# 8| getStmt: [AssignExpr] ... = ... +# 8| getAnOperand/getLeftOperand: [MethodCall] call to files +# 8| getReceiver: [LocalVariableAccess] s +# 8| getAnOperand/getRightOperand: [ArrayLiteral] [...] +# 8| getElement: [StringLiteral] "lib/test.rb" +# 8| getComponent: [StringTextComponent] lib/test.rb +# 9| getStmt: [AssignExpr] ... = ... +# 9| getAnOperand/getLeftOperand: [MethodCall] call to homepage +# 9| getReceiver: [LocalVariableAccess] s +# 9| getAnOperand/getRightOperand: [StringLiteral] "https://github.com/github/cod..." +# 9| getComponent: [StringTextComponent] https://github.com/github/codeql-ruby gems/lib/test.rb: # 1| [Toplevel] test.rb # 1| getStmt: [ClassDeclaration] Foo # 2| getStmt: [SingletonMethod] greet # 2| getObject: [SelfVariableAccess] self -# 3| getStmt: [MethodCall] call to puts -# 3| getReceiver: [SelfVariableAccess] self -# 3| getArgument: [StringLiteral] "Hello" -# 3| getComponent: [StringTextComponent] Hello +# 3| getBody: [StmtSequence] ... +# 3| getStmt: [MethodCall] call to puts +# 3| getReceiver: [SelfVariableAccess] self +# 3| getArgument: [StringLiteral] "Hello" +# 3| getComponent: [StringTextComponent] Hello modules/toplevel.rb: # 1| [Toplevel] toplevel.rb # 1| getStmt: [MethodCall] call to puts diff --git a/ruby/ql/test/library-tests/ast/AstDesugar.expected b/ruby/ql/test/library-tests/ast/AstDesugar.expected index 29443860749..40594888db1 100644 --- a/ruby/ql/test/library-tests/ast/AstDesugar.expected +++ b/ruby/ql/test/library-tests/ast/AstDesugar.expected @@ -38,11 +38,12 @@ calls/calls.rb: # 223| getBlock: [BraceBlock] { ... } # 223| getParameter: [SimpleParameter] __synth__0__1 # 223| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 223| getStmt: [AssignExpr] ... = ... -# 223| getAnOperand/getLeftOperand: [LocalVariableAccess] x -# 223| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 -# 224| getStmt: [MethodCall] call to baz -# 224| getReceiver: [SelfVariableAccess] self +# 223| getBody: [StmtSequence] ... +# 223| getStmt: [AssignExpr] ... = ... +# 223| getAnOperand/getLeftOperand: [LocalVariableAccess] x +# 223| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 +# 224| getStmt: [MethodCall] call to baz +# 224| getReceiver: [SelfVariableAccess] self # 226| [ForExpr] for ... in ... # 226| getDesugared: [StmtSequence] ... # 226| getStmt: [IfExpr] if ... @@ -58,11 +59,12 @@ calls/calls.rb: # 226| getBlock: [BraceBlock] { ... } # 226| getParameter: [SimpleParameter] __synth__0__1 # 226| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 226| getStmt: [AssignExpr] ... = ... -# 226| getAnOperand/getLeftOperand: [LocalVariableAccess] x -# 226| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 -# 227| getStmt: [MethodCall] call to baz -# 227| getReceiver: [ConstantReadAccess] X +# 226| getBody: [StmtSequence] ... +# 226| getStmt: [AssignExpr] ... = ... +# 226| getAnOperand/getLeftOperand: [LocalVariableAccess] x +# 226| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 +# 227| getStmt: [MethodCall] call to baz +# 227| getReceiver: [ConstantReadAccess] X # 246| [HashLiteral] {...} # 246| getDesugared: [MethodCall] call to [] # 246| getReceiver: [ConstantReadAccess] Hash @@ -302,33 +304,34 @@ calls/calls.rb: # 339| getBlock: [BraceBlock] { ... } # 339| getParameter: [SimpleParameter] __synth__0__1 # 339| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 339| getStmt: [AssignExpr] ... = ... -# 339| getDesugared: [StmtSequence] ... -# 339| getStmt: [AssignExpr] ... = ... -# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__3__1 -# 339| getAnOperand/getRightOperand: [SplatExpr] * ... -# 339| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 -# 339| getStmt: [AssignExpr] ... = ... -# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] x -# 339| getAnOperand/getRightOperand: [MethodCall] call to [] -# 339| getReceiver: [LocalVariableAccess] __synth__3__1 -# 339| getArgument: [IntegerLiteral] 0 -# 339| getStmt: [AssignExpr] ... = ... -# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] y -# 339| getAnOperand/getRightOperand: [MethodCall] call to [] -# 339| getReceiver: [LocalVariableAccess] __synth__3__1 -# 339| getArgument: [IntegerLiteral] 1 -# 339| getStmt: [AssignExpr] ... = ... -# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] z -# 339| getAnOperand/getRightOperand: [MethodCall] call to [] -# 339| getReceiver: [LocalVariableAccess] __synth__3__1 -# 339| getArgument: [IntegerLiteral] 2 -# 339| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) -# 340| getStmt: [MethodCall] call to foo -# 340| getReceiver: [SelfVariableAccess] self -# 340| getArgument: [LocalVariableAccess] x -# 340| getArgument: [LocalVariableAccess] y -# 340| getArgument: [LocalVariableAccess] z +# 339| getBody: [StmtSequence] ... +# 339| getStmt: [AssignExpr] ... = ... +# 339| getDesugared: [StmtSequence] ... +# 339| getStmt: [AssignExpr] ... = ... +# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__3__1 +# 339| getAnOperand/getRightOperand: [SplatExpr] * ... +# 339| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 +# 339| getStmt: [AssignExpr] ... = ... +# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] x +# 339| getAnOperand/getRightOperand: [MethodCall] call to [] +# 339| getReceiver: [LocalVariableAccess] __synth__3__1 +# 339| getArgument: [IntegerLiteral] 0 +# 339| getStmt: [AssignExpr] ... = ... +# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] y +# 339| getAnOperand/getRightOperand: [MethodCall] call to [] +# 339| getReceiver: [LocalVariableAccess] __synth__3__1 +# 339| getArgument: [IntegerLiteral] 1 +# 339| getStmt: [AssignExpr] ... = ... +# 339| getAnOperand/getLeftOperand: [LocalVariableAccess] z +# 339| getAnOperand/getRightOperand: [MethodCall] call to [] +# 339| getReceiver: [LocalVariableAccess] __synth__3__1 +# 339| getArgument: [IntegerLiteral] 2 +# 339| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) +# 340| getStmt: [MethodCall] call to foo +# 340| getReceiver: [SelfVariableAccess] self +# 340| getArgument: [LocalVariableAccess] x +# 340| getArgument: [LocalVariableAccess] y +# 340| getArgument: [LocalVariableAccess] z # 361| [MethodCall] call to empty? # 361| getDesugared: [StmtSequence] ... # 361| getStmt: [AssignExpr] ... = ... @@ -360,7 +363,8 @@ calls/calls.rb: # 363| getBlock: [BraceBlock] { ... } # 363| getParameter: [SimpleParameter] x # 363| getDefiningAccess: [LocalVariableAccess] x -# 363| getStmt: [LocalVariableAccess] x +# 363| getBody: [StmtSequence] ... +# 363| getStmt: [LocalVariableAccess] x control/cases.rb: # 90| [ArrayLiteral] %w(...) # 90| getDesugared: [MethodCall] call to [] @@ -647,18 +651,19 @@ control/loops.rb: # 9| getBlock: [BraceBlock] { ... } # 9| getParameter: [SimpleParameter] __synth__0__1 # 9| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 9| getStmt: [AssignExpr] ... = ... -# 9| getAnOperand/getLeftOperand: [LocalVariableAccess] n -# 9| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 -# 10| getStmt: [AssignAddExpr] ... += ... -# 10| getDesugared: [AssignExpr] ... = ... -# 10| getAnOperand/getLeftOperand: [LocalVariableAccess] sum -# 10| getAnOperand/getRightOperand: [AddExpr] ... + ... -# 10| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum -# 10| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n -# 11| getStmt: [AssignExpr] ... = ... -# 11| getAnOperand/getLeftOperand: [LocalVariableAccess] foo -# 11| getAnOperand/getRightOperand: [LocalVariableAccess] n +# 9| getBody: [StmtSequence] ... +# 9| getStmt: [AssignExpr] ... = ... +# 9| getAnOperand/getLeftOperand: [LocalVariableAccess] n +# 9| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 +# 10| getStmt: [AssignAddExpr] ... += ... +# 10| getDesugared: [AssignExpr] ... = ... +# 10| getAnOperand/getLeftOperand: [LocalVariableAccess] sum +# 10| getAnOperand/getRightOperand: [AddExpr] ... + ... +# 10| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum +# 10| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n +# 11| getStmt: [AssignExpr] ... = ... +# 11| getAnOperand/getLeftOperand: [LocalVariableAccess] foo +# 11| getAnOperand/getRightOperand: [LocalVariableAccess] n # 16| [ForExpr] for ... in ... # 16| getDesugared: [StmtSequence] ... # 16| getStmt: [IfExpr] if ... @@ -675,21 +680,22 @@ control/loops.rb: # 16| getBlock: [BraceBlock] { ... } # 16| getParameter: [SimpleParameter] __synth__0__1 # 16| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 16| getStmt: [AssignExpr] ... = ... -# 16| getAnOperand/getLeftOperand: [LocalVariableAccess] n -# 16| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 -# 17| getStmt: [AssignAddExpr] ... += ... -# 17| getDesugared: [AssignExpr] ... = ... -# 17| getAnOperand/getLeftOperand: [LocalVariableAccess] sum -# 17| getAnOperand/getRightOperand: [AddExpr] ... + ... -# 17| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum -# 17| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n -# 18| getStmt: [AssignSubExpr] ... -= ... -# 18| getDesugared: [AssignExpr] ... = ... -# 18| getAnOperand/getLeftOperand: [LocalVariableAccess] foo -# 18| getAnOperand/getRightOperand: [SubExpr] ... - ... -# 18| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo -# 18| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n +# 16| getBody: [StmtSequence] ... +# 16| getStmt: [AssignExpr] ... = ... +# 16| getAnOperand/getLeftOperand: [LocalVariableAccess] n +# 16| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 +# 17| getStmt: [AssignAddExpr] ... += ... +# 17| getDesugared: [AssignExpr] ... = ... +# 17| getAnOperand/getLeftOperand: [LocalVariableAccess] sum +# 17| getAnOperand/getRightOperand: [AddExpr] ... + ... +# 17| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum +# 17| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n +# 18| getStmt: [AssignSubExpr] ... -= ... +# 18| getDesugared: [AssignExpr] ... = ... +# 18| getAnOperand/getLeftOperand: [LocalVariableAccess] foo +# 18| getAnOperand/getRightOperand: [SubExpr] ... - ... +# 18| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo +# 18| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] n # 22| [ForExpr] for ... in ... # 22| getDesugared: [StmtSequence] ... # 22| getStmt: [IfExpr] if ... @@ -721,35 +727,36 @@ control/loops.rb: # 22| getBlock: [BraceBlock] { ... } # 22| getParameter: [SimpleParameter] __synth__0__1 # 22| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 22| getStmt: [AssignExpr] ... = ... -# 22| getDesugared: [StmtSequence] ... -# 22| getStmt: [AssignExpr] ... = ... -# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__2__1 -# 22| getAnOperand/getRightOperand: [SplatExpr] * ... -# 22| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 -# 22| getStmt: [AssignExpr] ... = ... -# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] key -# 22| getAnOperand/getRightOperand: [MethodCall] call to [] -# 22| getReceiver: [LocalVariableAccess] __synth__2__1 -# 22| getArgument: [IntegerLiteral] 0 -# 22| getStmt: [AssignExpr] ... = ... -# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] value -# 22| getAnOperand/getRightOperand: [MethodCall] call to [] -# 22| getReceiver: [LocalVariableAccess] __synth__2__1 -# 22| getArgument: [IntegerLiteral] 1 -# 22| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) -# 23| getStmt: [AssignAddExpr] ... += ... -# 23| getDesugared: [AssignExpr] ... = ... -# 23| getAnOperand/getLeftOperand: [LocalVariableAccess] sum -# 23| getAnOperand/getRightOperand: [AddExpr] ... + ... -# 23| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum -# 23| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value -# 24| getStmt: [AssignMulExpr] ... *= ... -# 24| getDesugared: [AssignExpr] ... = ... -# 24| getAnOperand/getLeftOperand: [LocalVariableAccess] foo -# 24| getAnOperand/getRightOperand: [MulExpr] ... * ... -# 24| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo -# 24| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value +# 22| getBody: [StmtSequence] ... +# 22| getStmt: [AssignExpr] ... = ... +# 22| getDesugared: [StmtSequence] ... +# 22| getStmt: [AssignExpr] ... = ... +# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__2__1 +# 22| getAnOperand/getRightOperand: [SplatExpr] * ... +# 22| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 +# 22| getStmt: [AssignExpr] ... = ... +# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] key +# 22| getAnOperand/getRightOperand: [MethodCall] call to [] +# 22| getReceiver: [LocalVariableAccess] __synth__2__1 +# 22| getArgument: [IntegerLiteral] 0 +# 22| getStmt: [AssignExpr] ... = ... +# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] value +# 22| getAnOperand/getRightOperand: [MethodCall] call to [] +# 22| getReceiver: [LocalVariableAccess] __synth__2__1 +# 22| getArgument: [IntegerLiteral] 1 +# 22| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) +# 23| getStmt: [AssignAddExpr] ... += ... +# 23| getDesugared: [AssignExpr] ... = ... +# 23| getAnOperand/getLeftOperand: [LocalVariableAccess] sum +# 23| getAnOperand/getRightOperand: [AddExpr] ... + ... +# 23| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum +# 23| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value +# 24| getStmt: [AssignMulExpr] ... *= ... +# 24| getDesugared: [AssignExpr] ... = ... +# 24| getAnOperand/getLeftOperand: [LocalVariableAccess] foo +# 24| getAnOperand/getRightOperand: [MulExpr] ... * ... +# 24| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo +# 24| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value # 28| [ForExpr] for ... in ... # 28| getDesugared: [StmtSequence] ... # 28| getStmt: [IfExpr] if ... @@ -781,36 +788,37 @@ control/loops.rb: # 28| getBlock: [BraceBlock] { ... } # 28| getParameter: [SimpleParameter] __synth__0__1 # 28| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 28| getStmt: [AssignExpr] ... = ... -# 28| getDesugared: [StmtSequence] ... -# 28| getStmt: [AssignExpr] ... = ... -# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__2__1 -# 28| getAnOperand/getRightOperand: [SplatExpr] * ... -# 28| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 -# 28| getStmt: [AssignExpr] ... = ... -# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] key -# 28| getAnOperand/getRightOperand: [MethodCall] call to [] -# 28| getReceiver: [LocalVariableAccess] __synth__2__1 -# 28| getArgument: [IntegerLiteral] 0 -# 28| getStmt: [AssignExpr] ... = ... -# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] value -# 28| getAnOperand/getRightOperand: [MethodCall] call to [] -# 28| getReceiver: [LocalVariableAccess] __synth__2__1 -# 28| getArgument: [IntegerLiteral] 1 -# 28| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) -# 29| getStmt: [AssignAddExpr] ... += ... -# 29| getDesugared: [AssignExpr] ... = ... -# 29| getAnOperand/getLeftOperand: [LocalVariableAccess] sum -# 29| getAnOperand/getRightOperand: [AddExpr] ... + ... -# 29| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum -# 29| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value -# 30| getStmt: [AssignDivExpr] ... /= ... -# 30| getDesugared: [AssignExpr] ... = ... -# 30| getAnOperand/getLeftOperand: [LocalVariableAccess] foo -# 30| getAnOperand/getRightOperand: [DivExpr] ... / ... -# 30| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo -# 30| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value -# 31| getStmt: [BreakStmt] break +# 28| getBody: [StmtSequence] ... +# 28| getStmt: [AssignExpr] ... = ... +# 28| getDesugared: [StmtSequence] ... +# 28| getStmt: [AssignExpr] ... = ... +# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__2__1 +# 28| getAnOperand/getRightOperand: [SplatExpr] * ... +# 28| getAnOperand/getOperand/getReceiver: [LocalVariableAccess] __synth__0__1 +# 28| getStmt: [AssignExpr] ... = ... +# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] key +# 28| getAnOperand/getRightOperand: [MethodCall] call to [] +# 28| getReceiver: [LocalVariableAccess] __synth__2__1 +# 28| getArgument: [IntegerLiteral] 0 +# 28| getStmt: [AssignExpr] ... = ... +# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] value +# 28| getAnOperand/getRightOperand: [MethodCall] call to [] +# 28| getReceiver: [LocalVariableAccess] __synth__2__1 +# 28| getArgument: [IntegerLiteral] 1 +# 28| getAnOperand/getLeftOperand: [DestructuredLhsExpr] (..., ...) +# 29| getStmt: [AssignAddExpr] ... += ... +# 29| getDesugared: [AssignExpr] ... = ... +# 29| getAnOperand/getLeftOperand: [LocalVariableAccess] sum +# 29| getAnOperand/getRightOperand: [AddExpr] ... + ... +# 29| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] sum +# 29| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value +# 30| getStmt: [AssignDivExpr] ... /= ... +# 30| getDesugared: [AssignExpr] ... = ... +# 30| getAnOperand/getLeftOperand: [LocalVariableAccess] foo +# 30| getAnOperand/getRightOperand: [DivExpr] ... / ... +# 30| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] foo +# 30| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] value +# 31| getStmt: [BreakStmt] break # 36| [AssignAddExpr] ... += ... # 36| getDesugared: [AssignExpr] ... = ... # 36| getAnOperand/getLeftOperand: [LocalVariableAccess] x @@ -1090,16 +1098,17 @@ erb/template.html.erb: # 27| getBlock: [BraceBlock] { ... } # 27| getParameter: [SimpleParameter] __synth__0__1 # 27| getDefiningAccess: [LocalVariableAccess] __synth__0__1 -# 27| getStmt: [AssignExpr] ... = ... -# 27| getAnOperand/getLeftOperand: [LocalVariableAccess] x -# 27| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 -# 28| getStmt: [AssignAddExpr] ... += ... -# 28| getDesugared: [AssignExpr] ... = ... -# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] xs -# 28| getAnOperand/getRightOperand: [AddExpr] ... + ... -# 28| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] xs -# 28| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] x -# 29| getStmt: [LocalVariableAccess] xs +# 27| getBody: [StmtSequence] ... +# 27| getStmt: [AssignExpr] ... = ... +# 27| getAnOperand/getLeftOperand: [LocalVariableAccess] x +# 27| getAnOperand/getRightOperand: [LocalVariableAccess] __synth__0__1 +# 28| getStmt: [AssignAddExpr] ... += ... +# 28| getDesugared: [AssignExpr] ... = ... +# 28| getAnOperand/getLeftOperand: [LocalVariableAccess] xs +# 28| getAnOperand/getRightOperand: [AddExpr] ... + ... +# 28| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] xs +# 28| getAnOperand/getArgument/getRightOperand: [LocalVariableAccess] x +# 29| getStmt: [LocalVariableAccess] xs gems/test.gemspec: # 2| [AssignExpr] ... = ... # 2| getDesugared: [StmtSequence] ... diff --git a/ruby/ql/test/library-tests/modules/methods.expected b/ruby/ql/test/library-tests/modules/methods.expected index 95ca9e9c260..272081218c5 100644 --- a/ruby/ql/test/library-tests/modules/methods.expected +++ b/ruby/ql/test/library-tests/modules/methods.expected @@ -709,32 +709,40 @@ lookupMethod | unresolved_subclass.rb:21:1:22:3 | UnresolvedNamespace::X1::X2::X3::A | puts | calls.rb:102:5:102:30 | puts | | unresolved_subclass.rb:21:1:22:3 | UnresolvedNamespace::X1::X2::X3::A | to_s | calls.rb:172:5:173:7 | to_s | enclosingMethod +| calls.rb:2:5:2:14 | ... | calls.rb:1:1:3:3 | foo | | calls.rb:2:5:2:14 | call to puts | calls.rb:1:1:3:3 | foo | | calls.rb:2:5:2:14 | self | calls.rb:1:1:3:3 | foo | | calls.rb:2:10:2:14 | "foo" | calls.rb:1:1:3:3 | foo | | calls.rb:2:11:2:13 | foo | calls.rb:1:1:3:3 | foo | +| calls.rb:8:5:8:15 | ... | calls.rb:7:1:9:3 | bar | | calls.rb:8:5:8:15 | call to puts | calls.rb:7:1:9:3 | bar | | calls.rb:8:5:8:15 | self | calls.rb:7:1:9:3 | bar | | calls.rb:8:10:8:15 | "bar1" | calls.rb:7:1:9:3 | bar | | calls.rb:8:11:8:14 | bar1 | calls.rb:7:1:9:3 | bar | +| calls.rb:14:5:14:15 | ... | calls.rb:13:1:15:3 | bar | | calls.rb:14:5:14:15 | call to puts | calls.rb:13:1:15:3 | bar | | calls.rb:14:5:14:15 | self | calls.rb:13:1:15:3 | bar | | calls.rb:14:10:14:15 | "bar2" | calls.rb:13:1:15:3 | bar | | calls.rb:14:11:14:14 | bar2 | calls.rb:13:1:15:3 | bar | | calls.rb:23:9:23:19 | call to singleton_m | calls.rb:22:5:24:7 | instance_m | | calls.rb:23:9:23:19 | self | calls.rb:22:5:24:7 | instance_m | +| calls.rb:23:9:23:35 | ... | calls.rb:22:5:24:7 | instance_m | | calls.rb:26:9:26:18 | call to instance_m | calls.rb:25:5:27:7 | singleton_m | | calls.rb:26:9:26:18 | self | calls.rb:25:5:27:7 | singleton_m | +| calls.rb:26:9:26:34 | ... | calls.rb:25:5:27:7 | singleton_m | | calls.rb:40:5:40:14 | call to instance_m | calls.rb:39:1:41:3 | call_instance_m | | calls.rb:40:5:40:14 | self | calls.rb:39:1:41:3 | call_instance_m | +| calls.rb:40:5:40:30 | ... | calls.rb:39:1:41:3 | call_instance_m | | calls.rb:52:9:52:18 | call to instance_m | calls.rb:51:5:57:7 | baz | | calls.rb:52:9:52:18 | self | calls.rb:51:5:57:7 | baz | +| calls.rb:52:9:56:40 | ... | calls.rb:51:5:57:7 | baz | | calls.rb:53:9:53:12 | self | calls.rb:51:5:57:7 | baz | | calls.rb:53:9:53:23 | call to instance_m | calls.rb:51:5:57:7 | baz | | calls.rb:55:9:55:19 | call to singleton_m | calls.rb:51:5:57:7 | baz | | calls.rb:55:9:55:19 | self | calls.rb:51:5:57:7 | baz | | calls.rb:56:9:56:12 | self | calls.rb:51:5:57:7 | baz | | calls.rb:56:9:56:24 | call to singleton_m | calls.rb:51:5:57:7 | baz | +| calls.rb:67:9:67:13 | ... | calls.rb:66:5:68:7 | baz | | calls.rb:67:9:67:13 | super call to baz | calls.rb:66:5:68:7 | baz | | calls.rb:76:18:76:18 | a | calls.rb:76:1:79:3 | optional_arg | | calls.rb:76:18:76:18 | a | calls.rb:76:1:79:3 | optional_arg | @@ -744,12 +752,15 @@ enclosingMethod | calls.rb:76:28:76:28 | 5 | calls.rb:76:1:79:3 | optional_arg | | calls.rb:77:5:77:5 | a | calls.rb:76:1:79:3 | optional_arg | | calls.rb:77:5:77:16 | call to bit_length | calls.rb:76:1:79:3 | optional_arg | +| calls.rb:77:5:78:16 | ... | calls.rb:76:1:79:3 | optional_arg | | calls.rb:78:5:78:5 | b | calls.rb:76:1:79:3 | optional_arg | | calls.rb:78:5:78:16 | call to bit_length | calls.rb:76:1:79:3 | optional_arg | +| calls.rb:82:5:82:11 | ... | calls.rb:81:1:83:3 | call_block | | calls.rb:82:5:82:11 | yield ... | calls.rb:81:1:83:3 | call_block | | calls.rb:82:11:82:11 | 1 | calls.rb:81:1:83:3 | call_block | | calls.rb:86:5:86:7 | var | calls.rb:85:1:89:3 | foo | | calls.rb:86:5:86:18 | ... = ... | calls.rb:85:1:89:3 | foo | +| calls.rb:86:5:88:29 | ... | calls.rb:85:1:89:3 | foo | | calls.rb:86:11:86:14 | Hash | calls.rb:85:1:89:3 | foo | | calls.rb:86:11:86:18 | call to new | calls.rb:85:1:89:3 | foo | | calls.rb:87:5:87:7 | var | calls.rb:85:1:89:3 | foo | @@ -761,25 +772,30 @@ enclosingMethod | calls.rb:88:19:88:19 | x | calls.rb:85:1:89:3 | foo | | calls.rb:88:19:88:19 | x | calls.rb:85:1:89:3 | foo | | calls.rb:88:22:88:24 | var | calls.rb:85:1:89:3 | foo | +| calls.rb:88:22:88:27 | ... | calls.rb:85:1:89:3 | foo | | calls.rb:88:22:88:27 | ...[...] | calls.rb:85:1:89:3 | foo | | calls.rb:88:26:88:26 | x | calls.rb:85:1:89:3 | foo | | calls.rb:102:14:102:14 | x | calls.rb:102:5:102:30 | puts | | calls.rb:102:14:102:14 | x | calls.rb:102:5:102:30 | puts | +| calls.rb:102:17:102:26 | ... | calls.rb:102:5:102:30 | puts | | calls.rb:102:17:102:26 | call to old_puts | calls.rb:102:5:102:30 | puts | | calls.rb:102:17:102:26 | self | calls.rb:102:5:102:30 | puts | | calls.rb:102:26:102:26 | x | calls.rb:102:5:102:30 | puts | | calls.rb:108:17:108:17 | x | calls.rb:108:5:110:7 | include | | calls.rb:108:17:108:17 | x | calls.rb:108:5:110:7 | include | +| calls.rb:109:9:109:21 | ... | calls.rb:108:5:110:7 | include | | calls.rb:109:9:109:21 | call to old_include | calls.rb:108:5:110:7 | include | | calls.rb:109:9:109:21 | self | calls.rb:108:5:110:7 | include | | calls.rb:109:21:109:21 | x | calls.rb:108:5:110:7 | include | | calls.rb:122:12:122:12 | x | calls.rb:122:5:122:31 | [] | | calls.rb:122:12:122:12 | x | calls.rb:122:5:122:31 | [] | +| calls.rb:122:15:122:27 | ... | calls.rb:122:5:122:31 | [] | | calls.rb:122:15:122:27 | call to old_lookup | calls.rb:122:5:122:31 | [] | | calls.rb:122:15:122:27 | self | calls.rb:122:5:122:31 | [] | | calls.rb:122:26:122:26 | x | calls.rb:122:5:122:31 | [] | | calls.rb:127:10:127:10 | x | calls.rb:127:3:127:29 | [] | | calls.rb:127:10:127:10 | x | calls.rb:127:3:127:29 | [] | +| calls.rb:127:13:127:25 | ... | calls.rb:127:3:127:29 | [] | | calls.rb:127:13:127:25 | call to old_lookup | calls.rb:127:3:127:29 | [] | | calls.rb:127:13:127:25 | self | calls.rb:127:3:127:29 | [] | | calls.rb:127:24:127:24 | x | calls.rb:127:3:127:29 | [] | @@ -787,6 +803,7 @@ enclosingMethod | calls.rb:131:16:131:19 | body | calls.rb:131:3:137:5 | foreach | | calls.rb:132:5:132:5 | x | calls.rb:131:3:137:5 | foreach | | calls.rb:132:5:132:9 | ... = ... | calls.rb:131:3:137:5 | foreach | +| calls.rb:132:5:136:7 | ... | calls.rb:131:3:137:5 | foreach | | calls.rb:132:9:132:9 | 0 | calls.rb:131:3:137:5 | foreach | | calls.rb:133:5:136:7 | while ... | calls.rb:131:3:137:5 | foreach | | calls.rb:133:11:133:11 | x | calls.rb:131:3:137:5 | foreach | @@ -805,65 +822,80 @@ enclosingMethod | calls.rb:135:9:135:14 | ... = ... | calls.rb:131:3:137:5 | foreach | | calls.rb:135:11:135:12 | ... + ... | calls.rb:131:3:137:5 | foreach | | calls.rb:135:14:135:14 | 1 | calls.rb:131:3:137:5 | foreach | +| calls.rb:141:5:141:20 | ... | calls.rb:140:1:142:3 | funny | | calls.rb:141:5:141:20 | yield ... | calls.rb:140:1:142:3 | funny | | calls.rb:141:11:141:20 | "prefix: " | calls.rb:140:1:142:3 | funny | | calls.rb:141:12:141:19 | prefix: | calls.rb:140:1:142:3 | funny | | calls.rb:158:14:158:15 | &b | calls.rb:158:1:160:3 | indirect | | calls.rb:158:15:158:15 | b | calls.rb:158:1:160:3 | indirect | +| calls.rb:159:5:159:17 | ... | calls.rb:158:1:160:3 | indirect | | calls.rb:159:5:159:17 | call to call_block | calls.rb:158:1:160:3 | indirect | | calls.rb:159:5:159:17 | self | calls.rb:158:1:160:3 | indirect | | calls.rb:159:16:159:17 | &... | calls.rb:158:1:160:3 | indirect | | calls.rb:159:17:159:17 | b | calls.rb:158:1:160:3 | indirect | | calls.rb:167:9:167:12 | self | calls.rb:166:5:168:7 | s_method | +| calls.rb:167:9:167:17 | ... | calls.rb:166:5:168:7 | s_method | | calls.rb:167:9:167:17 | call to to_s | calls.rb:166:5:168:7 | s_method | | calls.rb:192:9:192:26 | call to puts | calls.rb:191:5:194:7 | singleton_a | | calls.rb:192:9:192:26 | self | calls.rb:191:5:194:7 | singleton_a | +| calls.rb:192:9:193:24 | ... | calls.rb:191:5:194:7 | singleton_a | | calls.rb:192:14:192:26 | "singleton_a" | calls.rb:191:5:194:7 | singleton_a | | calls.rb:192:15:192:25 | singleton_a | calls.rb:191:5:194:7 | singleton_a | | calls.rb:193:9:193:12 | self | calls.rb:191:5:194:7 | singleton_a | | calls.rb:193:9:193:24 | call to singleton_b | calls.rb:191:5:194:7 | singleton_a | | calls.rb:197:9:197:26 | call to puts | calls.rb:196:5:199:7 | singleton_b | | calls.rb:197:9:197:26 | self | calls.rb:196:5:199:7 | singleton_b | +| calls.rb:197:9:198:24 | ... | calls.rb:196:5:199:7 | singleton_b | | calls.rb:197:14:197:26 | "singleton_b" | calls.rb:196:5:199:7 | singleton_b | | calls.rb:197:15:197:25 | singleton_b | calls.rb:196:5:199:7 | singleton_b | | calls.rb:198:9:198:12 | self | calls.rb:196:5:199:7 | singleton_b | | calls.rb:198:9:198:24 | call to singleton_c | calls.rb:196:5:199:7 | singleton_b | +| calls.rb:202:9:202:26 | ... | calls.rb:201:5:203:7 | singleton_c | | calls.rb:202:9:202:26 | call to puts | calls.rb:201:5:203:7 | singleton_c | | calls.rb:202:9:202:26 | self | calls.rb:201:5:203:7 | singleton_c | | calls.rb:202:14:202:26 | "singleton_c" | calls.rb:201:5:203:7 | singleton_c | | calls.rb:202:15:202:25 | singleton_c | calls.rb:201:5:203:7 | singleton_c | | calls.rb:206:9:206:26 | call to puts | calls.rb:205:5:208:7 | singleton_d | | calls.rb:206:9:206:26 | self | calls.rb:205:5:208:7 | singleton_d | +| calls.rb:206:9:207:24 | ... | calls.rb:205:5:208:7 | singleton_d | | calls.rb:206:14:206:26 | "singleton_d" | calls.rb:205:5:208:7 | singleton_d | | calls.rb:206:15:206:25 | singleton_d | calls.rb:205:5:208:7 | singleton_d | | calls.rb:207:9:207:12 | self | calls.rb:205:5:208:7 | singleton_d | | calls.rb:207:9:207:24 | call to singleton_a | calls.rb:205:5:208:7 | singleton_d | | calls.rb:211:9:213:11 | singleton_e | calls.rb:210:5:215:7 | instance | +| calls.rb:211:9:214:19 | ... | calls.rb:210:5:215:7 | instance | | calls.rb:211:13:211:16 | self | calls.rb:210:5:215:7 | instance | +| calls.rb:212:13:212:30 | ... | calls.rb:211:9:213:11 | singleton_e | | calls.rb:212:13:212:30 | call to puts | calls.rb:211:9:213:11 | singleton_e | | calls.rb:212:13:212:30 | self | calls.rb:211:9:213:11 | singleton_e | | calls.rb:212:18:212:30 | "singleton_e" | calls.rb:211:9:213:11 | singleton_e | | calls.rb:212:19:212:29 | singleton_e | calls.rb:211:9:213:11 | singleton_e | | calls.rb:214:9:214:19 | call to singleton_e | calls.rb:210:5:215:7 | instance | | calls.rb:214:9:214:19 | self | calls.rb:210:5:215:7 | instance | +| calls.rb:219:13:219:30 | ... | calls.rb:218:9:220:11 | singleton_f | | calls.rb:219:13:219:30 | call to puts | calls.rb:218:9:220:11 | singleton_f | | calls.rb:219:13:219:30 | self | calls.rb:218:9:220:11 | singleton_f | | calls.rb:219:18:219:30 | "singleton_f" | calls.rb:218:9:220:11 | singleton_f | | calls.rb:219:19:219:29 | singleton_f | calls.rb:218:9:220:11 | singleton_f | | calls.rb:224:9:224:12 | self | calls.rb:223:5:225:7 | call_singleton_g | +| calls.rb:224:9:224:24 | ... | calls.rb:223:5:225:7 | call_singleton_g | | calls.rb:224:9:224:24 | call to singleton_g | calls.rb:223:5:225:7 | call_singleton_g | +| calls.rb:237:5:237:24 | ... | calls.rb:236:1:238:3 | singleton_g | | calls.rb:237:5:237:24 | call to puts | calls.rb:236:1:238:3 | singleton_g | | calls.rb:237:5:237:24 | self | calls.rb:236:1:238:3 | singleton_g | | calls.rb:237:10:237:24 | "singleton_g_1" | calls.rb:236:1:238:3 | singleton_g | | calls.rb:237:11:237:23 | singleton_g_1 | calls.rb:236:1:238:3 | singleton_g | +| calls.rb:244:5:244:24 | ... | calls.rb:243:1:245:3 | singleton_g | | calls.rb:244:5:244:24 | call to puts | calls.rb:243:1:245:3 | singleton_g | | calls.rb:244:5:244:24 | self | calls.rb:243:1:245:3 | singleton_g | | calls.rb:244:10:244:24 | "singleton_g_2" | calls.rb:243:1:245:3 | singleton_g | | calls.rb:244:11:244:23 | singleton_g_2 | calls.rb:243:1:245:3 | singleton_g | +| calls.rb:252:9:252:28 | ... | calls.rb:251:5:253:7 | singleton_g | | calls.rb:252:9:252:28 | call to puts | calls.rb:251:5:253:7 | singleton_g | | calls.rb:252:9:252:28 | self | calls.rb:251:5:253:7 | singleton_g | | calls.rb:252:14:252:28 | "singleton_g_3" | calls.rb:251:5:253:7 | singleton_g | | calls.rb:252:15:252:27 | singleton_g_3 | calls.rb:251:5:253:7 | singleton_g | +| calls.rb:268:5:268:22 | ... | calls.rb:267:1:269:3 | singleton_g | | calls.rb:268:5:268:22 | call to puts | calls.rb:267:1:269:3 | singleton_g | | calls.rb:268:5:268:22 | self | calls.rb:267:1:269:3 | singleton_g | | calls.rb:268:10:268:22 | "singleton_g" | calls.rb:267:1:269:3 | singleton_g | @@ -873,24 +905,29 @@ enclosingMethod | calls.rb:279:5:279:8 | type | calls.rb:278:1:286:3 | create | | calls.rb:279:5:279:12 | call to new | calls.rb:278:1:286:3 | create | | calls.rb:279:5:279:21 | call to instance | calls.rb:278:1:286:3 | create | +| calls.rb:279:5:285:20 | ... | calls.rb:278:1:286:3 | create | | calls.rb:281:5:283:7 | singleton_h | calls.rb:278:1:286:3 | create | | calls.rb:281:9:281:12 | type | calls.rb:278:1:286:3 | create | +| calls.rb:282:9:282:26 | ... | calls.rb:281:5:283:7 | singleton_h | | calls.rb:282:9:282:26 | call to puts | calls.rb:281:5:283:7 | singleton_h | | calls.rb:282:9:282:26 | self | calls.rb:281:5:283:7 | singleton_h | | calls.rb:282:14:282:26 | "singleton_h" | calls.rb:281:5:283:7 | singleton_h | | calls.rb:282:15:282:25 | singleton_h | calls.rb:281:5:283:7 | singleton_h | | calls.rb:285:5:285:8 | type | calls.rb:278:1:286:3 | create | | calls.rb:285:5:285:20 | call to singleton_h | calls.rb:278:1:286:3 | create | +| calls.rb:295:9:295:26 | ... | calls.rb:294:5:296:7 | singleton_i | | calls.rb:295:9:295:26 | call to puts | calls.rb:294:5:296:7 | singleton_i | | calls.rb:295:9:295:26 | self | calls.rb:294:5:296:7 | singleton_i | | calls.rb:295:14:295:26 | "singleton_i" | calls.rb:294:5:296:7 | singleton_i | | calls.rb:295:15:295:25 | singleton_i | calls.rb:294:5:296:7 | singleton_i | +| calls.rb:304:9:304:26 | ... | calls.rb:303:5:305:7 | singleton_j | | calls.rb:304:9:304:26 | call to puts | calls.rb:303:5:305:7 | singleton_j | | calls.rb:304:9:304:26 | self | calls.rb:303:5:305:7 | singleton_j | | calls.rb:304:14:304:26 | "singleton_j" | calls.rb:303:5:305:7 | singleton_j | | calls.rb:304:15:304:25 | singleton_j | calls.rb:303:5:305:7 | singleton_j | | calls.rb:312:9:312:31 | call to puts | calls.rb:311:5:314:7 | instance | | calls.rb:312:9:312:31 | self | calls.rb:311:5:314:7 | instance | +| calls.rb:312:9:313:36 | ... | calls.rb:311:5:314:7 | instance | | calls.rb:312:14:312:31 | "SelfNew#instance" | calls.rb:311:5:314:7 | instance | | calls.rb:312:15:312:30 | SelfNew#instance | calls.rb:311:5:314:7 | instance | | calls.rb:313:9:313:11 | call to new | calls.rb:311:5:314:7 | instance | @@ -898,16 +935,21 @@ enclosingMethod | calls.rb:313:9:313:20 | call to instance | calls.rb:311:5:314:7 | instance | | calls.rb:317:9:317:11 | call to new | calls.rb:316:5:318:7 | singleton | | calls.rb:317:9:317:11 | self | calls.rb:316:5:318:7 | singleton | +| calls.rb:317:9:317:20 | ... | calls.rb:316:5:318:7 | singleton | | calls.rb:317:9:317:20 | call to instance | calls.rb:316:5:318:7 | singleton | +| calls.rb:327:9:327:26 | ... | calls.rb:326:5:328:7 | instance | | calls.rb:327:9:327:26 | call to puts | calls.rb:326:5:328:7 | instance | | calls.rb:327:9:327:26 | self | calls.rb:326:5:328:7 | instance | | calls.rb:327:14:327:26 | "C1#instance" | calls.rb:326:5:328:7 | instance | | calls.rb:327:15:327:25 | C1#instance | calls.rb:326:5:328:7 | instance | +| calls.rb:331:9:331:12 | ... | calls.rb:330:5:332:7 | return_self | | calls.rb:331:9:331:12 | self | calls.rb:330:5:332:7 | return_self | +| calls.rb:337:9:337:26 | ... | calls.rb:336:5:338:7 | instance | | calls.rb:337:9:337:26 | call to puts | calls.rb:336:5:338:7 | instance | | calls.rb:337:9:337:26 | self | calls.rb:336:5:338:7 | instance | | calls.rb:337:14:337:26 | "C2#instance" | calls.rb:336:5:338:7 | instance | | calls.rb:337:15:337:25 | C2#instance | calls.rb:336:5:338:7 | instance | +| calls.rb:343:9:343:26 | ... | calls.rb:342:5:344:7 | instance | | calls.rb:343:9:343:26 | call to puts | calls.rb:342:5:344:7 | instance | | calls.rb:343:9:343:26 | self | calls.rb:342:5:344:7 | instance | | calls.rb:343:14:343:26 | "C3#instance" | calls.rb:342:5:344:7 | instance | @@ -915,6 +957,7 @@ enclosingMethod | calls.rb:347:22:347:22 | x | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:347:22:347:22 | x | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:348:5:356:7 | case ... | calls.rb:347:1:363:3 | pattern_dispatch | +| calls.rb:348:5:362:7 | ... | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:348:10:348:10 | x | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:349:5:350:18 | when ... | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:349:10:349:11 | C3 | calls.rb:347:1:363:3 | pattern_dispatch | @@ -955,89 +998,111 @@ enclosingMethod | calls.rb:361:26:361:36 | call to instance | calls.rb:347:1:363:3 | pattern_dispatch | | calls.rb:374:19:374:19 | x | calls.rb:374:1:378:3 | add_singleton | | calls.rb:374:19:374:19 | x | calls.rb:374:1:378:3 | add_singleton | +| calls.rb:375:5:377:7 | ... | calls.rb:374:1:378:3 | add_singleton | | calls.rb:375:5:377:7 | instance | calls.rb:374:1:378:3 | add_singleton | | calls.rb:375:9:375:9 | x | calls.rb:374:1:378:3 | add_singleton | +| calls.rb:376:9:376:28 | ... | calls.rb:375:5:377:7 | instance | | calls.rb:376:9:376:28 | call to puts | calls.rb:375:5:377:7 | instance | | calls.rb:376:9:376:28 | self | calls.rb:375:5:377:7 | instance | | calls.rb:376:14:376:28 | "instance_on x" | calls.rb:375:5:377:7 | instance | | calls.rb:376:15:376:27 | instance_on x | calls.rb:375:5:377:7 | instance | +| calls.rb:388:13:388:48 | ... | calls.rb:387:9:389:11 | singleton1 | | calls.rb:388:13:388:48 | call to puts | calls.rb:387:9:389:11 | singleton1 | | calls.rb:388:13:388:48 | self | calls.rb:387:9:389:11 | singleton1 | | calls.rb:388:18:388:48 | "SingletonOverride1#singleton1" | calls.rb:387:9:389:11 | singleton1 | | calls.rb:388:19:388:47 | SingletonOverride1#singleton1 | calls.rb:387:9:389:11 | singleton1 | +| calls.rb:392:13:392:22 | ... | calls.rb:391:9:393:11 | call_singleton1 | | calls.rb:392:13:392:22 | call to singleton1 | calls.rb:391:9:393:11 | call_singleton1 | | calls.rb:392:13:392:22 | self | calls.rb:391:9:393:11 | call_singleton1 | | calls.rb:396:13:396:16 | self | calls.rb:395:9:397:11 | factory | | calls.rb:396:13:396:20 | call to new | calls.rb:395:9:397:11 | factory | +| calls.rb:396:13:396:30 | ... | calls.rb:395:9:397:11 | factory | | calls.rb:396:13:396:30 | call to instance1 | calls.rb:395:9:397:11 | factory | +| calls.rb:401:9:401:44 | ... | calls.rb:400:5:402:7 | singleton2 | | calls.rb:401:9:401:44 | call to puts | calls.rb:400:5:402:7 | singleton2 | | calls.rb:401:9:401:44 | self | calls.rb:400:5:402:7 | singleton2 | | calls.rb:401:14:401:44 | "SingletonOverride1#singleton2" | calls.rb:400:5:402:7 | singleton2 | | calls.rb:401:15:401:43 | SingletonOverride1#singleton2 | calls.rb:400:5:402:7 | singleton2 | +| calls.rb:405:9:405:18 | ... | calls.rb:404:5:406:7 | call_singleton2 | | calls.rb:405:9:405:18 | call to singleton2 | calls.rb:404:5:406:7 | call_singleton2 | | calls.rb:405:9:405:18 | self | calls.rb:404:5:406:7 | call_singleton2 | +| calls.rb:411:9:411:43 | ... | calls.rb:410:5:412:7 | instance1 | | calls.rb:411:9:411:43 | call to puts | calls.rb:410:5:412:7 | instance1 | | calls.rb:411:9:411:43 | self | calls.rb:410:5:412:7 | instance1 | | calls.rb:411:14:411:43 | "SingletonOverride1#instance1" | calls.rb:410:5:412:7 | instance1 | | calls.rb:411:15:411:42 | SingletonOverride1#instance1 | calls.rb:410:5:412:7 | instance1 | +| calls.rb:423:13:423:48 | ... | calls.rb:422:9:424:11 | singleton1 | | calls.rb:423:13:423:48 | call to puts | calls.rb:422:9:424:11 | singleton1 | | calls.rb:423:13:423:48 | self | calls.rb:422:9:424:11 | singleton1 | | calls.rb:423:18:423:48 | "SingletonOverride2#singleton1" | calls.rb:422:9:424:11 | singleton1 | | calls.rb:423:19:423:47 | SingletonOverride2#singleton1 | calls.rb:422:9:424:11 | singleton1 | +| calls.rb:428:9:428:44 | ... | calls.rb:427:5:429:7 | singleton2 | | calls.rb:428:9:428:44 | call to puts | calls.rb:427:5:429:7 | singleton2 | | calls.rb:428:9:428:44 | self | calls.rb:427:5:429:7 | singleton2 | | calls.rb:428:14:428:44 | "SingletonOverride2#singleton2" | calls.rb:427:5:429:7 | singleton2 | | calls.rb:428:15:428:43 | SingletonOverride2#singleton2 | calls.rb:427:5:429:7 | singleton2 | +| calls.rb:432:9:432:43 | ... | calls.rb:431:5:433:7 | instance1 | | calls.rb:432:9:432:43 | call to puts | calls.rb:431:5:433:7 | instance1 | | calls.rb:432:9:432:43 | self | calls.rb:431:5:433:7 | instance1 | | calls.rb:432:14:432:43 | "SingletonOverride2#instance1" | calls.rb:431:5:433:7 | instance1 | | calls.rb:432:15:432:42 | SingletonOverride2#instance1 | calls.rb:431:5:433:7 | instance1 | +| calls.rb:444:13:444:48 | ... | calls.rb:443:9:445:11 | m1 | | calls.rb:444:13:444:48 | call to puts | calls.rb:443:9:445:11 | m1 | | calls.rb:444:13:444:48 | self | calls.rb:443:9:445:11 | m1 | | calls.rb:444:18:444:48 | "ConditionalInstanceMethods#m1" | calls.rb:443:9:445:11 | m1 | | calls.rb:444:19:444:47 | ConditionalInstanceMethods#m1 | calls.rb:443:9:445:11 | m1 | | calls.rb:449:9:449:44 | call to puts | calls.rb:448:5:460:7 | m2 | | calls.rb:449:9:449:44 | self | calls.rb:448:5:460:7 | m2 | +| calls.rb:449:9:459:10 | ... | calls.rb:448:5:460:7 | m2 | | calls.rb:449:14:449:44 | "ConditionalInstanceMethods#m2" | calls.rb:448:5:460:7 | m2 | | calls.rb:449:15:449:43 | ConditionalInstanceMethods#m2 | calls.rb:448:5:460:7 | m2 | | calls.rb:451:9:457:11 | m3 | calls.rb:448:5:460:7 | m2 | | calls.rb:452:13:452:48 | call to puts | calls.rb:451:9:457:11 | m3 | | calls.rb:452:13:452:48 | self | calls.rb:451:9:457:11 | m3 | +| calls.rb:452:13:456:15 | ... | calls.rb:451:9:457:11 | m3 | | calls.rb:452:18:452:48 | "ConditionalInstanceMethods#m3" | calls.rb:451:9:457:11 | m3 | | calls.rb:452:19:452:47 | ConditionalInstanceMethods#m3 | calls.rb:451:9:457:11 | m3 | | calls.rb:454:13:456:15 | m4 | calls.rb:451:9:457:11 | m3 | +| calls.rb:455:17:455:52 | ... | calls.rb:454:13:456:15 | m4 | | calls.rb:455:17:455:52 | call to puts | calls.rb:454:13:456:15 | m4 | | calls.rb:455:17:455:52 | self | calls.rb:454:13:456:15 | m4 | | calls.rb:455:22:455:52 | "ConditionalInstanceMethods#m4" | calls.rb:454:13:456:15 | m4 | | calls.rb:455:23:455:51 | ConditionalInstanceMethods#m4 | calls.rb:454:13:456:15 | m4 | | calls.rb:459:9:459:10 | call to m3 | calls.rb:448:5:460:7 | m2 | | calls.rb:459:9:459:10 | self | calls.rb:448:5:460:7 | m2 | +| calls.rb:465:17:465:40 | ... | calls.rb:464:13:466:15 | m5 | | calls.rb:465:17:465:40 | call to puts | calls.rb:464:13:466:15 | m5 | | calls.rb:465:17:465:40 | self | calls.rb:464:13:466:15 | m5 | | calls.rb:465:22:465:40 | "AnonymousClass#m5" | calls.rb:464:13:466:15 | m5 | | calls.rb:465:23:465:39 | AnonymousClass#m5 | calls.rb:464:13:466:15 | m5 | +| calls.rb:481:13:481:22 | ... | calls.rb:480:9:482:11 | foo | | calls.rb:481:13:481:22 | call to puts | calls.rb:480:9:482:11 | foo | | calls.rb:481:13:481:22 | self | calls.rb:480:9:482:11 | foo | | calls.rb:481:18:481:22 | "foo" | calls.rb:480:9:482:11 | foo | | calls.rb:481:19:481:21 | foo | calls.rb:480:9:482:11 | foo | +| calls.rb:487:13:487:22 | ... | calls.rb:486:9:488:11 | bar | | calls.rb:487:13:487:22 | call to puts | calls.rb:486:9:488:11 | bar | | calls.rb:487:13:487:22 | self | calls.rb:486:9:488:11 | bar | | calls.rb:487:18:487:22 | "bar" | calls.rb:486:9:488:11 | bar | | calls.rb:487:19:487:21 | bar | calls.rb:486:9:488:11 | bar | +| calls.rb:506:9:506:46 | ... | calls.rb:505:5:507:7 | singleton | | calls.rb:506:9:506:46 | call to puts | calls.rb:505:5:507:7 | singleton | | calls.rb:506:9:506:46 | self | calls.rb:505:5:507:7 | singleton | | calls.rb:506:14:506:46 | "ExtendSingletonMethod#singleton" | calls.rb:505:5:507:7 | singleton | | calls.rb:506:15:506:45 | ExtendSingletonMethod#singleton | calls.rb:505:5:507:7 | singleton | +| calls.rb:535:9:535:42 | ... | calls.rb:534:15:536:7 | foo | | calls.rb:535:9:535:42 | call to puts | calls.rb:534:15:536:7 | foo | | calls.rb:535:9:535:42 | self | calls.rb:534:15:536:7 | foo | | calls.rb:535:14:535:42 | "ProtectedMethodInModule#foo" | calls.rb:534:15:536:7 | foo | | calls.rb:535:15:535:41 | ProtectedMethodInModule#foo | calls.rb:534:15:536:7 | foo | +| calls.rb:543:9:543:35 | ... | calls.rb:542:15:544:7 | bar | | calls.rb:543:9:543:35 | call to puts | calls.rb:542:15:544:7 | bar | | calls.rb:543:9:543:35 | self | calls.rb:542:15:544:7 | bar | | calls.rb:543:14:543:35 | "ProtectedMethods#bar" | calls.rb:542:15:544:7 | bar | | calls.rb:543:15:543:34 | ProtectedMethods#bar | calls.rb:542:15:544:7 | bar | | calls.rb:547:9:547:11 | call to foo | calls.rb:546:5:551:7 | baz | | calls.rb:547:9:547:11 | self | calls.rb:546:5:551:7 | baz | +| calls.rb:547:9:550:32 | ... | calls.rb:546:5:551:7 | baz | | calls.rb:548:9:548:11 | call to bar | calls.rb:546:5:551:7 | baz | | calls.rb:548:9:548:11 | self | calls.rb:546:5:551:7 | baz | | calls.rb:549:9:549:24 | ProtectedMethods | calls.rb:546:5:551:7 | baz | @@ -1048,28 +1113,39 @@ enclosingMethod | calls.rb:550:9:550:32 | call to bar | calls.rb:546:5:551:7 | baz | | calls.rb:560:9:560:11 | call to foo | calls.rb:559:5:562:7 | baz | | calls.rb:560:9:560:11 | self | calls.rb:559:5:562:7 | baz | +| calls.rb:560:9:561:35 | ... | calls.rb:559:5:562:7 | baz | | calls.rb:561:9:561:27 | ProtectedMethodsSub | calls.rb:559:5:562:7 | baz | | calls.rb:561:9:561:31 | call to new | calls.rb:559:5:562:7 | baz | | calls.rb:561:9:561:35 | call to foo | calls.rb:559:5:562:7 | baz | | calls.rb:580:9:580:17 | call to singleton | calls.rb:579:5:582:7 | mid_method | | calls.rb:580:9:580:17 | self | calls.rb:579:5:582:7 | mid_method | +| calls.rb:580:9:581:35 | ... | calls.rb:579:5:582:7 | mid_method | | calls.rb:581:9:581:18 | call to singleton2 | calls.rb:579:5:582:7 | mid_method | | calls.rb:581:9:581:18 | self | calls.rb:579:5:582:7 | mid_method | +| calls.rb:596:9:596:18 | ... | calls.rb:595:5:597:7 | call_singleton1 | | calls.rb:596:9:596:18 | call to singleton1 | calls.rb:595:5:597:7 | call_singleton1 | | calls.rb:596:9:596:18 | self | calls.rb:595:5:597:7 | call_singleton1 | +| calls.rb:600:9:600:23 | ... | calls.rb:599:5:601:7 | call_call_singleton1 | | calls.rb:600:9:600:23 | call to call_singleton1 | calls.rb:599:5:601:7 | call_call_singleton1 | | calls.rb:600:9:600:23 | self | calls.rb:599:5:601:7 | call_call_singleton1 | | calls.rb:609:9:609:18 | call to singleton1 | calls.rb:608:5:610:7 | call_singleton1 | | calls.rb:609:9:609:18 | self | calls.rb:608:5:610:7 | call_singleton1 | +| calls.rb:609:9:609:105 | ... | calls.rb:608:5:610:7 | call_singleton1 | | calls.rb:618:9:618:18 | call to singleton1 | calls.rb:617:5:619:7 | call_singleton1 | | calls.rb:618:9:618:18 | self | calls.rb:617:5:619:7 | call_singleton1 | +| calls.rb:618:9:618:105 | ... | calls.rb:617:5:619:7 | call_singleton1 | | calls.rb:628:9:628:12 | self | calls.rb:627:5:629:7 | foo | +| calls.rb:628:9:628:16 | ... | calls.rb:627:5:629:7 | foo | | calls.rb:628:9:628:16 | call to bar | calls.rb:627:5:629:7 | foo | +| calls.rb:637:9:637:13 | ... | calls.rb:636:5:638:7 | bar | | calls.rb:637:9:637:13 | super call to bar | calls.rb:636:5:638:7 | bar | | calls.rb:643:9:643:10 | C1 | calls.rb:642:5:644:7 | new | +| calls.rb:643:9:643:14 | ... | calls.rb:642:5:644:7 | new | | calls.rb:643:9:643:14 | call to new | calls.rb:642:5:644:7 | new | | calls.rb:651:9:651:12 | self | calls.rb:650:5:652:7 | new | +| calls.rb:651:9:651:21 | ... | calls.rb:650:5:652:7 | new | | calls.rb:651:9:651:21 | call to allocate | calls.rb:650:5:652:7 | new | +| calls.rb:655:9:655:34 | ... | calls.rb:654:5:656:7 | instance | | calls.rb:655:9:655:34 | call to puts | calls.rb:654:5:656:7 | instance | | calls.rb:655:9:655:34 | self | calls.rb:654:5:656:7 | instance | | calls.rb:655:14:655:34 | "CustomNew2#instance" | calls.rb:654:5:656:7 | instance | @@ -1079,27 +1155,34 @@ enclosingMethod | calls.rb:662:5:662:11 | Array | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:5:662:11 | [...] | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:5:662:11 | call to [] | calls.rb:661:1:665:3 | capture_parameter | +| calls.rb:662:5:664:7 | ... | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:5:664:7 | call to each | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:6:662:6 | 0 | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:8:662:8 | 1 | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:10:662:10 | 2 | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:662:18:664:7 | do ... end | calls.rb:661:1:665:3 | capture_parameter | +| calls.rb:663:9:663:9 | ... | calls.rb:661:1:665:3 | capture_parameter | | calls.rb:663:9:663:9 | x | calls.rb:661:1:665:3 | capture_parameter | | element_reference.rb:2:12:2:12 | x | element_reference.rb:2:5:4:7 | [] | | element_reference.rb:2:12:2:12 | x | element_reference.rb:2:5:4:7 | [] | +| element_reference.rb:3:9:3:19 | ... | element_reference.rb:2:5:4:7 | [] | | element_reference.rb:3:9:3:19 | yield ... | element_reference.rb:2:5:4:7 | [] | | element_reference.rb:3:15:3:15 | x | element_reference.rb:2:5:4:7 | [] | | element_reference.rb:3:15:3:19 | ... + ... | element_reference.rb:2:5:4:7 | [] | | element_reference.rb:3:19:3:19 | 1 | element_reference.rb:2:5:4:7 | [] | +| hello.rb:3:9:3:22 | ... | hello.rb:2:5:4:7 | hello | | hello.rb:3:9:3:22 | return | hello.rb:2:5:4:7 | hello | | hello.rb:3:16:3:22 | "hello" | hello.rb:2:5:4:7 | hello | | hello.rb:3:17:3:21 | hello | hello.rb:2:5:4:7 | hello | +| hello.rb:6:9:6:22 | ... | hello.rb:5:5:7:7 | world | | hello.rb:6:9:6:22 | return | hello.rb:5:5:7:7 | world | | hello.rb:6:16:6:22 | "world" | hello.rb:5:5:7:7 | world | | hello.rb:6:17:6:21 | world | hello.rb:5:5:7:7 | world | +| hello.rb:14:9:14:20 | ... | hello.rb:13:5:15:7 | message | | hello.rb:14:9:14:20 | return | hello.rb:13:5:15:7 | message | | hello.rb:14:16:14:20 | call to hello | hello.rb:13:5:15:7 | message | | hello.rb:14:16:14:20 | self | hello.rb:13:5:15:7 | message | +| hello.rb:20:9:20:40 | ... | hello.rb:19:5:21:7 | message | | hello.rb:20:9:20:40 | return | hello.rb:19:5:21:7 | message | | hello.rb:20:16:20:20 | super call to message | hello.rb:19:5:21:7 | message | | hello.rb:20:16:20:26 | ... + ... | hello.rb:19:5:21:7 | message | @@ -1113,32 +1196,40 @@ enclosingMethod | hello.rb:20:39:20:39 | ! | hello.rb:19:5:21:7 | message | | instance_fields.rb:4:13:4:18 | @field | instance_fields.rb:3:9:5:11 | create | | instance_fields.rb:4:13:4:18 | self | instance_fields.rb:3:9:5:11 | create | +| instance_fields.rb:4:13:4:35 | ... | instance_fields.rb:3:9:5:11 | create | | instance_fields.rb:4:13:4:35 | ... = ... | instance_fields.rb:3:9:5:11 | create | | instance_fields.rb:4:22:4:31 | A_target | instance_fields.rb:3:9:5:11 | create | | instance_fields.rb:4:22:4:35 | call to new | instance_fields.rb:3:9:5:11 | create | | instance_fields.rb:7:13:7:18 | @field | instance_fields.rb:6:9:8:11 | use | | instance_fields.rb:7:13:7:18 | self | instance_fields.rb:6:9:8:11 | use | +| instance_fields.rb:7:13:7:25 | ... | instance_fields.rb:6:9:8:11 | use | | instance_fields.rb:7:13:7:25 | call to target | instance_fields.rb:6:9:8:11 | use | | instance_fields.rb:19:13:19:18 | @field | instance_fields.rb:18:9:20:11 | create | | instance_fields.rb:19:13:19:18 | self | instance_fields.rb:18:9:20:11 | create | +| instance_fields.rb:19:13:19:35 | ... | instance_fields.rb:18:9:20:11 | create | | instance_fields.rb:19:13:19:35 | ... = ... | instance_fields.rb:18:9:20:11 | create | | instance_fields.rb:19:22:19:31 | B_target | instance_fields.rb:18:9:20:11 | create | | instance_fields.rb:19:22:19:35 | call to new | instance_fields.rb:18:9:20:11 | create | | instance_fields.rb:22:13:22:18 | @field | instance_fields.rb:21:9:23:11 | use | | instance_fields.rb:22:13:22:18 | self | instance_fields.rb:21:9:23:11 | use | +| instance_fields.rb:22:13:22:25 | ... | instance_fields.rb:21:9:23:11 | use | | instance_fields.rb:22:13:22:25 | call to target | instance_fields.rb:21:9:23:11 | use | +| private.rb:84:7:84:32 | ... | private.rb:83:11:85:5 | m1 | | private.rb:84:7:84:32 | call to puts | private.rb:83:11:85:5 | m1 | | private.rb:84:7:84:32 | self | private.rb:83:11:85:5 | m1 | | private.rb:84:12:84:32 | "PrivateOverride1#m1" | private.rb:83:11:85:5 | m1 | | private.rb:84:13:84:31 | PrivateOverride1#m1 | private.rb:83:11:85:5 | m1 | +| private.rb:88:7:88:32 | ... | private.rb:87:11:89:5 | m2 | | private.rb:88:7:88:32 | call to puts | private.rb:87:11:89:5 | m2 | | private.rb:88:7:88:32 | self | private.rb:87:11:89:5 | m2 | | private.rb:88:12:88:32 | "PrivateOverride1#m2" | private.rb:87:11:89:5 | m2 | | private.rb:88:13:88:31 | PrivateOverride1#m2 | private.rb:87:11:89:5 | m2 | +| private.rb:92:7:92:8 | ... | private.rb:91:3:93:5 | call_m1 | | private.rb:92:7:92:8 | call to m1 | private.rb:91:3:93:5 | call_m1 | | private.rb:92:7:92:8 | self | private.rb:91:3:93:5 | call_m1 | | private.rb:98:7:98:32 | call to puts | private.rb:97:11:101:5 | m1 | | private.rb:98:7:98:32 | self | private.rb:97:11:101:5 | m1 | +| private.rb:98:7:100:45 | ... | private.rb:97:11:101:5 | m1 | | private.rb:98:12:98:32 | "PrivateOverride2#m1" | private.rb:97:11:101:5 | m1 | | private.rb:98:13:98:31 | PrivateOverride2#m1 | private.rb:97:11:101:5 | m1 | | private.rb:99:7:99:8 | call to m2 | private.rb:97:11:101:5 | m1 | @@ -1148,11 +1239,15 @@ enclosingMethod | private.rb:100:7:100:29 | call to m1 | private.rb:97:11:101:5 | m1 | | toplevel_self_singleton.rb:10:9:10:27 | call to ab_singleton_method | toplevel_self_singleton.rb:9:5:11:7 | method_in_block | | toplevel_self_singleton.rb:10:9:10:27 | self | toplevel_self_singleton.rb:9:5:11:7 | method_in_block | +| toplevel_self_singleton.rb:10:9:10:60 | ... | toplevel_self_singleton.rb:9:5:11:7 | method_in_block | | toplevel_self_singleton.rb:14:9:14:27 | call to ab_singleton_method | toplevel_self_singleton.rb:13:5:15:7 | method_in_block | | toplevel_self_singleton.rb:14:9:14:27 | self | toplevel_self_singleton.rb:13:5:15:7 | method_in_block | +| toplevel_self_singleton.rb:14:9:14:60 | ... | toplevel_self_singleton.rb:13:5:15:7 | method_in_block | | toplevel_self_singleton.rb:20:9:20:27 | call to ab_singleton_method | toplevel_self_singleton.rb:19:5:21:7 | method_in_struct | | toplevel_self_singleton.rb:20:9:20:27 | self | toplevel_self_singleton.rb:19:5:21:7 | method_in_struct | +| toplevel_self_singleton.rb:20:9:20:60 | ... | toplevel_self_singleton.rb:19:5:21:7 | method_in_struct | | toplevel_self_singleton.rb:30:13:30:19 | call to call_me | toplevel_self_singleton.rb:29:9:32:11 | call_you | | toplevel_self_singleton.rb:30:13:30:19 | self | toplevel_self_singleton.rb:29:9:32:11 | call_you | +| toplevel_self_singleton.rb:30:13:31:20 | ... | toplevel_self_singleton.rb:29:9:32:11 | call_you | | toplevel_self_singleton.rb:31:13:31:20 | call to call_you | toplevel_self_singleton.rb:29:9:32:11 | call_you | | toplevel_self_singleton.rb:31:13:31:20 | self | toplevel_self_singleton.rb:29:9:32:11 | call_you | diff --git a/ruby/ql/test/library-tests/modules/modules.expected b/ruby/ql/test/library-tests/modules/modules.expected index 967e90decaa..09a2236772a 100644 --- a/ruby/ql/test/library-tests/modules/modules.expected +++ b/ruby/ql/test/library-tests/modules/modules.expected @@ -571,6 +571,7 @@ resolveConstantWriteAccess | unresolved_subclass.rb:21:1:22:3 | A | UnresolvedNamespace::X1::X2::X3::A | enclosingModule | calls.rb:1:1:3:3 | foo | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:2:5:2:14 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:2:5:2:14 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:2:5:2:14 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:2:10:2:14 | "foo" | calls.rb:1:1:667:52 | calls.rb | @@ -579,6 +580,7 @@ enclosingModule | calls.rb:5:1:5:3 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:7:1:9:3 | bar | calls.rb:1:1:667:52 | calls.rb | | calls.rb:7:5:7:8 | self | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:8:5:8:15 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:8:5:8:15 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:8:5:8:15 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:8:10:8:15 | "bar1" | calls.rb:1:1:667:52 | calls.rb | @@ -587,6 +589,7 @@ enclosingModule | calls.rb:11:1:11:8 | call to bar | calls.rb:1:1:667:52 | calls.rb | | calls.rb:13:1:15:3 | bar | calls.rb:1:1:667:52 | calls.rb | | calls.rb:13:5:13:8 | self | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:14:5:14:15 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:14:5:14:15 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:14:5:14:15 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:14:10:14:15 | "bar2" | calls.rb:1:1:667:52 | calls.rb | @@ -599,10 +602,12 @@ enclosingModule | calls.rb:22:5:24:7 | instance_m | calls.rb:21:1:34:3 | M | | calls.rb:23:9:23:19 | call to singleton_m | calls.rb:21:1:34:3 | M | | calls.rb:23:9:23:19 | self | calls.rb:21:1:34:3 | M | +| calls.rb:23:9:23:35 | ... | calls.rb:21:1:34:3 | M | | calls.rb:25:5:27:7 | singleton_m | calls.rb:21:1:34:3 | M | | calls.rb:25:9:25:12 | self | calls.rb:21:1:34:3 | M | | calls.rb:26:9:26:18 | call to instance_m | calls.rb:21:1:34:3 | M | | calls.rb:26:9:26:18 | self | calls.rb:21:1:34:3 | M | +| calls.rb:26:9:26:34 | ... | calls.rb:21:1:34:3 | M | | calls.rb:29:5:29:14 | call to instance_m | calls.rb:21:1:34:3 | M | | calls.rb:29:5:29:14 | self | calls.rb:21:1:34:3 | M | | calls.rb:30:5:30:8 | self | calls.rb:21:1:34:3 | M | @@ -618,6 +623,7 @@ enclosingModule | calls.rb:39:1:41:3 | call_instance_m | calls.rb:1:1:667:52 | calls.rb | | calls.rb:40:5:40:14 | call to instance_m | calls.rb:1:1:667:52 | calls.rb | | calls.rb:40:5:40:14 | self | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:40:5:40:30 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:43:1:58:3 | C | calls.rb:1:1:667:52 | calls.rb | | calls.rb:44:5:44:13 | call to include | calls.rb:43:1:58:3 | C | | calls.rb:44:5:44:13 | self | calls.rb:43:1:58:3 | C | @@ -633,6 +639,7 @@ enclosingModule | calls.rb:51:5:57:7 | baz | calls.rb:43:1:58:3 | C | | calls.rb:52:9:52:18 | call to instance_m | calls.rb:43:1:58:3 | C | | calls.rb:52:9:52:18 | self | calls.rb:43:1:58:3 | C | +| calls.rb:52:9:56:40 | ... | calls.rb:43:1:58:3 | C | | calls.rb:53:9:53:12 | self | calls.rb:43:1:58:3 | C | | calls.rb:53:9:53:23 | call to instance_m | calls.rb:43:1:58:3 | C | | calls.rb:55:9:55:19 | call to singleton_m | calls.rb:43:1:58:3 | C | @@ -652,6 +659,7 @@ enclosingModule | calls.rb:65:1:69:3 | D | calls.rb:1:1:667:52 | calls.rb | | calls.rb:65:11:65:11 | C | calls.rb:1:1:667:52 | calls.rb | | calls.rb:66:5:68:7 | baz | calls.rb:65:1:69:3 | D | +| calls.rb:67:9:67:13 | ... | calls.rb:65:1:69:3 | D | | calls.rb:67:9:67:13 | super call to baz | calls.rb:65:1:69:3 | D | | calls.rb:71:1:71:1 | d | calls.rb:1:1:667:52 | calls.rb | | calls.rb:71:1:71:9 | ... = ... | calls.rb:1:1:667:52 | calls.rb | @@ -672,14 +680,17 @@ enclosingModule | calls.rb:76:28:76:28 | 5 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:77:5:77:5 | a | calls.rb:1:1:667:52 | calls.rb | | calls.rb:77:5:77:16 | call to bit_length | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:77:5:78:16 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:78:5:78:5 | b | calls.rb:1:1:667:52 | calls.rb | | calls.rb:78:5:78:16 | call to bit_length | calls.rb:1:1:667:52 | calls.rb | | calls.rb:81:1:83:3 | call_block | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:82:5:82:11 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:82:5:82:11 | yield ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:82:11:82:11 | 1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:85:1:89:3 | foo | calls.rb:1:1:667:52 | calls.rb | | calls.rb:86:5:86:7 | var | calls.rb:1:1:667:52 | calls.rb | | calls.rb:86:5:86:18 | ... = ... | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:86:5:88:29 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:86:11:86:14 | Hash | calls.rb:1:1:667:52 | calls.rb | | calls.rb:86:11:86:18 | call to new | calls.rb:1:1:667:52 | calls.rb | | calls.rb:87:5:87:7 | var | calls.rb:1:1:667:52 | calls.rb | @@ -691,6 +702,7 @@ enclosingModule | calls.rb:88:19:88:19 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:88:19:88:19 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:88:22:88:24 | var | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:88:22:88:27 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:88:22:88:27 | ...[...] | calls.rb:1:1:667:52 | calls.rb | | calls.rb:88:26:88:26 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:91:1:94:3 | Integer | calls.rb:1:1:667:52 | calls.rb | @@ -707,6 +719,7 @@ enclosingModule | calls.rb:102:5:102:30 | puts | calls.rb:100:1:103:3 | Kernel | | calls.rb:102:14:102:14 | x | calls.rb:100:1:103:3 | Kernel | | calls.rb:102:14:102:14 | x | calls.rb:100:1:103:3 | Kernel | +| calls.rb:102:17:102:26 | ... | calls.rb:100:1:103:3 | Kernel | | calls.rb:102:17:102:26 | call to old_puts | calls.rb:100:1:103:3 | Kernel | | calls.rb:102:17:102:26 | self | calls.rb:100:1:103:3 | Kernel | | calls.rb:102:26:102:26 | x | calls.rb:100:1:103:3 | Kernel | @@ -720,6 +733,7 @@ enclosingModule | calls.rb:108:5:110:7 | include | calls.rb:105:1:113:3 | Module | | calls.rb:108:17:108:17 | x | calls.rb:105:1:113:3 | Module | | calls.rb:108:17:108:17 | x | calls.rb:105:1:113:3 | Module | +| calls.rb:109:9:109:21 | ... | calls.rb:105:1:113:3 | Module | | calls.rb:109:9:109:21 | call to old_include | calls.rb:105:1:113:3 | Module | | calls.rb:109:9:109:21 | self | calls.rb:105:1:113:3 | Module | | calls.rb:109:21:109:21 | x | calls.rb:105:1:113:3 | Module | @@ -740,6 +754,7 @@ enclosingModule | calls.rb:122:5:122:31 | [] | calls.rb:120:1:123:3 | Hash | | calls.rb:122:12:122:12 | x | calls.rb:120:1:123:3 | Hash | | calls.rb:122:12:122:12 | x | calls.rb:120:1:123:3 | Hash | +| calls.rb:122:15:122:27 | ... | calls.rb:120:1:123:3 | Hash | | calls.rb:122:15:122:27 | call to old_lookup | calls.rb:120:1:123:3 | Hash | | calls.rb:122:15:122:27 | self | calls.rb:120:1:123:3 | Hash | | calls.rb:122:26:122:26 | x | calls.rb:120:1:123:3 | Hash | @@ -752,6 +767,7 @@ enclosingModule | calls.rb:127:3:127:29 | [] | calls.rb:125:1:138:3 | Array | | calls.rb:127:10:127:10 | x | calls.rb:125:1:138:3 | Array | | calls.rb:127:10:127:10 | x | calls.rb:125:1:138:3 | Array | +| calls.rb:127:13:127:25 | ... | calls.rb:125:1:138:3 | Array | | calls.rb:127:13:127:25 | call to old_lookup | calls.rb:125:1:138:3 | Array | | calls.rb:127:13:127:25 | self | calls.rb:125:1:138:3 | Array | | calls.rb:127:24:127:24 | x | calls.rb:125:1:138:3 | Array | @@ -761,6 +777,7 @@ enclosingModule | calls.rb:131:16:131:19 | body | calls.rb:125:1:138:3 | Array | | calls.rb:132:5:132:5 | x | calls.rb:125:1:138:3 | Array | | calls.rb:132:5:132:9 | ... = ... | calls.rb:125:1:138:3 | Array | +| calls.rb:132:5:136:7 | ... | calls.rb:125:1:138:3 | Array | | calls.rb:132:9:132:9 | 0 | calls.rb:125:1:138:3 | Array | | calls.rb:133:5:136:7 | while ... | calls.rb:125:1:138:3 | Array | | calls.rb:133:11:133:11 | x | calls.rb:125:1:138:3 | Array | @@ -780,6 +797,7 @@ enclosingModule | calls.rb:135:11:135:12 | ... + ... | calls.rb:125:1:138:3 | Array | | calls.rb:135:14:135:14 | 1 | calls.rb:125:1:138:3 | Array | | calls.rb:140:1:142:3 | funny | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:141:5:141:20 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:141:5:141:20 | yield ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:141:11:141:20 | "prefix: " | calls.rb:1:1:667:52 | calls.rb | | calls.rb:141:12:141:19 | prefix: | calls.rb:1:1:667:52 | calls.rb | @@ -788,6 +806,7 @@ enclosingModule | calls.rb:144:7:144:30 | { ... } | calls.rb:1:1:667:52 | calls.rb | | calls.rb:144:10:144:10 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:144:10:144:10 | i | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:144:13:144:29 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:144:13:144:29 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:144:13:144:29 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:144:18:144:18 | i | calls.rb:1:1:667:52 | calls.rb | @@ -814,6 +833,7 @@ enclosingModule | calls.rb:150:26:150:26 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:150:29:150:29 | v | calls.rb:1:1:667:52 | calls.rb | | calls.rb:150:29:150:29 | v | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:150:32:150:61 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:150:32:150:61 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:150:32:150:61 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:150:37:150:61 | "#{...} -> #{...}" | calls.rb:1:1:667:52 | calls.rb | @@ -834,6 +854,7 @@ enclosingModule | calls.rb:152:20:152:20 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:152:20:152:20 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:152:23:152:23 | i | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:152:23:152:34 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:152:23:152:34 | call to bit_length | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:1:154:7 | Array | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:1:154:7 | [...] | calls.rb:1:1:667:52 | calls.rb | @@ -845,6 +866,7 @@ enclosingModule | calls.rb:154:17:154:40 | { ... } | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:20:154:20 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:20:154:20 | i | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:154:23:154:39 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:23:154:39 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:23:154:39 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:154:28:154:28 | i | calls.rb:1:1:667:52 | calls.rb | @@ -862,6 +884,7 @@ enclosingModule | calls.rb:156:21:156:21 | _ | calls.rb:1:1:667:52 | calls.rb | | calls.rb:156:24:156:24 | v | calls.rb:1:1:667:52 | calls.rb | | calls.rb:156:24:156:24 | v | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:156:27:156:36 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:156:27:156:36 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:156:27:156:36 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:156:32:156:32 | v | calls.rb:1:1:667:52 | calls.rb | @@ -869,6 +892,7 @@ enclosingModule | calls.rb:158:1:160:3 | indirect | calls.rb:1:1:667:52 | calls.rb | | calls.rb:158:14:158:15 | &b | calls.rb:1:1:667:52 | calls.rb | | calls.rb:158:15:158:15 | b | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:159:5:159:17 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:159:5:159:17 | call to call_block | calls.rb:1:1:667:52 | calls.rb | | calls.rb:159:5:159:17 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:159:16:159:17 | &... | calls.rb:1:1:667:52 | calls.rb | @@ -879,10 +903,12 @@ enclosingModule | calls.rb:162:13:162:13 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:162:13:162:13 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:162:16:162:16 | i | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:162:16:162:27 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:162:16:162:27 | call to bit_length | calls.rb:1:1:667:52 | calls.rb | | calls.rb:165:1:169:3 | S | calls.rb:1:1:667:52 | calls.rb | | calls.rb:166:5:168:7 | s_method | calls.rb:165:1:169:3 | S | | calls.rb:167:9:167:12 | self | calls.rb:165:1:169:3 | S | +| calls.rb:167:9:167:17 | ... | calls.rb:165:1:169:3 | S | | calls.rb:167:9:167:17 | call to to_s | calls.rb:165:1:169:3 | S | | calls.rb:171:1:174:3 | A | calls.rb:1:1:667:52 | calls.rb | | calls.rb:171:11:171:11 | S | calls.rb:1:1:667:52 | calls.rb | @@ -907,6 +933,7 @@ enclosingModule | calls.rb:191:9:191:12 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:192:9:192:26 | call to puts | calls.rb:190:1:226:3 | Singletons | | calls.rb:192:9:192:26 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:192:9:193:24 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:192:14:192:26 | "singleton_a" | calls.rb:190:1:226:3 | Singletons | | calls.rb:192:15:192:25 | singleton_a | calls.rb:190:1:226:3 | Singletons | | calls.rb:193:9:193:12 | self | calls.rb:190:1:226:3 | Singletons | @@ -915,12 +942,14 @@ enclosingModule | calls.rb:196:9:196:12 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:197:9:197:26 | call to puts | calls.rb:190:1:226:3 | Singletons | | calls.rb:197:9:197:26 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:197:9:198:24 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:197:14:197:26 | "singleton_b" | calls.rb:190:1:226:3 | Singletons | | calls.rb:197:15:197:25 | singleton_b | calls.rb:190:1:226:3 | Singletons | | calls.rb:198:9:198:12 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:198:9:198:24 | call to singleton_c | calls.rb:190:1:226:3 | Singletons | | calls.rb:201:5:203:7 | singleton_c | calls.rb:190:1:226:3 | Singletons | | calls.rb:201:9:201:12 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:202:9:202:26 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:202:9:202:26 | call to puts | calls.rb:190:1:226:3 | Singletons | | calls.rb:202:9:202:26 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:202:14:202:26 | "singleton_c" | calls.rb:190:1:226:3 | Singletons | @@ -929,13 +958,16 @@ enclosingModule | calls.rb:205:9:205:12 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:206:9:206:26 | call to puts | calls.rb:190:1:226:3 | Singletons | | calls.rb:206:9:206:26 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:206:9:207:24 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:206:14:206:26 | "singleton_d" | calls.rb:190:1:226:3 | Singletons | | calls.rb:206:15:206:25 | singleton_d | calls.rb:190:1:226:3 | Singletons | | calls.rb:207:9:207:12 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:207:9:207:24 | call to singleton_a | calls.rb:190:1:226:3 | Singletons | | calls.rb:210:5:215:7 | instance | calls.rb:190:1:226:3 | Singletons | | calls.rb:211:9:213:11 | singleton_e | calls.rb:190:1:226:3 | Singletons | +| calls.rb:211:9:214:19 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:211:13:211:16 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:212:13:212:30 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:212:13:212:30 | call to puts | calls.rb:190:1:226:3 | Singletons | | calls.rb:212:13:212:30 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:212:18:212:30 | "singleton_e" | calls.rb:190:1:226:3 | Singletons | @@ -945,12 +977,14 @@ enclosingModule | calls.rb:217:5:221:7 | class << ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:217:14:217:17 | self | calls.rb:190:1:226:3 | Singletons | | calls.rb:218:9:220:11 | singleton_f | calls.rb:217:5:221:7 | class << ... | +| calls.rb:219:13:219:30 | ... | calls.rb:217:5:221:7 | class << ... | | calls.rb:219:13:219:30 | call to puts | calls.rb:217:5:221:7 | class << ... | | calls.rb:219:13:219:30 | self | calls.rb:217:5:221:7 | class << ... | | calls.rb:219:18:219:30 | "singleton_f" | calls.rb:217:5:221:7 | class << ... | | calls.rb:219:19:219:29 | singleton_f | calls.rb:217:5:221:7 | class << ... | | calls.rb:223:5:225:7 | call_singleton_g | calls.rb:190:1:226:3 | Singletons | | calls.rb:224:9:224:12 | self | calls.rb:190:1:226:3 | Singletons | +| calls.rb:224:9:224:24 | ... | calls.rb:190:1:226:3 | Singletons | | calls.rb:224:9:224:24 | call to singleton_g | calls.rb:190:1:226:3 | Singletons | | calls.rb:228:1:228:10 | Singletons | calls.rb:1:1:667:52 | calls.rb | | calls.rb:228:1:228:22 | call to singleton_a | calls.rb:1:1:667:52 | calls.rb | @@ -966,6 +1000,7 @@ enclosingModule | calls.rb:234:1:234:14 | call to singleton_e | calls.rb:1:1:667:52 | calls.rb | | calls.rb:236:1:238:3 | singleton_g | calls.rb:1:1:667:52 | calls.rb | | calls.rb:236:5:236:6 | c1 | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:237:5:237:24 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:237:5:237:24 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:237:5:237:24 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:237:10:237:24 | "singleton_g_1" | calls.rb:1:1:667:52 | calls.rb | @@ -976,6 +1011,7 @@ enclosingModule | calls.rb:241:1:241:19 | call to call_singleton_g | calls.rb:1:1:667:52 | calls.rb | | calls.rb:243:1:245:3 | singleton_g | calls.rb:1:1:667:52 | calls.rb | | calls.rb:243:5:243:6 | c1 | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:244:5:244:24 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:244:5:244:24 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:244:5:244:24 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:244:10:244:24 | "singleton_g_2" | calls.rb:1:1:667:52 | calls.rb | @@ -987,6 +1023,7 @@ enclosingModule | calls.rb:250:1:254:3 | class << ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:250:10:250:11 | c1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:251:5:253:7 | singleton_g | calls.rb:250:1:254:3 | class << ... | +| calls.rb:252:9:252:28 | ... | calls.rb:250:1:254:3 | class << ... | | calls.rb:252:9:252:28 | call to puts | calls.rb:250:1:254:3 | class << ... | | calls.rb:252:9:252:28 | self | calls.rb:250:1:254:3 | class << ... | | calls.rb:252:14:252:28 | "singleton_g_3" | calls.rb:250:1:254:3 | class << ... | @@ -1011,6 +1048,7 @@ enclosingModule | calls.rb:265:7:265:15 | top-level | calls.rb:1:1:667:52 | calls.rb | | calls.rb:267:1:269:3 | singleton_g | calls.rb:1:1:667:52 | calls.rb | | calls.rb:267:5:267:14 | Singletons | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:268:5:268:22 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:268:5:268:22 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:268:5:268:22 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:268:10:268:22 | "singleton_g" | calls.rb:1:1:667:52 | calls.rb | @@ -1035,8 +1073,10 @@ enclosingModule | calls.rb:279:5:279:8 | type | calls.rb:1:1:667:52 | calls.rb | | calls.rb:279:5:279:12 | call to new | calls.rb:1:1:667:52 | calls.rb | | calls.rb:279:5:279:21 | call to instance | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:279:5:285:20 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:281:5:283:7 | singleton_h | calls.rb:1:1:667:52 | calls.rb | | calls.rb:281:9:281:12 | type | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:282:9:282:26 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:282:9:282:26 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:282:9:282:26 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:282:14:282:26 | "singleton_h" | calls.rb:1:1:667:52 | calls.rb | @@ -1054,6 +1094,7 @@ enclosingModule | calls.rb:293:1:297:3 | class << ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:293:10:293:10 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:294:5:296:7 | singleton_i | calls.rb:293:1:297:3 | class << ... | +| calls.rb:295:9:295:26 | ... | calls.rb:293:1:297:3 | class << ... | | calls.rb:295:9:295:26 | call to puts | calls.rb:293:1:297:3 | class << ... | | calls.rb:295:9:295:26 | self | calls.rb:293:1:297:3 | class << ... | | calls.rb:295:14:295:26 | "singleton_i" | calls.rb:293:1:297:3 | class << ... | @@ -1065,6 +1106,7 @@ enclosingModule | calls.rb:302:1:306:3 | class << ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:302:10:302:19 | Singletons | calls.rb:1:1:667:52 | calls.rb | | calls.rb:303:5:305:7 | singleton_j | calls.rb:302:1:306:3 | class << ... | +| calls.rb:304:9:304:26 | ... | calls.rb:302:1:306:3 | class << ... | | calls.rb:304:9:304:26 | call to puts | calls.rb:302:1:306:3 | class << ... | | calls.rb:304:9:304:26 | self | calls.rb:302:1:306:3 | class << ... | | calls.rb:304:14:304:26 | "singleton_j" | calls.rb:302:1:306:3 | class << ... | @@ -1075,6 +1117,7 @@ enclosingModule | calls.rb:311:5:314:7 | instance | calls.rb:310:1:321:3 | SelfNew | | calls.rb:312:9:312:31 | call to puts | calls.rb:310:1:321:3 | SelfNew | | calls.rb:312:9:312:31 | self | calls.rb:310:1:321:3 | SelfNew | +| calls.rb:312:9:313:36 | ... | calls.rb:310:1:321:3 | SelfNew | | calls.rb:312:14:312:31 | "SelfNew#instance" | calls.rb:310:1:321:3 | SelfNew | | calls.rb:312:15:312:30 | SelfNew#instance | calls.rb:310:1:321:3 | SelfNew | | calls.rb:313:9:313:11 | call to new | calls.rb:310:1:321:3 | SelfNew | @@ -1084,6 +1127,7 @@ enclosingModule | calls.rb:316:9:316:12 | self | calls.rb:310:1:321:3 | SelfNew | | calls.rb:317:9:317:11 | call to new | calls.rb:310:1:321:3 | SelfNew | | calls.rb:317:9:317:11 | self | calls.rb:310:1:321:3 | SelfNew | +| calls.rb:317:9:317:20 | ... | calls.rb:310:1:321:3 | SelfNew | | calls.rb:317:9:317:20 | call to instance | calls.rb:310:1:321:3 | SelfNew | | calls.rb:320:5:320:7 | call to new | calls.rb:310:1:321:3 | SelfNew | | calls.rb:320:5:320:7 | self | calls.rb:310:1:321:3 | SelfNew | @@ -1092,15 +1136,18 @@ enclosingModule | calls.rb:323:1:323:17 | call to singleton | calls.rb:1:1:667:52 | calls.rb | | calls.rb:325:1:333:3 | C1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:326:5:328:7 | instance | calls.rb:325:1:333:3 | C1 | +| calls.rb:327:9:327:26 | ... | calls.rb:325:1:333:3 | C1 | | calls.rb:327:9:327:26 | call to puts | calls.rb:325:1:333:3 | C1 | | calls.rb:327:9:327:26 | self | calls.rb:325:1:333:3 | C1 | | calls.rb:327:14:327:26 | "C1#instance" | calls.rb:325:1:333:3 | C1 | | calls.rb:327:15:327:25 | C1#instance | calls.rb:325:1:333:3 | C1 | | calls.rb:330:5:332:7 | return_self | calls.rb:325:1:333:3 | C1 | +| calls.rb:331:9:331:12 | ... | calls.rb:325:1:333:3 | C1 | | calls.rb:331:9:331:12 | self | calls.rb:325:1:333:3 | C1 | | calls.rb:335:1:339:3 | C2 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:335:12:335:13 | C1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:336:5:338:7 | instance | calls.rb:335:1:339:3 | C2 | +| calls.rb:337:9:337:26 | ... | calls.rb:335:1:339:3 | C2 | | calls.rb:337:9:337:26 | call to puts | calls.rb:335:1:339:3 | C2 | | calls.rb:337:9:337:26 | self | calls.rb:335:1:339:3 | C2 | | calls.rb:337:14:337:26 | "C2#instance" | calls.rb:335:1:339:3 | C2 | @@ -1108,6 +1155,7 @@ enclosingModule | calls.rb:341:1:345:3 | C3 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:341:12:341:13 | C2 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:342:5:344:7 | instance | calls.rb:341:1:345:3 | C3 | +| calls.rb:343:9:343:26 | ... | calls.rb:341:1:345:3 | C3 | | calls.rb:343:9:343:26 | call to puts | calls.rb:341:1:345:3 | C3 | | calls.rb:343:9:343:26 | self | calls.rb:341:1:345:3 | C3 | | calls.rb:343:14:343:26 | "C3#instance" | calls.rb:341:1:345:3 | C3 | @@ -1116,6 +1164,7 @@ enclosingModule | calls.rb:347:22:347:22 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:347:22:347:22 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:348:5:356:7 | case ... | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:348:5:362:7 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:348:10:348:10 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:349:5:350:18 | when ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:349:10:349:11 | C3 | calls.rb:1:1:667:52 | calls.rb | @@ -1182,8 +1231,10 @@ enclosingModule | calls.rb:374:1:378:3 | add_singleton | calls.rb:1:1:667:52 | calls.rb | | calls.rb:374:19:374:19 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:374:19:374:19 | x | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:375:5:377:7 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:375:5:377:7 | instance | calls.rb:1:1:667:52 | calls.rb | | calls.rb:375:9:375:9 | x | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:376:9:376:28 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:376:9:376:28 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:376:9:376:28 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:376:14:376:28 | "instance_on x" | calls.rb:1:1:667:52 | calls.rb | @@ -1204,30 +1255,36 @@ enclosingModule | calls.rb:386:5:398:7 | class << ... | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:386:14:386:17 | self | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:387:9:389:11 | singleton1 | calls.rb:386:5:398:7 | class << ... | +| calls.rb:388:13:388:48 | ... | calls.rb:386:5:398:7 | class << ... | | calls.rb:388:13:388:48 | call to puts | calls.rb:386:5:398:7 | class << ... | | calls.rb:388:13:388:48 | self | calls.rb:386:5:398:7 | class << ... | | calls.rb:388:18:388:48 | "SingletonOverride1#singleton1" | calls.rb:386:5:398:7 | class << ... | | calls.rb:388:19:388:47 | SingletonOverride1#singleton1 | calls.rb:386:5:398:7 | class << ... | | calls.rb:391:9:393:11 | call_singleton1 | calls.rb:386:5:398:7 | class << ... | +| calls.rb:392:13:392:22 | ... | calls.rb:386:5:398:7 | class << ... | | calls.rb:392:13:392:22 | call to singleton1 | calls.rb:386:5:398:7 | class << ... | | calls.rb:392:13:392:22 | self | calls.rb:386:5:398:7 | class << ... | | calls.rb:395:9:397:11 | factory | calls.rb:386:5:398:7 | class << ... | | calls.rb:396:13:396:16 | self | calls.rb:386:5:398:7 | class << ... | | calls.rb:396:13:396:20 | call to new | calls.rb:386:5:398:7 | class << ... | +| calls.rb:396:13:396:30 | ... | calls.rb:386:5:398:7 | class << ... | | calls.rb:396:13:396:30 | call to instance1 | calls.rb:386:5:398:7 | class << ... | | calls.rb:400:5:402:7 | singleton2 | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:400:9:400:12 | self | calls.rb:385:1:413:3 | SingletonOverride1 | +| calls.rb:401:9:401:44 | ... | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:401:9:401:44 | call to puts | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:401:9:401:44 | self | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:401:14:401:44 | "SingletonOverride1#singleton2" | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:401:15:401:43 | SingletonOverride1#singleton2 | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:404:5:406:7 | call_singleton2 | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:404:9:404:12 | self | calls.rb:385:1:413:3 | SingletonOverride1 | +| calls.rb:405:9:405:18 | ... | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:405:9:405:18 | call to singleton2 | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:405:9:405:18 | self | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:408:5:408:14 | call to singleton2 | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:408:5:408:14 | self | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:410:5:412:7 | instance1 | calls.rb:385:1:413:3 | SingletonOverride1 | +| calls.rb:411:9:411:43 | ... | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:411:9:411:43 | call to puts | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:411:9:411:43 | self | calls.rb:385:1:413:3 | SingletonOverride1 | | calls.rb:411:14:411:43 | "SingletonOverride1#instance1" | calls.rb:385:1:413:3 | SingletonOverride1 | @@ -1245,17 +1302,20 @@ enclosingModule | calls.rb:421:5:425:7 | class << ... | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:421:14:421:17 | self | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:422:9:424:11 | singleton1 | calls.rb:421:5:425:7 | class << ... | +| calls.rb:423:13:423:48 | ... | calls.rb:421:5:425:7 | class << ... | | calls.rb:423:13:423:48 | call to puts | calls.rb:421:5:425:7 | class << ... | | calls.rb:423:13:423:48 | self | calls.rb:421:5:425:7 | class << ... | | calls.rb:423:18:423:48 | "SingletonOverride2#singleton1" | calls.rb:421:5:425:7 | class << ... | | calls.rb:423:19:423:47 | SingletonOverride2#singleton1 | calls.rb:421:5:425:7 | class << ... | | calls.rb:427:5:429:7 | singleton2 | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:427:9:427:12 | self | calls.rb:420:1:434:3 | SingletonOverride2 | +| calls.rb:428:9:428:44 | ... | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:428:9:428:44 | call to puts | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:428:9:428:44 | self | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:428:14:428:44 | "SingletonOverride2#singleton2" | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:428:15:428:43 | SingletonOverride2#singleton2 | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:431:5:433:7 | instance1 | calls.rb:420:1:434:3 | SingletonOverride2 | +| calls.rb:432:9:432:43 | ... | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:432:9:432:43 | call to puts | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:432:9:432:43 | self | calls.rb:420:1:434:3 | SingletonOverride2 | | calls.rb:432:14:432:43 | "SingletonOverride2#instance1" | calls.rb:420:1:434:3 | SingletonOverride2 | @@ -1276,6 +1336,7 @@ enclosingModule | calls.rb:442:17:442:17 | 0 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:442:19:445:11 | then ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:443:9:445:11 | m1 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:444:13:444:48 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:444:13:444:48 | call to puts | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:444:13:444:48 | self | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:444:18:444:48 | "ConditionalInstanceMethods#m1" | calls.rb:441:1:469:3 | ConditionalInstanceMethods | @@ -1283,14 +1344,17 @@ enclosingModule | calls.rb:448:5:460:7 | m2 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:449:9:449:44 | call to puts | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:449:9:449:44 | self | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:449:9:459:10 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:449:14:449:44 | "ConditionalInstanceMethods#m2" | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:449:15:449:43 | ConditionalInstanceMethods#m2 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:451:9:457:11 | m3 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:452:13:452:48 | call to puts | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:452:13:452:48 | self | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:452:13:456:15 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:452:18:452:48 | "ConditionalInstanceMethods#m3" | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:452:19:452:47 | ConditionalInstanceMethods#m3 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:454:13:456:15 | m4 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:455:17:455:52 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:455:17:455:52 | call to puts | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:455:17:455:52 | self | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:455:22:455:52 | "ConditionalInstanceMethods#m4" | calls.rb:441:1:469:3 | ConditionalInstanceMethods | @@ -1308,7 +1372,9 @@ enclosingModule | calls.rb:463:9:467:15 | call to new | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:463:9:467:18 | call to m5 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:463:19:467:11 | do ... end | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:464:13:466:15 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:464:13:466:15 | m5 | calls.rb:441:1:469:3 | ConditionalInstanceMethods | +| calls.rb:465:17:465:40 | ... | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:465:17:465:40 | call to puts | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:465:17:465:40 | self | calls.rb:441:1:469:3 | ConditionalInstanceMethods | | calls.rb:465:22:465:40 | "AnonymousClass#m5" | calls.rb:441:1:469:3 | ConditionalInstanceMethods | @@ -1340,11 +1406,14 @@ enclosingModule | calls.rb:479:5:479:11 | [...] | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:5:479:11 | call to [] | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:5:483:7 | call to each | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:479:5:495:7 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:6:479:6 | 0 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:8:479:8 | 1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:10:479:10 | 2 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:479:18:483:7 | do ... end | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:480:9:482:11 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:480:9:482:11 | foo | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:481:13:481:22 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:481:13:481:22 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:481:13:481:22 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:481:18:481:22 | "foo" | calls.rb:1:1:667:52 | calls.rb | @@ -1354,7 +1423,9 @@ enclosingModule | calls.rb:485:5:489:11 | call to new | calls.rb:1:1:667:52 | calls.rb | | calls.rb:485:5:489:15 | call to bar | calls.rb:1:1:667:52 | calls.rb | | calls.rb:485:15:489:7 | do ... end | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:486:9:488:11 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:486:9:488:11 | bar | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:487:13:487:22 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:487:13:487:22 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:487:13:487:22 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:487:18:487:22 | "bar" | calls.rb:1:1:667:52 | calls.rb | @@ -1369,6 +1440,7 @@ enclosingModule | calls.rb:491:18:495:7 | do ... end | calls.rb:1:1:667:52 | calls.rb | | calls.rb:491:22:491:22 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:491:22:491:22 | i | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:492:9:494:11 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:492:9:494:11 | call to define_method | calls.rb:1:1:667:52 | calls.rb | | calls.rb:492:9:494:11 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:492:23:492:32 | "baz_#{...}" | calls.rb:1:1:667:52 | calls.rb | @@ -1376,6 +1448,7 @@ enclosingModule | calls.rb:492:28:492:31 | #{...} | calls.rb:1:1:667:52 | calls.rb | | calls.rb:492:30:492:30 | i | calls.rb:1:1:667:52 | calls.rb | | calls.rb:492:35:494:11 | do ... end | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:493:13:493:27 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:493:13:493:27 | call to puts | calls.rb:1:1:667:52 | calls.rb | | calls.rb:493:13:493:27 | self | calls.rb:1:1:667:52 | calls.rb | | calls.rb:493:18:493:27 | "baz_#{...}" | calls.rb:1:1:667:52 | calls.rb | @@ -1399,6 +1472,7 @@ enclosingModule | calls.rb:502:1:502:33 | call to baz_2 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:504:1:510:3 | ExtendSingletonMethod | calls.rb:1:1:667:52 | calls.rb | | calls.rb:505:5:507:7 | singleton | calls.rb:504:1:510:3 | ExtendSingletonMethod | +| calls.rb:506:9:506:46 | ... | calls.rb:504:1:510:3 | ExtendSingletonMethod | | calls.rb:506:9:506:46 | call to puts | calls.rb:504:1:510:3 | ExtendSingletonMethod | | calls.rb:506:9:506:46 | self | calls.rb:504:1:510:3 | ExtendSingletonMethod | | calls.rb:506:14:506:46 | "ExtendSingletonMethod#singleton" | calls.rb:504:1:510:3 | ExtendSingletonMethod | @@ -1435,6 +1509,7 @@ enclosingModule | calls.rb:534:5:536:7 | call to protected | calls.rb:533:1:537:3 | ProtectedMethodInModule | | calls.rb:534:5:536:7 | self | calls.rb:533:1:537:3 | ProtectedMethodInModule | | calls.rb:534:15:536:7 | foo | calls.rb:533:1:537:3 | ProtectedMethodInModule | +| calls.rb:535:9:535:42 | ... | calls.rb:533:1:537:3 | ProtectedMethodInModule | | calls.rb:535:9:535:42 | call to puts | calls.rb:533:1:537:3 | ProtectedMethodInModule | | calls.rb:535:9:535:42 | self | calls.rb:533:1:537:3 | ProtectedMethodInModule | | calls.rb:535:14:535:42 | "ProtectedMethodInModule#foo" | calls.rb:533:1:537:3 | ProtectedMethodInModule | @@ -1446,6 +1521,7 @@ enclosingModule | calls.rb:542:5:544:7 | call to protected | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:542:5:544:7 | self | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:542:15:544:7 | bar | calls.rb:539:1:552:3 | ProtectedMethods | +| calls.rb:543:9:543:35 | ... | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:543:9:543:35 | call to puts | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:543:9:543:35 | self | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:543:14:543:35 | "ProtectedMethods#bar" | calls.rb:539:1:552:3 | ProtectedMethods | @@ -1453,6 +1529,7 @@ enclosingModule | calls.rb:546:5:551:7 | baz | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:547:9:547:11 | call to foo | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:547:9:547:11 | self | calls.rb:539:1:552:3 | ProtectedMethods | +| calls.rb:547:9:550:32 | ... | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:548:9:548:11 | call to bar | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:548:9:548:11 | self | calls.rb:539:1:552:3 | ProtectedMethods | | calls.rb:549:9:549:24 | ProtectedMethods | calls.rb:539:1:552:3 | ProtectedMethods | @@ -1475,6 +1552,7 @@ enclosingModule | calls.rb:559:5:562:7 | baz | calls.rb:558:1:563:3 | ProtectedMethodsSub | | calls.rb:560:9:560:11 | call to foo | calls.rb:558:1:563:3 | ProtectedMethodsSub | | calls.rb:560:9:560:11 | self | calls.rb:558:1:563:3 | ProtectedMethodsSub | +| calls.rb:560:9:561:35 | ... | calls.rb:558:1:563:3 | ProtectedMethodsSub | | calls.rb:561:9:561:27 | ProtectedMethodsSub | calls.rb:558:1:563:3 | ProtectedMethodsSub | | calls.rb:561:9:561:31 | call to new | calls.rb:558:1:563:3 | ProtectedMethodsSub | | calls.rb:561:9:561:35 | call to foo | calls.rb:558:1:563:3 | ProtectedMethodsSub | @@ -1497,6 +1575,7 @@ enclosingModule | calls.rb:569:17:569:17 | c | calls.rb:1:1:667:52 | calls.rb | | calls.rb:569:17:569:17 | c | calls.rb:1:1:667:52 | calls.rb | | calls.rb:569:20:569:20 | c | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:569:20:569:24 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:569:20:569:24 | call to baz | calls.rb:1:1:667:52 | calls.rb | | calls.rb:570:1:570:13 | Array | calls.rb:1:1:667:52 | calls.rb | | calls.rb:570:1:570:13 | [...] | calls.rb:1:1:667:52 | calls.rb | @@ -1512,6 +1591,7 @@ enclosingModule | calls.rb:570:23:570:23 | s | calls.rb:1:1:667:52 | calls.rb | | calls.rb:570:23:570:23 | s | calls.rb:1:1:667:52 | calls.rb | | calls.rb:570:26:570:26 | s | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:570:26:570:37 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:570:26:570:37 | call to capitalize | calls.rb:1:1:667:52 | calls.rb | | calls.rb:572:1:575:3 | SingletonUpCall_Base | calls.rb:1:1:667:52 | calls.rb | | calls.rb:573:5:574:7 | singleton | calls.rb:572:1:575:3 | SingletonUpCall_Base | @@ -1526,6 +1606,7 @@ enclosingModule | calls.rb:579:9:579:12 | self | calls.rb:576:1:583:3 | SingletonUpCall_Sub | | calls.rb:580:9:580:17 | call to singleton | calls.rb:576:1:583:3 | SingletonUpCall_Sub | | calls.rb:580:9:580:17 | self | calls.rb:576:1:583:3 | SingletonUpCall_Sub | +| calls.rb:580:9:581:35 | ... | calls.rb:576:1:583:3 | SingletonUpCall_Sub | | calls.rb:581:9:581:18 | call to singleton2 | calls.rb:576:1:583:3 | SingletonUpCall_Sub | | calls.rb:581:9:581:18 | self | calls.rb:576:1:583:3 | SingletonUpCall_Sub | | calls.rb:584:1:589:3 | SingletonUpCall_SubSub | calls.rb:1:1:667:52 | calls.rb | @@ -1539,10 +1620,12 @@ enclosingModule | calls.rb:592:9:592:12 | self | calls.rb:591:1:602:3 | SingletonA | | calls.rb:595:5:597:7 | call_singleton1 | calls.rb:591:1:602:3 | SingletonA | | calls.rb:595:9:595:12 | self | calls.rb:591:1:602:3 | SingletonA | +| calls.rb:596:9:596:18 | ... | calls.rb:591:1:602:3 | SingletonA | | calls.rb:596:9:596:18 | call to singleton1 | calls.rb:591:1:602:3 | SingletonA | | calls.rb:596:9:596:18 | self | calls.rb:591:1:602:3 | SingletonA | | calls.rb:599:5:601:7 | call_call_singleton1 | calls.rb:591:1:602:3 | SingletonA | | calls.rb:599:9:599:12 | self | calls.rb:591:1:602:3 | SingletonA | +| calls.rb:600:9:600:23 | ... | calls.rb:591:1:602:3 | SingletonA | | calls.rb:600:9:600:23 | call to call_singleton1 | calls.rb:591:1:602:3 | SingletonA | | calls.rb:600:9:600:23 | self | calls.rb:591:1:602:3 | SingletonA | | calls.rb:604:1:611:3 | SingletonB | calls.rb:1:1:667:52 | calls.rb | @@ -1553,6 +1636,7 @@ enclosingModule | calls.rb:608:9:608:12 | self | calls.rb:604:1:611:3 | SingletonB | | calls.rb:609:9:609:18 | call to singleton1 | calls.rb:604:1:611:3 | SingletonB | | calls.rb:609:9:609:18 | self | calls.rb:604:1:611:3 | SingletonB | +| calls.rb:609:9:609:105 | ... | calls.rb:604:1:611:3 | SingletonB | | calls.rb:613:1:620:3 | SingletonC | calls.rb:1:1:667:52 | calls.rb | | calls.rb:613:20:613:29 | SingletonA | calls.rb:1:1:667:52 | calls.rb | | calls.rb:614:5:615:7 | singleton1 | calls.rb:613:1:620:3 | SingletonC | @@ -1561,6 +1645,7 @@ enclosingModule | calls.rb:617:9:617:12 | self | calls.rb:613:1:620:3 | SingletonC | | calls.rb:618:9:618:18 | call to singleton1 | calls.rb:613:1:620:3 | SingletonC | | calls.rb:618:9:618:18 | self | calls.rb:613:1:620:3 | SingletonC | +| calls.rb:618:9:618:105 | ... | calls.rb:613:1:620:3 | SingletonC | | calls.rb:622:1:622:10 | SingletonA | calls.rb:1:1:667:52 | calls.rb | | calls.rb:622:1:622:31 | call to call_call_singleton1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:623:1:623:10 | SingletonB | calls.rb:1:1:667:52 | calls.rb | @@ -1570,6 +1655,7 @@ enclosingModule | calls.rb:626:1:632:3 | Included | calls.rb:1:1:667:52 | calls.rb | | calls.rb:627:5:629:7 | foo | calls.rb:626:1:632:3 | Included | | calls.rb:628:9:628:12 | self | calls.rb:626:1:632:3 | Included | +| calls.rb:628:9:628:16 | ... | calls.rb:626:1:632:3 | Included | | calls.rb:628:9:628:16 | call to bar | calls.rb:626:1:632:3 | Included | | calls.rb:630:5:631:7 | bar | calls.rb:626:1:632:3 | Included | | calls.rb:634:1:639:3 | IncludesIncluded | calls.rb:1:1:667:52 | calls.rb | @@ -1577,11 +1663,13 @@ enclosingModule | calls.rb:635:5:635:20 | self | calls.rb:634:1:639:3 | IncludesIncluded | | calls.rb:635:13:635:20 | Included | calls.rb:634:1:639:3 | IncludesIncluded | | calls.rb:636:5:638:7 | bar | calls.rb:634:1:639:3 | IncludesIncluded | +| calls.rb:637:9:637:13 | ... | calls.rb:634:1:639:3 | IncludesIncluded | | calls.rb:637:9:637:13 | super call to bar | calls.rb:634:1:639:3 | IncludesIncluded | | calls.rb:641:1:645:3 | CustomNew1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:642:5:644:7 | new | calls.rb:641:1:645:3 | CustomNew1 | | calls.rb:642:9:642:12 | self | calls.rb:641:1:645:3 | CustomNew1 | | calls.rb:643:9:643:10 | C1 | calls.rb:641:1:645:3 | CustomNew1 | +| calls.rb:643:9:643:14 | ... | calls.rb:641:1:645:3 | CustomNew1 | | calls.rb:643:9:643:14 | call to new | calls.rb:641:1:645:3 | CustomNew1 | | calls.rb:647:1:647:10 | CustomNew1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:647:1:647:14 | call to new | calls.rb:1:1:667:52 | calls.rb | @@ -1590,8 +1678,10 @@ enclosingModule | calls.rb:650:5:652:7 | new | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:650:9:650:12 | self | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:651:9:651:12 | self | calls.rb:649:1:657:3 | CustomNew2 | +| calls.rb:651:9:651:21 | ... | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:651:9:651:21 | call to allocate | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:654:5:656:7 | instance | calls.rb:649:1:657:3 | CustomNew2 | +| calls.rb:655:9:655:34 | ... | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:655:9:655:34 | call to puts | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:655:9:655:34 | self | calls.rb:649:1:657:3 | CustomNew2 | | calls.rb:655:14:655:34 | "CustomNew2#instance" | calls.rb:649:1:657:3 | CustomNew2 | @@ -1605,11 +1695,13 @@ enclosingModule | calls.rb:662:5:662:11 | Array | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:5:662:11 | [...] | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:5:662:11 | call to [] | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:662:5:664:7 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:5:664:7 | call to each | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:6:662:6 | 0 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:8:662:8 | 1 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:10:662:10 | 2 | calls.rb:1:1:667:52 | calls.rb | | calls.rb:662:18:664:7 | do ... end | calls.rb:1:1:667:52 | calls.rb | +| calls.rb:663:9:663:9 | ... | calls.rb:1:1:667:52 | calls.rb | | calls.rb:663:9:663:9 | x | calls.rb:1:1:667:52 | calls.rb | | calls.rb:667:1:667:26 | ( ... ) | calls.rb:1:1:667:52 | calls.rb | | calls.rb:667:1:667:35 | call to instance | calls.rb:1:1:667:52 | calls.rb | @@ -1621,6 +1713,7 @@ enclosingModule | element_reference.rb:2:5:4:7 | [] | element_reference.rb:1:1:5:3 | ClassWithElementRef | | element_reference.rb:2:12:2:12 | x | element_reference.rb:1:1:5:3 | ClassWithElementRef | | element_reference.rb:2:12:2:12 | x | element_reference.rb:1:1:5:3 | ClassWithElementRef | +| element_reference.rb:3:9:3:19 | ... | element_reference.rb:1:1:5:3 | ClassWithElementRef | | element_reference.rb:3:9:3:19 | yield ... | element_reference.rb:1:1:5:3 | ClassWithElementRef | | element_reference.rb:3:15:3:15 | x | element_reference.rb:1:1:5:3 | ClassWithElementRef | | element_reference.rb:3:15:3:19 | ... + ... | element_reference.rb:1:1:5:3 | ClassWithElementRef | @@ -1635,6 +1728,7 @@ enclosingModule | element_reference.rb:9:6:9:19 | { ... } | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:9:9:9:9 | x | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:9:9:9:9 | x | element_reference.rb:1:1:13:4 | element_reference.rb | +| element_reference.rb:9:12:9:17 | ... | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:9:12:9:17 | call to puts | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:9:12:9:17 | self | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:9:17:9:17 | x | element_reference.rb:1:1:13:4 | element_reference.rb | @@ -1644,15 +1738,18 @@ enclosingModule | element_reference.rb:11:6:13:3 | do ... end | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:11:10:11:10 | x | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:11:10:11:10 | x | element_reference.rb:1:1:13:4 | element_reference.rb | +| element_reference.rb:12:5:12:10 | ... | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:12:5:12:10 | call to puts | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:12:5:12:10 | self | element_reference.rb:1:1:13:4 | element_reference.rb | | element_reference.rb:12:10:12:10 | x | element_reference.rb:1:1:13:4 | element_reference.rb | | hello.rb:1:1:8:3 | EnglishWords | hello.rb:1:1:22:3 | hello.rb | | hello.rb:2:5:4:7 | hello | hello.rb:1:1:8:3 | EnglishWords | +| hello.rb:3:9:3:22 | ... | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:3:9:3:22 | return | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:3:16:3:22 | "hello" | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:3:17:3:21 | hello | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:5:5:7:7 | world | hello.rb:1:1:8:3 | EnglishWords | +| hello.rb:6:9:6:22 | ... | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:6:9:6:22 | return | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:6:16:6:22 | "world" | hello.rb:1:1:8:3 | EnglishWords | | hello.rb:6:17:6:21 | world | hello.rb:1:1:8:3 | EnglishWords | @@ -1661,12 +1758,14 @@ enclosingModule | hello.rb:12:5:12:24 | self | hello.rb:11:1:16:3 | Greeting | | hello.rb:12:13:12:24 | EnglishWords | hello.rb:11:1:16:3 | Greeting | | hello.rb:13:5:15:7 | message | hello.rb:11:1:16:3 | Greeting | +| hello.rb:14:9:14:20 | ... | hello.rb:11:1:16:3 | Greeting | | hello.rb:14:9:14:20 | return | hello.rb:11:1:16:3 | Greeting | | hello.rb:14:16:14:20 | call to hello | hello.rb:11:1:16:3 | Greeting | | hello.rb:14:16:14:20 | self | hello.rb:11:1:16:3 | Greeting | | hello.rb:18:1:22:3 | HelloWorld | hello.rb:1:1:22:3 | hello.rb | | hello.rb:18:20:18:27 | Greeting | hello.rb:1:1:22:3 | hello.rb | | hello.rb:19:5:21:7 | message | hello.rb:18:1:22:3 | HelloWorld | +| hello.rb:20:9:20:40 | ... | hello.rb:18:1:22:3 | HelloWorld | | hello.rb:20:9:20:40 | return | hello.rb:18:1:22:3 | HelloWorld | | hello.rb:20:16:20:20 | super call to message | hello.rb:18:1:22:3 | HelloWorld | | hello.rb:20:16:20:26 | ... + ... | hello.rb:18:1:22:3 | HelloWorld | @@ -1684,12 +1783,14 @@ enclosingModule | instance_fields.rb:3:9:5:11 | create | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:4:13:4:18 | @field | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:4:13:4:18 | self | instance_fields.rb:2:5:9:7 | class << ... | +| instance_fields.rb:4:13:4:35 | ... | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:4:13:4:35 | ... = ... | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:4:22:4:31 | A_target | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:4:22:4:35 | call to new | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:6:9:8:11 | use | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:7:13:7:18 | @field | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:7:13:7:18 | self | instance_fields.rb:2:5:9:7 | class << ... | +| instance_fields.rb:7:13:7:25 | ... | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:7:13:7:25 | call to target | instance_fields.rb:2:5:9:7 | class << ... | | instance_fields.rb:11:1:14:3 | A_target | instance_fields.rb:1:1:29:4 | instance_fields.rb | | instance_fields.rb:12:5:13:7 | target | instance_fields.rb:11:1:14:3 | A_target | @@ -1699,12 +1800,14 @@ enclosingModule | instance_fields.rb:18:9:20:11 | create | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:19:13:19:18 | @field | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:19:13:19:18 | self | instance_fields.rb:17:5:24:7 | class << ... | +| instance_fields.rb:19:13:19:35 | ... | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:19:13:19:35 | ... = ... | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:19:22:19:31 | B_target | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:19:22:19:35 | call to new | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:21:9:23:11 | use | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:22:13:22:18 | @field | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:22:13:22:18 | self | instance_fields.rb:17:5:24:7 | class << ... | +| instance_fields.rb:22:13:22:25 | ... | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:22:13:22:25 | call to target | instance_fields.rb:17:5:24:7 | class << ... | | instance_fields.rb:26:1:29:3 | B_target | instance_fields.rb:1:1:29:4 | instance_fields.rb | | instance_fields.rb:27:5:28:7 | target | instance_fields.rb:26:1:29:3 | B_target | @@ -1784,6 +1887,7 @@ enclosingModule | modules.rb:90:3:90:8 | Object | modules.rb:88:1:93:3 | IncludeTest | | modules.rb:90:3:90:38 | call to module_eval | modules.rb:88:1:93:3 | IncludeTest | | modules.rb:90:22:90:38 | { ... } | modules.rb:88:1:93:3 | IncludeTest | +| modules.rb:90:24:90:36 | ... | modules.rb:88:1:93:3 | IncludeTest | | modules.rb:90:24:90:36 | call to prepend | modules.rb:88:1:93:3 | IncludeTest | | modules.rb:90:24:90:36 | self | modules.rb:88:1:93:3 | IncludeTest | | modules.rb:90:32:90:36 | Other | modules.rb:88:1:93:3 | IncludeTest | @@ -1908,6 +2012,7 @@ enclosingModule | private.rb:83:3:85:5 | call to private | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:83:3:85:5 | self | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:83:11:85:5 | m1 | private.rb:82:1:94:3 | PrivateOverride1 | +| private.rb:84:7:84:32 | ... | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:84:7:84:32 | call to puts | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:84:7:84:32 | self | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:84:12:84:32 | "PrivateOverride1#m1" | private.rb:82:1:94:3 | PrivateOverride1 | @@ -1915,11 +2020,13 @@ enclosingModule | private.rb:87:3:89:5 | call to private | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:87:3:89:5 | self | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:87:11:89:5 | m2 | private.rb:82:1:94:3 | PrivateOverride1 | +| private.rb:88:7:88:32 | ... | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:88:7:88:32 | call to puts | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:88:7:88:32 | self | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:88:12:88:32 | "PrivateOverride1#m2" | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:88:13:88:31 | PrivateOverride1#m2 | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:91:3:93:5 | call_m1 | private.rb:82:1:94:3 | PrivateOverride1 | +| private.rb:92:7:92:8 | ... | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:92:7:92:8 | call to m1 | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:92:7:92:8 | self | private.rb:82:1:94:3 | PrivateOverride1 | | private.rb:96:1:102:3 | PrivateOverride2 | private.rb:1:1:105:40 | private.rb | @@ -1929,6 +2036,7 @@ enclosingModule | private.rb:97:11:101:5 | m1 | private.rb:96:1:102:3 | PrivateOverride2 | | private.rb:98:7:98:32 | call to puts | private.rb:96:1:102:3 | PrivateOverride2 | | private.rb:98:7:98:32 | self | private.rb:96:1:102:3 | PrivateOverride2 | +| private.rb:98:7:100:45 | ... | private.rb:96:1:102:3 | PrivateOverride2 | | private.rb:98:12:98:32 | "PrivateOverride2#m1" | private.rb:96:1:102:3 | PrivateOverride2 | | private.rb:98:13:98:31 | PrivateOverride2#m1 | private.rb:96:1:102:3 | PrivateOverride2 | | private.rb:99:7:99:8 | call to m2 | private.rb:96:1:102:3 | PrivateOverride2 | @@ -1950,8 +2058,10 @@ enclosingModule | toplevel_self_singleton.rb:8:1:16:3 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:8:14:16:3 | do ... end | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:9:5:11:7 | method_in_block | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | +| toplevel_self_singleton.rb:9:5:15:7 | ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:10:9:10:27 | call to ab_singleton_method | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:10:9:10:27 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | +| toplevel_self_singleton.rb:10:9:10:60 | ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:12:5:12:7 | obj | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:12:5:12:12 | ... = ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:12:9:12:12 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | @@ -1959,6 +2069,7 @@ enclosingModule | toplevel_self_singleton.rb:13:9:13:11 | obj | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:14:9:14:27 | call to ab_singleton_method | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:14:9:14:27 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | +| toplevel_self_singleton.rb:14:9:14:60 | ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:18:1:18:8 | MyStruct | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:18:1:22:1 | ... = ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:18:12:18:17 | Struct | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | @@ -1968,10 +2079,12 @@ enclosingModule | toplevel_self_singleton.rb:18:29:18:32 | :bar | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:18:29:18:32 | bar | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:18:35:22:1 | { ... } | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | +| toplevel_self_singleton.rb:19:5:21:7 | ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:19:5:21:7 | method_in_struct | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:19:9:19:12 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:20:9:20:27 | call to ab_singleton_method | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:20:9:20:27 | self | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | +| toplevel_self_singleton.rb:20:9:20:60 | ... | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:24:1:34:3 | Good | toplevel_self_singleton.rb:1:1:34:4 | toplevel_self_singleton.rb | | toplevel_self_singleton.rb:25:5:33:7 | class << ... | toplevel_self_singleton.rb:24:1:34:3 | Good | | toplevel_self_singleton.rb:25:14:25:17 | self | toplevel_self_singleton.rb:24:1:34:3 | Good | @@ -1979,6 +2092,7 @@ enclosingModule | toplevel_self_singleton.rb:29:9:32:11 | call_you | toplevel_self_singleton.rb:25:5:33:7 | class << ... | | toplevel_self_singleton.rb:30:13:30:19 | call to call_me | toplevel_self_singleton.rb:25:5:33:7 | class << ... | | toplevel_self_singleton.rb:30:13:30:19 | self | toplevel_self_singleton.rb:25:5:33:7 | class << ... | +| toplevel_self_singleton.rb:30:13:31:20 | ... | toplevel_self_singleton.rb:25:5:33:7 | class << ... | | toplevel_self_singleton.rb:31:13:31:20 | call to call_you | toplevel_self_singleton.rb:25:5:33:7 | class << ... | | toplevel_self_singleton.rb:31:13:31:20 | self | toplevel_self_singleton.rb:25:5:33:7 | class << ... | | unresolved_subclass.rb:1:1:2:3 | ResolvableBaseClass | unresolved_subclass.rb:1:1:22:4 | unresolved_subclass.rb | From 44a914e40fb111008169c1b8c4d0fc01dcb3cbd4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 May 2026 10:23:26 +0000 Subject: [PATCH 49/85] Release preparation for version 2.25.6 --- actions/ql/lib/CHANGELOG.md | 6 ++++++ .../0.4.37.md} | 9 +++++---- actions/ql/lib/codeql-pack.release.yml | 2 +- actions/ql/lib/qlpack.yml | 2 +- actions/ql/src/CHANGELOG.md | 19 +++++++++++++++++++ .../2026-05-05-untrusted-checkout-high.md | 4 ---- .../2026-05-12-sha256-pinned-actions.md | 4 ---- ...n-untrusted-checkout-improvements-alert.md | 4 ---- ...ntrusted-checkout-improvements-helpfile.md | 4 ---- ...ntrusted-checkout-improvements-metadata.md | 4 ---- .../ql/src/change-notes/released/0.6.29.md | 18 ++++++++++++++++++ actions/ql/src/codeql-pack.release.yml | 2 +- actions/ql/src/qlpack.yml | 2 +- cpp/ql/lib/CHANGELOG.md | 16 ++++++++++++++++ .../change-notes/2026-05-15-secure-scanf.md | 5 ----- .../change-notes/2026-05-16-alias-template.md | 4 ---- .../lib/change-notes/2026-05-18-alias-type.md | 4 ---- .../change-notes/2026-05-21-generated-from.md | 4 ---- cpp/ql/lib/change-notes/released/10.2.0.md | 15 +++++++++++++++ cpp/ql/lib/codeql-pack.release.yml | 2 +- cpp/ql/lib/qlpack.yml | 2 +- cpp/ql/src/CHANGELOG.md | 4 ++++ cpp/ql/src/change-notes/released/1.6.4.md | 3 +++ cpp/ql/src/codeql-pack.release.yml | 2 +- cpp/ql/src/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/lib/CHANGELOG.md | 4 ++++ .../lib/change-notes/released/1.7.68.md | 3 +++ .../Solorigate/lib/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/lib/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/src/CHANGELOG.md | 4 ++++ .../src/change-notes/released/1.7.68.md | 3 +++ .../Solorigate/src/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/src/qlpack.yml | 2 +- csharp/ql/lib/CHANGELOG.md | 7 +++++++ .../2026-05-12-user-increment-decrement.md | 4 ---- .../6.0.2.md} | 8 +++++--- csharp/ql/lib/codeql-pack.release.yml | 2 +- csharp/ql/lib/qlpack.yml | 2 +- csharp/ql/src/CHANGELOG.md | 4 ++++ csharp/ql/src/change-notes/released/1.7.4.md | 3 +++ csharp/ql/src/codeql-pack.release.yml | 2 +- csharp/ql/src/qlpack.yml | 2 +- go/ql/consistency-queries/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ .../codeql-pack.release.yml | 2 +- go/ql/consistency-queries/qlpack.yml | 2 +- go/ql/lib/CHANGELOG.md | 4 ++++ go/ql/lib/change-notes/released/7.1.2.md | 3 +++ go/ql/lib/codeql-pack.release.yml | 2 +- go/ql/lib/qlpack.yml | 2 +- go/ql/src/CHANGELOG.md | 4 ++++ go/ql/src/change-notes/released/1.6.4.md | 3 +++ go/ql/src/codeql-pack.release.yml | 2 +- go/ql/src/qlpack.yml | 2 +- java/ql/lib/CHANGELOG.md | 6 ++++++ .../9.1.2.md} | 7 ++++--- java/ql/lib/codeql-pack.release.yml | 2 +- java/ql/lib/qlpack.yml | 2 +- java/ql/src/CHANGELOG.md | 4 ++++ java/ql/src/change-notes/released/1.11.4.md | 3 +++ java/ql/src/codeql-pack.release.yml | 2 +- java/ql/src/qlpack.yml | 2 +- javascript/ql/lib/CHANGELOG.md | 6 ++++++ .../2.7.2.md} | 7 ++++--- javascript/ql/lib/codeql-pack.release.yml | 2 +- javascript/ql/lib/qlpack.yml | 2 +- javascript/ql/src/CHANGELOG.md | 4 ++++ .../ql/src/change-notes/released/2.3.11.md | 3 +++ javascript/ql/src/codeql-pack.release.yml | 2 +- javascript/ql/src/qlpack.yml | 2 +- misc/suite-helpers/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ misc/suite-helpers/codeql-pack.release.yml | 2 +- misc/suite-helpers/qlpack.yml | 2 +- python/ql/lib/CHANGELOG.md | 6 ++++++ .../7.1.2.md} | 7 ++++--- python/ql/lib/codeql-pack.release.yml | 2 +- python/ql/lib/qlpack.yml | 2 +- python/ql/src/CHANGELOG.md | 4 ++++ python/ql/src/change-notes/released/1.8.4.md | 3 +++ python/ql/src/codeql-pack.release.yml | 2 +- python/ql/src/qlpack.yml | 2 +- ruby/ql/lib/CHANGELOG.md | 4 ++++ ruby/ql/lib/change-notes/released/5.2.2.md | 3 +++ ruby/ql/lib/codeql-pack.release.yml | 2 +- ruby/ql/lib/qlpack.yml | 2 +- ruby/ql/src/CHANGELOG.md | 4 ++++ ruby/ql/src/change-notes/released/1.6.4.md | 3 +++ ruby/ql/src/codeql-pack.release.yml | 2 +- ruby/ql/src/qlpack.yml | 2 +- rust/ql/lib/CHANGELOG.md | 6 ++++++ .../0.2.15.md} | 7 ++++--- rust/ql/lib/codeql-pack.release.yml | 2 +- rust/ql/lib/qlpack.yml | 2 +- rust/ql/src/CHANGELOG.md | 4 ++++ rust/ql/src/change-notes/released/0.1.36.md | 3 +++ rust/ql/src/codeql-pack.release.yml | 2 +- rust/ql/src/qlpack.yml | 2 +- shared/concepts/CHANGELOG.md | 4 ++++ .../concepts/change-notes/released/0.0.25.md | 3 +++ shared/concepts/codeql-pack.release.yml | 2 +- shared/concepts/qlpack.yml | 2 +- shared/controlflow/CHANGELOG.md | 4 ++++ .../change-notes/released/2.0.35.md | 3 +++ shared/controlflow/codeql-pack.release.yml | 2 +- shared/controlflow/qlpack.yml | 2 +- shared/dataflow/CHANGELOG.md | 4 ++++ .../dataflow/change-notes/released/2.1.7.md | 3 +++ shared/dataflow/codeql-pack.release.yml | 2 +- shared/dataflow/qlpack.yml | 2 +- shared/mad/CHANGELOG.md | 4 ++++ shared/mad/change-notes/released/1.0.51.md | 3 +++ shared/mad/codeql-pack.release.yml | 2 +- shared/mad/qlpack.yml | 2 +- shared/quantum/CHANGELOG.md | 4 ++++ .../quantum/change-notes/released/0.0.29.md | 3 +++ shared/quantum/codeql-pack.release.yml | 2 +- shared/quantum/qlpack.yml | 2 +- shared/rangeanalysis/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ shared/rangeanalysis/codeql-pack.release.yml | 2 +- shared/rangeanalysis/qlpack.yml | 2 +- shared/regex/CHANGELOG.md | 4 ++++ shared/regex/change-notes/released/1.0.51.md | 3 +++ shared/regex/codeql-pack.release.yml | 2 +- shared/regex/qlpack.yml | 2 +- shared/ssa/CHANGELOG.md | 4 ++++ shared/ssa/change-notes/released/2.0.27.md | 3 +++ shared/ssa/codeql-pack.release.yml | 2 +- shared/ssa/qlpack.yml | 2 +- shared/threat-models/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ shared/threat-models/codeql-pack.release.yml | 2 +- shared/threat-models/qlpack.yml | 2 +- shared/tutorial/CHANGELOG.md | 4 ++++ .../tutorial/change-notes/released/1.0.51.md | 3 +++ shared/tutorial/codeql-pack.release.yml | 2 +- shared/tutorial/qlpack.yml | 2 +- shared/typeflow/CHANGELOG.md | 4 ++++ .../typeflow/change-notes/released/1.0.51.md | 3 +++ shared/typeflow/codeql-pack.release.yml | 2 +- shared/typeflow/qlpack.yml | 2 +- shared/typeinference/CHANGELOG.md | 4 ++++ .../change-notes/released/0.0.32.md | 3 +++ shared/typeinference/codeql-pack.release.yml | 2 +- shared/typeinference/qlpack.yml | 2 +- shared/typetracking/CHANGELOG.md | 4 ++++ .../change-notes/released/2.0.35.md | 3 +++ shared/typetracking/codeql-pack.release.yml | 2 +- shared/typetracking/qlpack.yml | 2 +- shared/typos/CHANGELOG.md | 4 ++++ shared/typos/change-notes/released/1.0.51.md | 3 +++ shared/typos/codeql-pack.release.yml | 2 +- shared/typos/qlpack.yml | 2 +- shared/util/CHANGELOG.md | 4 ++++ shared/util/change-notes/released/2.0.38.md | 3 +++ shared/util/codeql-pack.release.yml | 2 +- shared/util/qlpack.yml | 2 +- shared/xml/CHANGELOG.md | 4 ++++ shared/xml/change-notes/released/1.0.51.md | 3 +++ shared/xml/codeql-pack.release.yml | 2 +- shared/xml/qlpack.yml | 2 +- shared/yaml/CHANGELOG.md | 4 ++++ shared/yaml/change-notes/released/1.0.51.md | 3 +++ shared/yaml/codeql-pack.release.yml | 2 +- shared/yaml/qlpack.yml | 2 +- swift/ql/lib/CHANGELOG.md | 10 ++++++++++ .../change-notes/2026-05-19-swift-6.3.2.md | 4 ---- .../6.7.0.md} | 11 ++++++++--- swift/ql/lib/codeql-pack.release.yml | 2 +- swift/ql/lib/qlpack.yml | 2 +- swift/ql/src/CHANGELOG.md | 4 ++++ swift/ql/src/change-notes/released/1.3.4.md | 3 +++ swift/ql/src/codeql-pack.release.yml | 2 +- swift/ql/src/qlpack.yml | 2 +- 175 files changed, 455 insertions(+), 149 deletions(-) rename actions/ql/lib/change-notes/{2026-05-12-improved-alphanumeric-regex.md => released/0.4.37.md} (80%) delete mode 100644 actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md delete mode 100644 actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md create mode 100644 actions/ql/src/change-notes/released/0.6.29.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-16-alias-template.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-18-alias-type.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-21-generated-from.md create mode 100644 cpp/ql/lib/change-notes/released/10.2.0.md create mode 100644 cpp/ql/src/change-notes/released/1.6.4.md create mode 100644 csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md create mode 100644 csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md delete mode 100644 csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md rename csharp/ql/lib/change-notes/{2026-05-20-csharp14-dotnet10.md => released/6.0.2.md} (67%) create mode 100644 csharp/ql/src/change-notes/released/1.7.4.md create mode 100644 go/ql/consistency-queries/change-notes/released/1.0.51.md create mode 100644 go/ql/lib/change-notes/released/7.1.2.md create mode 100644 go/ql/src/change-notes/released/1.6.4.md rename java/ql/lib/change-notes/{2026-05-19-avro-mads.md => released/9.1.2.md} (61%) create mode 100644 java/ql/src/change-notes/released/1.11.4.md rename javascript/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/2.7.2.md} (89%) create mode 100644 javascript/ql/src/change-notes/released/2.3.11.md create mode 100644 misc/suite-helpers/change-notes/released/1.0.51.md rename python/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/7.1.2.md} (90%) create mode 100644 python/ql/src/change-notes/released/1.8.4.md create mode 100644 ruby/ql/lib/change-notes/released/5.2.2.md create mode 100644 ruby/ql/src/change-notes/released/1.6.4.md rename rust/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/0.2.15.md} (89%) create mode 100644 rust/ql/src/change-notes/released/0.1.36.md create mode 100644 shared/concepts/change-notes/released/0.0.25.md create mode 100644 shared/controlflow/change-notes/released/2.0.35.md create mode 100644 shared/dataflow/change-notes/released/2.1.7.md create mode 100644 shared/mad/change-notes/released/1.0.51.md create mode 100644 shared/quantum/change-notes/released/0.0.29.md create mode 100644 shared/rangeanalysis/change-notes/released/1.0.51.md create mode 100644 shared/regex/change-notes/released/1.0.51.md create mode 100644 shared/ssa/change-notes/released/2.0.27.md create mode 100644 shared/threat-models/change-notes/released/1.0.51.md create mode 100644 shared/tutorial/change-notes/released/1.0.51.md create mode 100644 shared/typeflow/change-notes/released/1.0.51.md create mode 100644 shared/typeinference/change-notes/released/0.0.32.md create mode 100644 shared/typetracking/change-notes/released/2.0.35.md create mode 100644 shared/typos/change-notes/released/1.0.51.md create mode 100644 shared/util/change-notes/released/2.0.38.md create mode 100644 shared/xml/change-notes/released/1.0.51.md create mode 100644 shared/yaml/change-notes/released/1.0.51.md delete mode 100644 swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md rename swift/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/6.7.0.md} (76%) create mode 100644 swift/ql/src/change-notes/released/1.3.4.md diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index ddd0b0f1aec..7a61a60c379 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.4.37 + +### Minor Analysis Improvements + +* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. + ## 0.4.36 ### Minor Analysis Improvements diff --git a/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md b/actions/ql/lib/change-notes/released/0.4.37.md similarity index 80% rename from actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md rename to actions/ql/lib/change-notes/released/0.4.37.md index df3aaf3613f..4809796b3ab 100644 --- a/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md +++ b/actions/ql/lib/change-notes/released/0.4.37.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- -* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. \ No newline at end of file +## 0.4.37 + +### Minor Analysis Improvements + +* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index 45433e3ec03..df274514780 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.36 +lastReleaseVersion: 0.4.37 diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index ae4a57aa944..71c9cadbf28 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.37-dev +version: 0.4.37 library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index 1670f0af5be..c37cd20761b 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,3 +1,22 @@ +## 0.6.29 + +### Query Metadata Changes + +* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. + +### Major Analysis Improvements + +* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. + +### Minor Analysis Improvements + +* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. +* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. + +### Bug Fixes + +* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. + ## 0.6.28 ### Query Metadata Changes diff --git a/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md b/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md deleted file mode 100644 index 098c60a3753..00000000000 --- a/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: majorAnalysis ---- -* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md b/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md deleted file mode 100644 index 521a5878c37..00000000000 --- a/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md deleted file mode 100644 index f5ad3271a62..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md deleted file mode 100644 index 83e6528c86b..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md deleted file mode 100644 index 5df1f3347ea..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/released/0.6.29.md b/actions/ql/src/change-notes/released/0.6.29.md new file mode 100644 index 00000000000..82ca8174954 --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.29.md @@ -0,0 +1,18 @@ +## 0.6.29 + +### Query Metadata Changes + +* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. + +### Major Analysis Improvements + +* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. + +### Minor Analysis Improvements + +* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. +* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. + +### Bug Fixes + +* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index 90f3f09295a..e785984cacc 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.28 +lastReleaseVersion: 0.6.29 diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 33ab175fb18..3615c08b583 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.29-dev +version: 0.6.29 library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 3b95c10fbb5..0b3413f9d3c 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,19 @@ +## 10.2.0 + +### Deprecated APIs + +* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. + +### New Features + +* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. +* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. + +### Minor Analysis Improvements + +* Added flow source models for `scanf_s` and related functions. +* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. + ## 10.1.1 ### Minor Analysis Improvements diff --git a/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md b/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md deleted file mode 100644 index 0b8d5a79a72..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -category: minorAnalysis ---- -* Added flow source models for `scanf_s` and related functions. -* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/2026-05-16-alias-template.md b/cpp/ql/lib/change-notes/2026-05-16-alias-template.md deleted file mode 100644 index 2777da94abf..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-16-alias-template.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. diff --git a/cpp/ql/lib/change-notes/2026-05-18-alias-type.md b/cpp/ql/lib/change-notes/2026-05-18-alias-type.md deleted file mode 100644 index b744dd2fa95..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-18-alias-type.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: deprecated ---- -* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. diff --git a/cpp/ql/lib/change-notes/2026-05-21-generated-from.md b/cpp/ql/lib/change-notes/2026-05-21-generated-from.md deleted file mode 100644 index bf3ddcb1070..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-21-generated-from.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. diff --git a/cpp/ql/lib/change-notes/released/10.2.0.md b/cpp/ql/lib/change-notes/released/10.2.0.md new file mode 100644 index 00000000000..cb514b82cbb --- /dev/null +++ b/cpp/ql/lib/change-notes/released/10.2.0.md @@ -0,0 +1,15 @@ +## 10.2.0 + +### Deprecated APIs + +* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. + +### New Features + +* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. +* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. + +### Minor Analysis Improvements + +* Added flow source models for `scanf_s` and related functions. +* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index 940a668bbf3..a230efed2a4 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 10.1.1 +lastReleaseVersion: 10.2.0 diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index bca102a1048..04ee2d76ae9 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 10.1.2-dev +version: 10.2.0 groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 901d2092283..e8a2af1383c 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 ### Minor Analysis Improvements diff --git a/cpp/ql/src/change-notes/released/1.6.4.md b/cpp/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/cpp/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 74055b4cf11..4915f969278 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.6.4-dev +version: 1.6.4 groups: - cpp - queries diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index eefb35f174a..3ceb4374a77 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.68 + +No user-facing changes. + ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md new file mode 100644 index 00000000000..774ffcebdfe --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md @@ -0,0 +1,3 @@ +## 1.7.68 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 0293fdade8f..f737dfa0972 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.67 +lastReleaseVersion: 1.7.68 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 659dd5b0038..1de44f9e1d8 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.68-dev +version: 1.7.68 groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index eefb35f174a..3ceb4374a77 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.68 + +No user-facing changes. + ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md new file mode 100644 index 00000000000..774ffcebdfe --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md @@ -0,0 +1,3 @@ +## 1.7.68 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 0293fdade8f..f737dfa0972 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.67 +lastReleaseVersion: 1.7.68 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index c7f243d86f0..e99c5a26b32 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.68-dev +version: 1.7.68 groups: - csharp - solorigate diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index 17fd83bcda7..a45a993832e 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,10 @@ +## 6.0.2 + +### Minor Analysis Improvements + +* Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. +* C# 14: Added support for user-defined instance increment/decrement operators. + ## 6.0.1 No user-facing changes. diff --git a/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md b/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md deleted file mode 100644 index a840fdf4fe3..00000000000 --- a/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md b/csharp/ql/lib/change-notes/released/6.0.2.md similarity index 67% rename from csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md rename to csharp/ql/lib/change-notes/released/6.0.2.md index 84e3833860a..ea98fb2257e 100644 --- a/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md +++ b/csharp/ql/lib/change-notes/released/6.0.2.md @@ -1,4 +1,6 @@ ---- -category: minorAnalysis ---- +## 6.0.2 + +### Minor Analysis Improvements + * Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. +* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index d1f3c68c812..70437ec53b8 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.0.1 +lastReleaseVersion: 6.0.2 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index b3a0dab7303..0745dfdd527 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 6.0.2-dev +version: 6.0.2 groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index 8c4388fe2bb..5c196df3614 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.4 + +No user-facing changes. + ## 1.7.3 No user-facing changes. diff --git a/csharp/ql/src/change-notes/released/1.7.4.md b/csharp/ql/src/change-notes/released/1.7.4.md new file mode 100644 index 00000000000..801ed5f5e71 --- /dev/null +++ b/csharp/ql/src/change-notes/released/1.7.4.md @@ -0,0 +1,3 @@ +## 1.7.4 + +No user-facing changes. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index 9f9661b1e77..f4f3a4d5120 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.3 +lastReleaseVersion: 1.7.4 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index bfb1852bacb..d9269a9fd1b 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.7.4-dev +version: 1.7.4 groups: - csharp - queries diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index 512a5732ccd..14258018aea 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.51.md b/go/ql/consistency-queries/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index 4c65036e5cf..c07260f76da 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.51-dev +version: 1.0.51 groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 54afc3a977b..0d5738ad029 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.1.2 + +No user-facing changes. + ## 7.1.1 No user-facing changes. diff --git a/go/ql/lib/change-notes/released/7.1.2.md b/go/ql/lib/change-notes/released/7.1.2.md new file mode 100644 index 00000000000..d55cf91e249 --- /dev/null +++ b/go/ql/lib/change-notes/released/7.1.2.md @@ -0,0 +1,3 @@ +## 7.1.2 + +No user-facing changes. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 8e970df6cae..547681cc440 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.1 +lastReleaseVersion: 7.1.2 diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index f12cd33e5e0..8a9a9624de5 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 7.1.2-dev +version: 7.1.2 groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 84d9ae7de59..c58883ee3c2 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 No user-facing changes. diff --git a/go/ql/src/change-notes/released/1.6.4.md b/go/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/go/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 40ad8f32001..601e81ea035 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.6.4-dev +version: 1.6.4 groups: - go - queries diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index a6c0cfc278a..2e702064d7f 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 9.1.2 + +### Minor Analysis Improvements + +* Added LLM-generated source and sink models for `org.apache.avro`. + ## 9.1.1 ### Minor Analysis Improvements diff --git a/java/ql/lib/change-notes/2026-05-19-avro-mads.md b/java/ql/lib/change-notes/released/9.1.2.md similarity index 61% rename from java/ql/lib/change-notes/2026-05-19-avro-mads.md rename to java/ql/lib/change-notes/released/9.1.2.md index 43368b098b1..c10b69f0fe9 100644 --- a/java/ql/lib/change-notes/2026-05-19-avro-mads.md +++ b/java/ql/lib/change-notes/released/9.1.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 9.1.2 + +### Minor Analysis Improvements + * Added LLM-generated source and sink models for `org.apache.avro`. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 02e630d3384..1fd7d868f4e 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 9.1.1 +lastReleaseVersion: 9.1.2 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index aa9a2957362..561ef7db55c 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 9.1.2-dev +version: 9.1.2 groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index fbbc339797b..e013e79ce9e 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.11.4 + +No user-facing changes. + ## 1.11.3 ### Minor Analysis Improvements diff --git a/java/ql/src/change-notes/released/1.11.4.md b/java/ql/src/change-notes/released/1.11.4.md new file mode 100644 index 00000000000..3ebd37b0be7 --- /dev/null +++ b/java/ql/src/change-notes/released/1.11.4.md @@ -0,0 +1,3 @@ +## 1.11.4 + +No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 220561dc648..813a925461f 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.11.3 +lastReleaseVersion: 1.11.4 diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index 2005542ba0d..cfd8dbc56c8 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.11.4-dev +version: 1.11.4 groups: - java - queries diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index c201b3a4b13..6471aa3fe68 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.7.2 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. + ## 2.7.1 No user-facing changes. diff --git a/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md b/javascript/ql/lib/change-notes/released/2.7.2.md similarity index 89% rename from javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to javascript/ql/lib/change-notes/released/2.7.2.md index f6e6caed325..9d0eca2cb4e 100644 --- a/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/javascript/ql/lib/change-notes/released/2.7.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 2.7.2 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index 820fb65a5c7..5160df7b1b7 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.7.1 +lastReleaseVersion: 2.7.2 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index 6e8e84b394d..6caebf91399 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.7.2-dev +version: 2.7.2 groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index 1a69291d145..b3a62befc5e 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.11 + +No user-facing changes. + ## 2.3.10 No user-facing changes. diff --git a/javascript/ql/src/change-notes/released/2.3.11.md b/javascript/ql/src/change-notes/released/2.3.11.md new file mode 100644 index 00000000000..31b11998b74 --- /dev/null +++ b/javascript/ql/src/change-notes/released/2.3.11.md @@ -0,0 +1,3 @@ +## 2.3.11 + +No user-facing changes. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index a4a2f98d509..5ac091006e8 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.3.10 +lastReleaseVersion: 2.3.11 diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index e58cb3d2d94..03a7153c05a 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 2.3.11-dev +version: 2.3.11 groups: - javascript - queries diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index 8e20945c6bf..8f96c9ba8dd 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.51.md b/misc/suite-helpers/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index fd00605cfd1..a6aeeb719fa 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.51-dev +version: 1.0.51 groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 3d09821803b..3efb4e57482 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.1.2 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. + ## 7.1.1 No user-facing changes. diff --git a/python/ql/lib/change-notes/2026-05-14-sensitive-data.md b/python/ql/lib/change-notes/released/7.1.2.md similarity index 90% rename from python/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to python/ql/lib/change-notes/released/7.1.2.md index 49754de35ce..523a14edfbe 100644 --- a/python/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/python/ql/lib/change-notes/released/7.1.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 7.1.2 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 8e970df6cae..547681cc440 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.1 +lastReleaseVersion: 7.1.2 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 981ab78ff33..a53a716fbf0 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 7.1.2-dev +version: 7.1.2 groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 544b9778d4d..27698f1d3df 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.4 + +No user-facing changes. + ## 1.8.3 No user-facing changes. diff --git a/python/ql/src/change-notes/released/1.8.4.md b/python/ql/src/change-notes/released/1.8.4.md new file mode 100644 index 00000000000..9aef6d10d1c --- /dev/null +++ b/python/ql/src/change-notes/released/1.8.4.md @@ -0,0 +1,3 @@ +## 1.8.4 + +No user-facing changes. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index 8071ef421ab..f2a60cd1327 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.8.3 +lastReleaseVersion: 1.8.4 diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index 2fc026ff480..afa318334b6 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.8.4-dev +version: 1.8.4 groups: - python - queries diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index 07859d0f0e6..d26bfa6f205 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.2.2 + +No user-facing changes. + ## 5.2.1 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/5.2.2.md b/ruby/ql/lib/change-notes/released/5.2.2.md new file mode 100644 index 00000000000..22402d6e8fa --- /dev/null +++ b/ruby/ql/lib/change-notes/released/5.2.2.md @@ -0,0 +1,3 @@ +## 5.2.2 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 1684d0e72a2..e3b1b0c079d 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.2.1 +lastReleaseVersion: 5.2.2 diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index df8efbe68de..b36aada4770 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 5.2.2-dev +version: 5.2.2 groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index c874059c151..384ca633202 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 No user-facing changes. diff --git a/ruby/ql/src/change-notes/released/1.6.4.md b/ruby/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/ruby/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index b68d13e5908..e0c8c6b4c0c 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.6.4-dev +version: 1.6.4 groups: - ruby - queries diff --git a/rust/ql/lib/CHANGELOG.md b/rust/ql/lib/CHANGELOG.md index d85d27d88d6..3651026d737 100644 --- a/rust/ql/lib/CHANGELOG.md +++ b/rust/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.2.15 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. + ## 0.2.14 No user-facing changes. diff --git a/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md b/rust/ql/lib/change-notes/released/0.2.15.md similarity index 89% rename from rust/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to rust/ql/lib/change-notes/released/0.2.15.md index 5aa6febd49b..3644126ec1f 100644 --- a/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/rust/ql/lib/change-notes/released/0.2.15.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 0.2.15 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/rust/ql/lib/codeql-pack.release.yml b/rust/ql/lib/codeql-pack.release.yml index c53820a76d5..0f574e080e4 100644 --- a/rust/ql/lib/codeql-pack.release.yml +++ b/rust/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.14 +lastReleaseVersion: 0.2.15 diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index 062c2f4e635..49c4dddd4c6 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.2.15-dev +version: 0.2.15 groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/src/CHANGELOG.md b/rust/ql/src/CHANGELOG.md index ad1e8ef3bfe..4f4807ff82e 100644 --- a/rust/ql/src/CHANGELOG.md +++ b/rust/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.36 + +No user-facing changes. + ## 0.1.35 No user-facing changes. diff --git a/rust/ql/src/change-notes/released/0.1.36.md b/rust/ql/src/change-notes/released/0.1.36.md new file mode 100644 index 00000000000..8685189c564 --- /dev/null +++ b/rust/ql/src/change-notes/released/0.1.36.md @@ -0,0 +1,3 @@ +## 0.1.36 + +No user-facing changes. diff --git a/rust/ql/src/codeql-pack.release.yml b/rust/ql/src/codeql-pack.release.yml index 6a5806eec2b..270bd27a7aa 100644 --- a/rust/ql/src/codeql-pack.release.yml +++ b/rust/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.35 +lastReleaseVersion: 0.1.36 diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 67966540de6..853aefb020d 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.36-dev +version: 0.1.36 groups: - rust - queries diff --git a/shared/concepts/CHANGELOG.md b/shared/concepts/CHANGELOG.md index e2de2975455..787779674f0 100644 --- a/shared/concepts/CHANGELOG.md +++ b/shared/concepts/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.25 + +No user-facing changes. + ## 0.0.24 No user-facing changes. diff --git a/shared/concepts/change-notes/released/0.0.25.md b/shared/concepts/change-notes/released/0.0.25.md new file mode 100644 index 00000000000..e41a9acfa06 --- /dev/null +++ b/shared/concepts/change-notes/released/0.0.25.md @@ -0,0 +1,3 @@ +## 0.0.25 + +No user-facing changes. diff --git a/shared/concepts/codeql-pack.release.yml b/shared/concepts/codeql-pack.release.yml index b956773a07f..6d0e80a50c3 100644 --- a/shared/concepts/codeql-pack.release.yml +++ b/shared/concepts/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.24 +lastReleaseVersion: 0.0.25 diff --git a/shared/concepts/qlpack.yml b/shared/concepts/qlpack.yml index c51537b2228..98ae75ca6ca 100644 --- a/shared/concepts/qlpack.yml +++ b/shared/concepts/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/concepts -version: 0.0.25-dev +version: 0.0.25 groups: shared library: true dependencies: diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index dc02f115c99..8ac7faf2554 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.35 + +No user-facing changes. + ## 2.0.34 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.35.md b/shared/controlflow/change-notes/released/2.0.35.md new file mode 100644 index 00000000000..526e1fc9f4c --- /dev/null +++ b/shared/controlflow/change-notes/released/2.0.35.md @@ -0,0 +1,3 @@ +## 2.0.35 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 339a3ce7c57..27eb8ef8ece 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.34 +lastReleaseVersion: 2.0.35 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index e33617ca4f0..a28d74ae749 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.35-dev +version: 2.0.35 groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index 7ecbeda3b21..b2cf75110ac 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.7 + +No user-facing changes. + ## 2.1.6 No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.1.7.md b/shared/dataflow/change-notes/released/2.1.7.md new file mode 100644 index 00000000000..af7772169fe --- /dev/null +++ b/shared/dataflow/change-notes/released/2.1.7.md @@ -0,0 +1,3 @@ +## 2.1.7 + +No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index 1c810b60c4a..cfa57a47251 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.1.6 +lastReleaseVersion: 2.1.7 diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 2058b35be64..6564305a246 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.1.7-dev +version: 2.1.7 groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index 964c1bb1d98..6619a18079c 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.51.md b/shared/mad/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/mad/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index fb135546a90..c8d8eb47b4a 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/quantum/CHANGELOG.md b/shared/quantum/CHANGELOG.md index 7153b9314b1..c8b656e4f35 100644 --- a/shared/quantum/CHANGELOG.md +++ b/shared/quantum/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.29 + +No user-facing changes. + ## 0.0.28 No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.29.md b/shared/quantum/change-notes/released/0.0.29.md new file mode 100644 index 00000000000..4428927c79d --- /dev/null +++ b/shared/quantum/change-notes/released/0.0.29.md @@ -0,0 +1,3 @@ +## 0.0.29 + +No user-facing changes. diff --git a/shared/quantum/codeql-pack.release.yml b/shared/quantum/codeql-pack.release.yml index 3462db7d348..c81f1813120 100644 --- a/shared/quantum/codeql-pack.release.yml +++ b/shared/quantum/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.28 +lastReleaseVersion: 0.0.29 diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index 951cce392ae..a8d3a71823b 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.29-dev +version: 0.0.29 groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index e2a893046c9..a400a91f8c9 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.51.md b/shared/rangeanalysis/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 41f319731b0..5ea1c83b182 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index bb83dfc0a1f..c4b7fc6e87f 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.51.md b/shared/regex/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/regex/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 198bf43da04..3c01106e9b8 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index f9145f2c88b..9cfe68398b2 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.27 + +No user-facing changes. + ## 2.0.26 No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.27.md b/shared/ssa/change-notes/released/2.0.27.md new file mode 100644 index 00000000000..639cf77090e --- /dev/null +++ b/shared/ssa/change-notes/released/2.0.27.md @@ -0,0 +1,3 @@ +## 2.0.27 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index 63d57bef481..a047558f018 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.26 +lastReleaseVersion: 2.0.27 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index 5f8de945745..c10e0892660 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.27-dev +version: 2.0.27 groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index 512a5732ccd..14258018aea 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.51.md b/shared/threat-models/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index c3ac3656b3a..855242656c8 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.51-dev +version: 1.0.51 library: true groups: shared dataExtensions: diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index c98a035d149..9e78286a1a4 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.51.md b/shared/tutorial/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index e68fe7948ff..39bfd9cc21d 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index de43834a84e..e9334c9da8d 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.51.md b/shared/typeflow/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index 482138349ac..f06ea443f79 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/typeinference/CHANGELOG.md b/shared/typeinference/CHANGELOG.md index 3bbb96e59a9..24dc81f3aa2 100644 --- a/shared/typeinference/CHANGELOG.md +++ b/shared/typeinference/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.32 + +No user-facing changes. + ## 0.0.31 No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.32.md b/shared/typeinference/change-notes/released/0.0.32.md new file mode 100644 index 00000000000..c390443f09a --- /dev/null +++ b/shared/typeinference/change-notes/released/0.0.32.md @@ -0,0 +1,3 @@ +## 0.0.32 + +No user-facing changes. diff --git a/shared/typeinference/codeql-pack.release.yml b/shared/typeinference/codeql-pack.release.yml index 54b504d06ec..714fcfc1828 100644 --- a/shared/typeinference/codeql-pack.release.yml +++ b/shared/typeinference/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.31 +lastReleaseVersion: 0.0.32 diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index d7dbeae2e09..ece5dd3b6e8 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.32-dev +version: 0.0.32 groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 313862d5bc7..e9b5492b0d8 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.35 + +No user-facing changes. + ## 2.0.34 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.35.md b/shared/typetracking/change-notes/released/2.0.35.md new file mode 100644 index 00000000000..526e1fc9f4c --- /dev/null +++ b/shared/typetracking/change-notes/released/2.0.35.md @@ -0,0 +1,3 @@ +## 2.0.35 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 339a3ce7c57..27eb8ef8ece 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.34 +lastReleaseVersion: 2.0.35 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index 891f8d0b1b1..bd874407aff 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.35-dev +version: 2.0.35 groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index 5838cd3c535..dbafbea9b98 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.51.md b/shared/typos/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/typos/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index b4705122b0a..9a2ed996444 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index 24a4f7d09a2..df741ed9d73 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.38 + +No user-facing changes. + ## 2.0.37 No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.38.md b/shared/util/change-notes/released/2.0.38.md new file mode 100644 index 00000000000..0fab2ede165 --- /dev/null +++ b/shared/util/change-notes/released/2.0.38.md @@ -0,0 +1,3 @@ +## 2.0.38 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 108259a7400..4ec9eb0980c 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.37 +lastReleaseVersion: 2.0.38 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 6190a3b4275..dc654fca261 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.38-dev +version: 2.0.38 groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 96dfbcadf56..685a8032d64 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.51.md b/shared/xml/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/xml/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index c8e51461dae..40cf2695728 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index e006acbeb21..4f57ee07cfa 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.51.md b/shared/yaml/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index c499501ab26..0b4fd245f3b 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index 01461fd5bfe..1eb5afb48e7 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 6.7.0 + +### Major Analysis Improvements + +* Upgraded to allow analysis of Swift 6.3.2. + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. + ## 6.6.0 ### New Features diff --git a/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md b/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md deleted file mode 100644 index 530b7187e7a..00000000000 --- a/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: majorAnalysis ---- -* Upgraded to allow analysis of Swift 6.3.2. diff --git a/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md b/swift/ql/lib/change-notes/released/6.7.0.md similarity index 76% rename from swift/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to swift/ql/lib/change-notes/released/6.7.0.md index 70e96a3469c..8d7bf41cc1d 100644 --- a/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/swift/ql/lib/change-notes/released/6.7.0.md @@ -1,4 +1,9 @@ ---- -category: minorAnalysis ---- +## 6.7.0 + +### Major Analysis Improvements + +* Upgraded to allow analysis of Swift 6.3.2. + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 4d7f31f2d8e..55a13d309e5 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.6.0 +lastReleaseVersion: 6.7.0 diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index 5e2f7c2942d..f62f77afa0e 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 6.6.1-dev +version: 6.7.0 groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index 4bd8088718a..4e3b53c37b3 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.4 + +No user-facing changes. + ## 1.3.3 No user-facing changes. diff --git a/swift/ql/src/change-notes/released/1.3.4.md b/swift/ql/src/change-notes/released/1.3.4.md new file mode 100644 index 00000000000..5073aca7222 --- /dev/null +++ b/swift/ql/src/change-notes/released/1.3.4.md @@ -0,0 +1,3 @@ +## 1.3.4 + +No user-facing changes. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index eb1f7dabc84..8263ddf2c8b 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.3.3 +lastReleaseVersion: 1.3.4 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index da4df6ae6d9..05710b29874 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.3.4-dev +version: 1.3.4 groups: - swift - queries From 26da373bd46bc03c80c10ea294613936f93f02ee Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 26 May 2026 14:11:36 +0200 Subject: [PATCH 50/85] C#: Update Roslyn and other pinned dependencies. --- csharp/paket.dependencies | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/paket.dependencies b/csharp/paket.dependencies index 61cb1d3d8d9..19a45cd7530 100644 --- a/csharp/paket.dependencies +++ b/csharp/paket.dependencies @@ -4,7 +4,7 @@ source https://api.nuget.org/v3/index.json # behave like nuget in choosing transitive dependency versions strategy: max -nuget Basic.CompilerLog.Util 0.9.25 +nuget Basic.CompilerLog.Util 0.9.39 nuget Mono.Posix.NETStandard nuget Newtonsoft.Json nuget NuGet.Versioning @@ -12,7 +12,7 @@ nuget xunit nuget xunit.runner.visualstudio nuget xunit.runner.utility nuget Microsoft.NET.Test.Sdk -nuget Microsoft.CodeAnalysis.CSharp 5.0.0 -nuget Microsoft.CodeAnalysis 5.0.0 -nuget Microsoft.Build 18.0.2 +nuget Microsoft.CodeAnalysis.CSharp 5.3.0 +nuget Microsoft.CodeAnalysis 5.3.0 +nuget Microsoft.Build 18.6.3 nuget Microsoft.VisualStudio.SolutionPersistence From 769b1957a56dc843059766952fdbd7ddafbc1f89 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 26 May 2026 14:13:02 +0200 Subject: [PATCH 51/85] C#: Update generated files. --- csharp/paket.lock | 100 ++++++++++++++++++++---------------------- csharp/paket.main.bzl | 31 +++++++------ 2 files changed, 63 insertions(+), 68 deletions(-) diff --git a/csharp/paket.lock b/csharp/paket.lock index 5e114b0d19f..f76a8afa7eb 100644 --- a/csharp/paket.lock +++ b/csharp/paket.lock @@ -3,45 +3,42 @@ STRATEGY: MAX RESTRICTION: == net10.0 NUGET remote: https://api.nuget.org/v3/index.json - Basic.CompilerLog.Util (0.9.25) + Basic.CompilerLog.Util (0.9.39) MessagePack (>= 3.1.4) - Microsoft.Bcl.Memory (>= 9.0.10) + Microsoft.Bcl.Memory (>= 10.0.7) Microsoft.CodeAnalysis (>= 4.8) Microsoft.CodeAnalysis.CSharp (>= 4.8) Microsoft.CodeAnalysis.VisualBasic (>= 4.8) - Microsoft.Extensions.ObjectPool (>= 9.0.10) - MSBuild.StructuredLogger (>= 2.3.71) - NaturalSort.Extension (>= 4.4) - NuGet.Versioning (>= 6.14) + Microsoft.Extensions.ObjectPool (>= 10.0.7) + MSBuild.StructuredLogger (>= 2.3.178) Humanizer.Core (3.0.10) - MessagePack (3.1.4) - MessagePack.Annotations (>= 3.1.4) - MessagePackAnalyzer (>= 3.1.4) + MessagePack (3.1.6) + MessagePack.Annotations (>= 3.1.6) + MessagePackAnalyzer (>= 3.1.6) Microsoft.NET.StringTools (>= 17.11.4) - MessagePack.Annotations (3.1.4) - MessagePackAnalyzer (3.1.4) + MessagePack.Annotations (3.1.6) + MessagePackAnalyzer (3.1.6) Microsoft.Bcl.AsyncInterfaces (10.0.8) Microsoft.Bcl.Memory (10.0.8) - Microsoft.Build (18.0.2) - Microsoft.Build.Framework (>= 18.0.2) - Microsoft.NET.StringTools (>= 18.0.2) - System.Configuration.ConfigurationManager (>= 9.0) - System.Diagnostics.EventLog (>= 9.0) - System.Reflection.MetadataLoadContext (>= 9.0) - System.Security.Cryptography.ProtectedData (>= 9.0.6) - Microsoft.Build.Framework (18.4) - Microsoft.Build.Utilities.Core (18.4) - Microsoft.Build.Framework (>= 18.4) - Microsoft.NET.StringTools (>= 18.4) - System.Configuration.ConfigurationManager (>= 10.0.1) - System.Diagnostics.EventLog (>= 10.0.1) - System.Security.Cryptography.ProtectedData (>= 10.0.1) - Microsoft.CodeAnalysis (5.0) + Microsoft.Build (18.6.3) + Microsoft.Build.Framework (>= 18.6.3) + System.Configuration.ConfigurationManager (>= 10.0.3) + System.Diagnostics.EventLog (>= 10.0.3) + System.Reflection.MetadataLoadContext (>= 10.0.3) + System.Security.Cryptography.ProtectedData (>= 10.0.3) + Microsoft.Build.Framework (18.6.3) + Microsoft.NET.StringTools (>= 18.6.3) + Microsoft.Build.Utilities.Core (18.6.3) + Microsoft.Build.Framework (>= 18.6.3) + System.Configuration.ConfigurationManager (>= 10.0.3) + System.Diagnostics.EventLog (>= 10.0.3) + System.Security.Cryptography.ProtectedData (>= 10.0.3) + Microsoft.CodeAnalysis (5.3) Humanizer.Core (>= 2.14.1) Microsoft.Bcl.AsyncInterfaces (>= 9.0) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.CSharp.Workspaces (5.0) - Microsoft.CodeAnalysis.VisualBasic.Workspaces (5.0) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.CSharp.Workspaces (5.3) + Microsoft.CodeAnalysis.VisualBasic.Workspaces (5.3) System.Buffers (>= 4.6) System.Collections.Immutable (>= 9.0) System.Composition (>= 9.0) @@ -54,36 +51,36 @@ NUGET System.Threading.Channels (>= 8.0) System.Threading.Tasks.Extensions (>= 4.6) Microsoft.CodeAnalysis.Analyzers (5.3) - Microsoft.CodeAnalysis.Common (5.0) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.CSharp (5.0) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (5.0) - Microsoft.CodeAnalysis.CSharp.Workspaces (5.0) + Microsoft.CodeAnalysis.Common (5.3) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.CSharp (5.3) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.Common (5.3) + Microsoft.CodeAnalysis.CSharp.Workspaces (5.3) Humanizer.Core (>= 2.14.1) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (5.0) - Microsoft.CodeAnalysis.CSharp (5.0) - Microsoft.CodeAnalysis.Workspaces.Common (5.0) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.Common (5.3) + Microsoft.CodeAnalysis.CSharp (5.3) + Microsoft.CodeAnalysis.Workspaces.Common (5.3) System.Composition (>= 9.0) - Microsoft.CodeAnalysis.VisualBasic (5.0) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (5.0) - Microsoft.CodeAnalysis.VisualBasic.Workspaces (5.0) + Microsoft.CodeAnalysis.VisualBasic (5.3) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.Common (5.3) + Microsoft.CodeAnalysis.VisualBasic.Workspaces (5.3) Humanizer.Core (>= 2.14.1) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (5.0) - Microsoft.CodeAnalysis.VisualBasic (5.0) - Microsoft.CodeAnalysis.Workspaces.Common (5.0) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.Common (5.3) + Microsoft.CodeAnalysis.VisualBasic (5.3) + Microsoft.CodeAnalysis.Workspaces.Common (5.3) System.Composition (>= 9.0) - Microsoft.CodeAnalysis.Workspaces.Common (5.0) + Microsoft.CodeAnalysis.Workspaces.Common (5.3) Humanizer.Core (>= 2.14.1) - Microsoft.CodeAnalysis.Analyzers (>= 3.11) - Microsoft.CodeAnalysis.Common (5.0) + Microsoft.CodeAnalysis.Analyzers (>= 5.3.0-2.25625.1) + Microsoft.CodeAnalysis.Common (5.3) System.Composition (>= 9.0) Microsoft.CodeCoverage (18.5.1) Microsoft.Extensions.ObjectPool (10.0.8) - Microsoft.NET.StringTools (18.4) + Microsoft.NET.StringTools (18.6.3) Microsoft.NET.Test.Sdk (18.5.1) Microsoft.CodeCoverage (>= 18.5.1) Microsoft.TestPlatform.TestHost (>= 18.5.1) @@ -97,7 +94,6 @@ NUGET MSBuild.StructuredLogger (2.3.204) Microsoft.Build.Framework (>= 17.5) Microsoft.Build.Utilities.Core (>= 17.5) - NaturalSort.Extension (4.4.1) Newtonsoft.Json (13.0.4) NuGet.Versioning (7.6) System.Buffers (4.6.1) diff --git a/csharp/paket.main.bzl b/csharp/paket.main.bzl index 115b23ac9f1..0c1b1333424 100644 --- a/csharp/paket.main.bzl +++ b/csharp/paket.main.bzl @@ -7,34 +7,33 @@ def main(): nuget_repo( name = "paket.main", packages = [ - {"name": "Basic.CompilerLog.Util", "id": "Basic.CompilerLog.Util", "version": "0.9.25", "sha512": "sha512-AU428QscGy1Z9eM4WqAqlO19pRIyHPZ+K63jgKX+sBWFzVLHMlyc97RVdm8VUAqVVBauS7kwaiA3S1sE/mBr4w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net462": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net47": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net471": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net472": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net48": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net5.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net6.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net7.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "net8.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning"], "net9.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netcoreapp2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netcoreapp2.2": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netcoreapp3.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netcoreapp3.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"], "netstandard2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "NaturalSort.Extension", "NuGet.Versioning", "System.Buffers"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Basic.CompilerLog.Util", "id": "Basic.CompilerLog.Util", "version": "0.9.39", "sha512": "sha512-/Kqh12aedOvhOPuFDk/yE8HauuxXFuzB8Qt+NxEUopKnxyXtV0uPIVgBU3mLNC1Dj2E5Yhcz1rtECwnu4Tv1eg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net462": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net47": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net471": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net472": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net48": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net5.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net6.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net7.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net8.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "net9.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netcoreapp2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netcoreapp2.2": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netcoreapp3.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netcoreapp3.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"], "netstandard2.1": ["MSBuild.StructuredLogger", "MessagePack", "Microsoft.Bcl.Memory", "Microsoft.CodeAnalysis", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.Extensions.ObjectPool", "System.Buffers"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Humanizer.Core", "id": "Humanizer.Core", "version": "3.0.10", "sha512": "sha512-86jRQVvMLU7xxsdHrK87TSqu5kL0lg4EiRjvTBglkrtLw242dMON4vTrFbGKr2CRjqbThBuIpodF2MWbCFKZYA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Collections.Immutable", "System.Memory"], "net462": ["System.Collections.Immutable", "System.Memory"], "net47": ["System.Collections.Immutable", "System.Memory"], "net471": ["System.Collections.Immutable", "System.Memory"], "net472": ["System.Collections.Immutable", "System.Memory"], "net48": ["System.Collections.Immutable", "System.Memory"], "net5.0": ["System.Collections.Immutable", "System.Memory"], "net6.0": ["System.Collections.Immutable", "System.Memory"], "net7.0": ["System.Collections.Immutable", "System.Memory"], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Collections.Immutable", "System.Memory"], "netcoreapp2.1": ["System.Collections.Immutable", "System.Memory"], "netcoreapp2.2": ["System.Collections.Immutable", "System.Memory"], "netcoreapp3.0": ["System.Collections.Immutable", "System.Memory"], "netcoreapp3.1": ["System.Collections.Immutable", "System.Memory"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Collections.Immutable", "System.Memory"], "netstandard2.1": ["System.Collections.Immutable", "System.Memory"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "MessagePack", "id": "MessagePack", "version": "3.1.4", "sha512": "sha512-O0JoklM97ru+Rqr1hGnlCbSAxi8MOk48pwoaT458RzboCHuAkQWTh+Of9MUoN3LE0Cb2tapku0FRPt2hnk+o0g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net6.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net7.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net8.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "net9.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "netcoreapp3.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "MessagePack.Annotations", "id": "MessagePack.Annotations", "version": "3.1.4", "sha512": "sha512-kIgD3A0OHs8+VUabMhIJT9ZF4oGHqjCocaRDmERI/Ds2hzJ5q3kcvzn5zI7V3CJ2NlQ4HDI80uh6zCqglwgQCQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "MessagePackAnalyzer", "id": "MessagePackAnalyzer", "version": "3.1.4", "sha512": "sha512-DFlhiA5fia4iK6i0S+L7sYMYmo5XRgWydKxiaxwz7tfcbvIhU7nmG4JzN1D9Y2XCEmLNExvNwTzXVEgURu4GnA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "MessagePack", "id": "MessagePack", "version": "3.1.6", "sha512": "sha512-vkEho7kN4kxlkd238214A0/FGz6DB1Dalexql8CtUpsbtr0DhKmhBLsmZlqc9H6rRiRvG2VJyt+UqUmQxZoqyw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net6.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net7.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "net8.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "net9.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "netcoreapp3.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Threading.Tasks.Extensions", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["MessagePackAnalyzer", "MessagePack.Annotations", "Microsoft.NET.StringTools", "System.Collections.Immutable"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "MessagePack.Annotations", "id": "MessagePack.Annotations", "version": "3.1.6", "sha512": "sha512-7uF/iFA6NSB5Eo0HijkyEAHPURQC2ESmzoqNFd2bVqu2opQnuvutGYvcZKV91FXQ6YMDhzYvYbIlSTJ/Jru5+Q==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "MessagePackAnalyzer", "id": "MessagePackAnalyzer", "version": "3.1.6", "sha512": "sha512-eLmNdEFDwLjBiv3/rv/mBtIu18pu9eujlZ8pb0EsbnMzuNyNUp3GJ0WLL0h4qYRW5N41f8zN1N627h/kChe3oA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.Bcl.AsyncInterfaces", "id": "Microsoft.Bcl.AsyncInterfaces", "version": "10.0.8", "sha512": "sha512-FzE/KnOmwCmg2KMPjuyevkS5fAzNt2DBLSJs3HsJ+I/CoBSW6i0mighH6ryZ8JHQhNLxMK04X7J8BTt0kEG5/g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Threading.Tasks.Extensions"], "net462": ["System.Threading.Tasks.Extensions"], "net47": ["System.Threading.Tasks.Extensions"], "net471": ["System.Threading.Tasks.Extensions"], "net472": ["System.Threading.Tasks.Extensions"], "net48": ["System.Threading.Tasks.Extensions"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["System.Threading.Tasks.Extensions"], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Threading.Tasks.Extensions"], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.Bcl.Memory", "id": "Microsoft.Bcl.Memory", "version": "10.0.8", "sha512": "sha512-Gd9LaF0vnR5noQP7/LPjSKvXw22b51ejGGs/HJHbzNbMOzT1KqGzW2329gP8DKKMj5iYACBKISwl6nDr32WFWA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Runtime.CompilerServices.Unsafe"], "net7.0": ["System.Runtime.CompilerServices.Unsafe"], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.Build", "id": "Microsoft.Build", "version": "18.0.2", "sha512": "sha512-/rRET3AtEAUTKFDboKvp/GTDxGwU7VBBfwaKeZtzGg+pyqYdvasHeR3ERTuoxSrgJqnu1J23xd4H481IiJFhnA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Configuration.ConfigurationManager", "System.Reflection.MetadataLoadContext", "System.Diagnostics.EventLog", "System.Security.Cryptography.ProtectedData"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Reflection.MetadataLoadContext", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Reflection.MetadataLoadContext", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.Build.Framework", "id": "Microsoft.Build.Framework", "version": "18.4.0", "sha512": "sha512-VmOBicA4RSSTO857wrg91S9eOAsfnZLPeZZdXCsffJAZ8zQAMmZjATuin/LZFH21ajS9nPj7GBe+jvFRNzJPhA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe", "System.Memory", "System.Threading.Tasks.Extensions"], "net48": ["System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe", "System.Memory", "System.Threading.Tasks.Extensions"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.Build.Utilities.Core", "id": "Microsoft.Build.Utilities.Core", "version": "18.4.0", "sha512": "sha512-cW8W3/rloKlL12/CjTrPsFIOk7gHr6RsosBk9K6Qi6vSMdibgVLTicymvem+pBWPSQ5EG/m7Uwb7jF3qqJMwog==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Configuration.ConfigurationManager", "System.Diagnostics.EventLog", "System.Security.Cryptography.ProtectedData"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework"], "net462": ["Microsoft.Build.Framework"], "net47": ["Microsoft.Build.Framework"], "net471": ["Microsoft.Build.Framework"], "net472": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.Build.Framework", "Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.Build.Framework"], "net6.0": ["Microsoft.Build.Framework"], "net7.0": ["Microsoft.Build.Framework"], "net8.0": ["Microsoft.Build.Framework"], "net9.0": ["Microsoft.Build.Framework"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework"], "netcoreapp2.1": ["Microsoft.Build.Framework"], "netcoreapp2.2": ["Microsoft.Build.Framework"], "netcoreapp3.0": ["Microsoft.Build.Framework"], "netcoreapp3.1": ["Microsoft.Build.Framework"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework"], "netstandard2.1": ["Microsoft.Build.Framework"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis", "id": "Microsoft.CodeAnalysis", "version": "5.0.0", "sha512": "sha512-ToXzcZLcHA9vT4e1A6jNafAPuTJj4osfqJck562Be8ByvzS78pY9I+SdO5yo2Kwka0lz++hOWypW1Qdf1TtR4w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net9.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.Build", "id": "Microsoft.Build", "version": "18.6.3", "sha512": "sha512-KC9xCNrucJlKrA0KFXiYUHZI74kNBOaZ/BLHSCm06fS7aoHnlAlRZizti+i4V0AsaJlaIBjtN/Cf6LkcmENi4w==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.Build.Framework", "System.Configuration.ConfigurationManager", "System.Reflection.MetadataLoadContext", "System.Diagnostics.EventLog", "System.Security.Cryptography.ProtectedData"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["Microsoft.Build.Framework", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Reflection.MetadataLoadContext", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.Build.Framework", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Reflection.MetadataLoadContext", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.Build.Framework", "id": "Microsoft.Build.Framework", "version": "18.6.3", "sha512": "sha512-p11xRx05A+bU2oUIsKKuAEOEPyroo2ygUwQVDLAGV3ZkNtHBsQs9RojvRqr+wiql7KPUXv0qbwKcACUpsbbmcA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.NET.StringTools"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe", "System.Memory", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.NET.StringTools", "System.Collections.Immutable", "System.Runtime.CompilerServices.Unsafe", "System.Memory", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net9.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["Microsoft.NET.StringTools", "System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.Build.Utilities.Core", "id": "Microsoft.Build.Utilities.Core", "version": "18.6.3", "sha512": "sha512-uB3c5znytjARTsycmhOfnTavdGTYalYWcCtb6RAFqHcXv2y8JxGsdgQQ39n9IqXpt9JyxPSWz2uVuztuG/Oplw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.Build.Framework", "System.Configuration.ConfigurationManager", "System.Diagnostics.EventLog", "System.Security.Cryptography.ProtectedData"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["Microsoft.Build.Framework", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.Build.Framework", "System.Collections.Immutable", "System.Configuration.ConfigurationManager", "System.Memory", "System.Runtime.CompilerServices.Unsafe", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net9.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["Microsoft.Build.Framework", "System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis", "id": "Microsoft.CodeAnalysis", "version": "5.3.0", "sha512": "sha512-gCuN2a/33HYRrRg4P2LvbgSsUaGP/FSHTaz6FapSaEATYnbXBoiR9Nk/ItHAknc6IQPtodkUYKvX78MkBdoOSg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net9.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.CSharp.Workspaces", "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.CodeAnalysis.Analyzers", "id": "Microsoft.CodeAnalysis.Analyzers", "version": "5.3.0", "sha512": "sha512-v9jPlSs/fE7AU2/eZOw5EUzq0JOaWgP+2gghwIP2XbbTv56PZZZsy1QgEiMa3jjO8hR8SN1+NJvG1xxHL2FDgw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.Common", "id": "Microsoft.CodeAnalysis.Common", "version": "5.0.0", "sha512": "sha512-uK5yslTJQ2UznzYlttFuDCa/6KruN1aQW/ZNFFHvK+yyA6q7vZ5o0BSPvLj+Com1/R7wGJ07c2O0lPcbDrmQdw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net462": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net47": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net471": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net472": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net48": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net5.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net6.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net7.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net8.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netstandard2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.CSharp", "id": "Microsoft.CodeAnalysis.CSharp", "version": "5.0.0", "sha512": "sha512-wwT/CJOQyQ72Ldouy7gjS/3Vi92hbAAoU3Y0e/6mb39+Vp7aXr3PxuBD73U2QrK1zzgTyv3QhvJPrQX0EiWS8Q==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.CSharp.Workspaces", "id": "Microsoft.CodeAnalysis.CSharp.Workspaces", "version": "5.0.0", "sha512": "sha512-Fy0BNxco9b7XC7LKdTgq+Kk62HKapyEM05LN5ua3Nt6PZ4pzfAAh+9Dg/VW4aSflgYoiQw/mjnotgUuM9NP6Kw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.VisualBasic", "id": "Microsoft.CodeAnalysis.VisualBasic", "version": "5.0.0", "sha512": "sha512-jGrTRyHgUXYd0iH1wF4svuGnB/3kPerq+iIbaLq5XpNv2+3hbZPyyDla+k/Ylpur6+9ZsDoP0ymhribbgXLmYA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "id": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "version": "5.0.0", "sha512": "sha512-sgWa3mUtCHIfPcSCyKKksrZNlYnmKWeivbZdENrPLTJQXiKXCjFcVYaxRvGBcYeAQES5J63iV03XVviSkJyMqQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.CodeAnalysis.Workspaces.Common", "id": "Microsoft.CodeAnalysis.Workspaces.Common", "version": "5.0.0", "sha512": "sha512-zbKJyIkFW+2Bx5eQl/IWBLmbPTpo9/UyAbt8vaVTXsoi4EYlXrJftCRZmUsmyQP7pg3qKMiR6czPdUjTadNkhA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "System.IO.Pipelines", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.Common", "id": "Microsoft.CodeAnalysis.Common", "version": "5.3.0", "sha512": "sha512-lt42ETYkJrzJrf99jQ9n7xnanR/ETh92o6LX03kTjQKfKFrJGm5/+4OQJyIz8Kj4/ClbeZ3kvxytsyds4jQ5Tg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net462": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net47": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net471": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net472": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net48": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net5.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net6.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net7.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "net8.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"], "netstandard2.1": ["Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Memory", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions", "System.Buffers", "System.Numerics.Vectors"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.CSharp", "id": "Microsoft.CodeAnalysis.CSharp", "version": "5.3.0", "sha512": "sha512-TD8ulDx0+qjf3oi5gcToiNaxVGzn0rsPN0hCQOq+skYGgugKGLVl8obs0KxrxAOx2xkjySbOcEBumgJ0uhzzgA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.CSharp.Workspaces", "id": "Microsoft.CodeAnalysis.CSharp.Workspaces", "version": "5.3.0", "sha512": "sha512-XwemsUpvFZ8zLvu9QxRdgh4rgoI1WypKHn9D4zrvN5V3p+CSJKmFBS1w09DuBSLe+DIITIu7JQmzmDsHXZow1g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.CSharp", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.VisualBasic", "id": "Microsoft.CodeAnalysis.VisualBasic", "version": "5.3.0", "sha512": "sha512-0zqIJspSNg8iBDho82FwYt4ajoBRzMEtzdIPs5KBeisxNIBMpZh8CXJED8RY32HCsIOA5tx870xpgPsXOysMqA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "id": "Microsoft.CodeAnalysis.VisualBasic.Workspaces", "version": "5.3.0", "sha512": "sha512-FhpamkHtKiOd/2wlQ4l9K+NQLfAtBniWj2TWjgHp5rY+PNDRsOZpiTVBdrlwRTIR2oe6lz6cKYTxwBKVrPjOzQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.CodeAnalysis.Analyzers", "System.Composition"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Microsoft.CodeAnalysis.VisualBasic", "Microsoft.CodeAnalysis.Workspaces.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Composition", "System.IO.Pipelines", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Channels", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.CodeAnalysis.Workspaces.Common", "id": "Microsoft.CodeAnalysis.Workspaces.Common", "version": "5.3.0", "sha512": "sha512-pPJy45QDPFZNUpmgJz7fKL6Tte+CZ7NRw8GyluMBGLRAcwrZNMpWOKkV81MGnkCYOs8UA1b510MrQpevf0iQWw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "Microsoft.CodeAnalysis.Analyzers"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net462": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net47": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net471": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net472": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net48": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net5.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net6.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net7.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "net8.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "System.IO.Pipelines", "Microsoft.CodeAnalysis.Analyzers", "System.Collections.Immutable", "System.Reflection.Metadata"], "net9.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "System.Composition", "Microsoft.CodeAnalysis.Analyzers"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netcoreapp3.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Microsoft.CodeAnalysis.Common", "Humanizer.Core", "Microsoft.Bcl.AsyncInterfaces", "System.Composition", "System.IO.Pipelines", "System.Threading.Channels", "Microsoft.CodeAnalysis.Analyzers", "System.Buffers", "System.Collections.Immutable", "System.Memory", "System.Numerics.Vectors", "System.Reflection.Metadata", "System.Runtime.CompilerServices.Unsafe", "System.Text.Encoding.CodePages", "System.Threading.Tasks.Extensions"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.CodeCoverage", "id": "Microsoft.CodeCoverage", "version": "18.5.1", "sha512": "sha512-BjoX00WuEWNnHFo591eXZIcl3IYm1iln65ub545zWF1o6pHicSHcX2eUBWEJW9W6GA/9cf/ZgJ2XuGOyDdep2A==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.Extensions.ObjectPool", "id": "Microsoft.Extensions.ObjectPool", "version": "10.0.8", "sha512": "sha512-XOzhf+i3nZIyqy5sFaEdnNsPOPEYcEz9tL3YIU8RjK3aKIMLPLMaXDCGoOxKeOTN+03Faaz5le8X1RlKsW9rPQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "Microsoft.NET.StringTools", "id": "Microsoft.NET.StringTools", "version": "18.4.0", "sha512": "sha512-1II5n0nHfqVnFteNZsg1YLpbNM96P8VcX6UwCtYy4lXFrGNIvPnmfvz1y4ekxGQjHnxDvyphXkqIci9WhKcmBg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net9.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, + {"name": "Microsoft.NET.StringTools", "id": "Microsoft.NET.StringTools", "version": "18.6.3", "sha512": "sha512-8RtWydTzV9i25v80XBoNxZDxmxuClq0PVejE2dHfpLhD8jFoEEPP2S+q5oS9HdSKOVDurUDTdjMCEWUB+DiGZg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net9.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.NET.Test.Sdk", "id": "Microsoft.NET.Test.Sdk", "version": "18.5.1", "sha512": "sha512-5/ucicw/H9/VNCmMTCjCQhNHEJc08ZeSLSrjvdZR/rtVUY8Enw+bi9LQTP1K97aRCqw/BG7cIV+VVFvgj3fKiw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": ["Microsoft.CodeCoverage"], "net47": ["Microsoft.CodeCoverage"], "net471": ["Microsoft.CodeCoverage"], "net472": ["Microsoft.CodeCoverage"], "net48": ["Microsoft.CodeCoverage"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "net9.0": ["Microsoft.TestPlatform.TestHost", "Microsoft.CodeCoverage"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.TestPlatform.ObjectModel", "id": "Microsoft.TestPlatform.ObjectModel", "version": "18.5.1", "sha512": "sha512-SJHvdEawgdOUuyN2/eVWZCwe14DKPgQPDsQGiwfeKFgjzYDUvhESRpohG9IvQQuYiCvAv7Tn+ozZ2fDPfpwdzg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["System.Reflection.Metadata"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["System.Reflection.Metadata"], "net462": ["System.Reflection.Metadata"], "net47": ["System.Reflection.Metadata"], "net471": ["System.Reflection.Metadata"], "net472": ["System.Reflection.Metadata"], "net48": ["System.Reflection.Metadata"], "net5.0": ["System.Reflection.Metadata"], "net6.0": ["System.Reflection.Metadata"], "net7.0": ["System.Reflection.Metadata"], "net8.0": ["System.Reflection.Metadata"], "net9.0": ["System.Reflection.Metadata"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["System.Reflection.Metadata"], "netcoreapp2.1": ["System.Reflection.Metadata"], "netcoreapp2.2": ["System.Reflection.Metadata"], "netcoreapp3.0": ["System.Reflection.Metadata"], "netcoreapp3.1": ["System.Reflection.Metadata"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["System.Reflection.Metadata"], "netstandard2.1": ["System.Reflection.Metadata"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.TestPlatform.TestHost", "id": "Microsoft.TestPlatform.TestHost", "version": "18.5.1", "sha512": "sha512-CbWth1jMU2wVyAy1SVMexSyD3JXG8FYYyyrcY+B1aWhzFzRLh8JdThoibXTqXxZ2NRC9me+N4XIQC75dfLcgiA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.TestPlatform.ObjectModel", "Newtonsoft.Json"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": ["Microsoft.TestPlatform.ObjectModel", "Newtonsoft.Json"], "net9.0": ["Microsoft.TestPlatform.ObjectModel", "Newtonsoft.Json"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Microsoft.VisualStudio.SolutionPersistence", "id": "Microsoft.VisualStudio.SolutionPersistence", "version": "1.0.52", "sha512": "sha512-lHyMm5j5wRwVaC3vlCWrFH2FGy2SpFUZqLvYhzwf1cEUIQCUChU960h8kteFSf01ZkLSgJwrznmspwjW8kPtrA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": ["System.Memory", "System.Threading.Tasks.Extensions"], "net48": ["System.Memory", "System.Threading.Tasks.Extensions"], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Mono.Posix.NETStandard", "id": "Mono.Posix.NETStandard", "version": "1.0.0", "sha512": "sha512-RtGiutQZJAmajvQ0QvBvh73VJye85iW9f9tjZlzF88idLxNMo4lAktP/4Y9ilCpais0LDO0tpoICt9Hdv6wooA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "MSBuild.StructuredLogger", "id": "MSBuild.StructuredLogger", "version": "2.3.204", "sha512": "sha512-MnrlWYtNUl0db/2lePRJhtOCzbQkJ1L9tyrA4xlKTFqjvpw8wnnX6AQ+PXYhjlMJ8ET9aoXGJOn/3e9j07NSwg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net462": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net47": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net471": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net472": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net48": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net5.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net6.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net7.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net8.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "net9.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp2.2": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netcoreapp3.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"], "netstandard2.1": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core", "System.Collections.Immutable", "System.Memory", "System.Runtime.CompilerServices.Unsafe"]}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, - {"name": "NaturalSort.Extension", "id": "NaturalSort.Extension", "version": "4.4.1", "sha512": "sha512-UTrcQcgmn7pBdx+0Oi/NxlyPslWbMt7U8I1sg/4m36OkOCS+7QKZWY3O4dKcjHD2wQaBr9L2/XWnx3ViTaehZw==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "Newtonsoft.Json", "id": "Newtonsoft.Json", "version": "13.0.4", "sha512": "sha512-bR+v+E/yJ6g7GV2uXw2OrUSjYYfjLkOLC8JD4kCS23msLapnKtdJPBJA75fwHH++ErIffeIqzYITLxAur4KAXA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "NuGet.Versioning", "id": "NuGet.Versioning", "version": "7.6.0", "sha512": "sha512-JwbvmbG+1EOilFOAtjT2A7p05UgeOqzTZluUJ4mFgPZUSpYcHPPaK15x+RiqpKsVmKy741MaLN0fjOYxhGXr3g==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, {"name": "System.Buffers", "id": "System.Buffers", "version": "4.6.1", "sha512": "sha512-qve/dFwECwehSWlZmpkrrlIeATCvo/Hw2koyMrUVcDBy5gXAQrnwX8pHEoqgj8DgkrWuWW1DrQbFqoMbo+Fvrg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net10.0": [], "net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": [], "tools": {}}, From 7f2fb2eb99540575d3808188ce4f4e9cea295661 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 26 May 2026 15:59:00 +0200 Subject: [PATCH 52/85] C#: Use the generic version of the associated implementation. --- .../CodeAnalysisExtensions/SymbolExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs b/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs index fbc1b52c99b..dd7246fa659 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs @@ -664,7 +664,7 @@ namespace Semmle.Extraction.CSharp // Find the (possibly unbound) original extension method that maps to this implementation (if any). var unboundDeclaration = extensions.SelectMany(e => e.GetMembers()) .OfType() - .FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation, method.ConstructedFrom)); + .FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation?.ConstructedFrom, method.ConstructedFrom)); var isFullyConstructed = method.IsBoundGenericMethod(); if (isFullyConstructed && unboundDeclaration?.ContainingType is INamedTypeSymbol extensionType) From fbc861e7a407fea2f809e0094a6f0457bdd2a5ed Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 26 May 2026 16:19:02 +0200 Subject: [PATCH 53/85] unified: Clarify grammar comment Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- unified/extractor/tree-sitter-swift/grammar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index b6197b345e0..1e63a7eaabb 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -272,8 +272,8 @@ module.exports = grammar({ comment: ($) => token(prec(PRECS.comment, seq("//", /.*/))), // Named wrapper for the unnamed `_multiline_comment` external token, so // that multi-line comments still appear in the AST (e.g. as extras between - // top-level statements) without bleeding into class_body's $children when - // used as a class member separator. + // top-level statements) without being extracted as class body members when + // used only to separate those members. multiline_comment: ($) => $._multiline_comment, // Identifiers simple_identifier: ($) => From 7862922e5cd788819bc4d0dc99a69318208ad4cf Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 26 May 2026 17:54:51 +0200 Subject: [PATCH 54/85] C++: Remove deprecated code --- cpp/ql/lib/DefaultOptions.qll | 16 +----- cpp/ql/lib/Options.qll | 54 ------------------ cpp/ql/lib/cpp.qll | 1 - cpp/ql/lib/semmle/code/cpp/Location.qll | 25 -------- cpp/ql/lib/semmle/code/cpp/Member.qll | 6 -- .../lib/semmle/code/cpp/TemplateParameter.qll | 7 --- .../semmle/code/cpp/internal/ResolveClass.qll | 57 ------------------- 7 files changed, 2 insertions(+), 164 deletions(-) delete mode 100644 cpp/ql/lib/semmle/code/cpp/Member.qll diff --git a/cpp/ql/lib/DefaultOptions.qll b/cpp/ql/lib/DefaultOptions.qll index e4aa8d1f2d7..e6631f1307a 100644 --- a/cpp/ql/lib/DefaultOptions.qll +++ b/cpp/ql/lib/DefaultOptions.qll @@ -30,8 +30,6 @@ class Options extends string { predicate overrideReturnsNull(Call call) { // Used in CVS: call.(FunctionCall).getTarget().hasGlobalName("Xstrdup") - or - CustomOptions::overrideReturnsNull(call) // old Options.qll } /** @@ -45,8 +43,6 @@ class Options extends string { // Used in CVS: call.(FunctionCall).getTarget().hasGlobalName("Xstrdup") and nullValue(call.getArgument(0)) - or - CustomOptions::returnsNull(call) // old Options.qll } /** @@ -65,8 +61,6 @@ class Options extends string { f.hasGlobalOrStdName([ "exit", "_exit", "_Exit", "abort", "__assert_fail", "longjmp", "__builtin_unreachable" ]) - or - CustomOptions::exits(f) // old Options.qll } /** @@ -79,8 +73,7 @@ class Options extends string { * runtime, the program's behavior is undefined) */ predicate exprExits(Expr e) { - e.(AssumeExpr).getChild(0).(CompileTimeConstantInt).getIntValue() = 0 or - CustomOptions::exprExits(e) // old Options.qll + e.(AssumeExpr).getChild(0).(CompileTimeConstantInt).getIntValue() = 0 } /** @@ -88,10 +81,7 @@ class Options extends string { * * By default holds only for `fgets`. */ - predicate alwaysCheckReturnValue(Function f) { - f.hasGlobalOrStdName("fgets") or - CustomOptions::alwaysCheckReturnValue(f) // old Options.qll - } + predicate alwaysCheckReturnValue(Function f) { f.hasGlobalOrStdName("fgets") } /** * Holds if it is reasonable to ignore the return value of function @@ -107,8 +97,6 @@ class Options extends string { // common way of sleeping using select: fc.getTarget().hasGlobalName("select") and fc.getArgument(0).getValue() = "0" - or - CustomOptions::okToIgnoreReturnValue(fc) // old Options.qll } } diff --git a/cpp/ql/lib/Options.qll b/cpp/ql/lib/Options.qll index c4652e3f6ca..fb2f24119db 100644 --- a/cpp/ql/lib/Options.qll +++ b/cpp/ql/lib/Options.qll @@ -98,57 +98,3 @@ class CustomMutexType extends MutexType { */ override predicate unlockAccess(FunctionCall fc, Expr arg) { none() } } - -/** - * DEPRECATED: customize `CustomOptions.overrideReturnsNull` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate overrideReturnsNull(Call call) { none() } - -/** - * DEPRECATED: customize `CustomOptions.returnsNull` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate returnsNull(Call call) { none() } - -/** - * DEPRECATED: customize `CustomOptions.exits` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate exits(Function f) { none() } - -/** - * DEPRECATED: customize `CustomOptions.exprExits` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate exprExits(Expr e) { none() } - -/** - * DEPRECATED: customize `CustomOptions.alwaysCheckReturnValue` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate alwaysCheckReturnValue(Function f) { none() } - -/** - * DEPRECATED: customize `CustomOptions.okToIgnoreReturnValue` instead. - * - * This predicate is required to support backwards compatibility for - * older `Options.qll` files. It should not be removed or modified by - * end users. - */ -predicate okToIgnoreReturnValue(FunctionCall fc) { none() } diff --git a/cpp/ql/lib/cpp.qll b/cpp/ql/lib/cpp.qll index 560a4444bfa..9cc9f7eb1ef 100644 --- a/cpp/ql/lib/cpp.qll +++ b/cpp/ql/lib/cpp.qll @@ -32,7 +32,6 @@ import semmle.code.cpp.Class import semmle.code.cpp.Struct import semmle.code.cpp.Union import semmle.code.cpp.Enum -import semmle.code.cpp.Member import semmle.code.cpp.Field import semmle.code.cpp.Function import semmle.code.cpp.MemberFunction diff --git a/cpp/ql/lib/semmle/code/cpp/Location.qll b/cpp/ql/lib/semmle/code/cpp/Location.qll index 8b0a78f91aa..92668206a9f 100644 --- a/cpp/ql/lib/semmle/code/cpp/Location.qll +++ b/cpp/ql/lib/semmle/code/cpp/Location.qll @@ -148,28 +148,3 @@ class UnknownLocation extends Location { this.getFile().getAbsolutePath() = "" and locations_default(this, _, 0, 0, 0, 0) } } - -/** - * A dummy location which is used when something doesn't have a location in - * the source code but needs to have a `Location` associated with it. - * - * DEPRECATED: use `UnknownLocation` - */ -deprecated class UnknownDefaultLocation extends UnknownLocation { } - -/** - * A dummy location which is used when an expression doesn't have a - * location in the source code but needs to have a `Location` associated - * with it. - * - * DEPRECATED: use `UnknownLocation` - */ -deprecated class UnknownExprLocation extends UnknownLocation { } - -/** - * A dummy location which is used when a statement doesn't have a location - * in the source code but needs to have a `Location` associated with it. - * - * DEPRECATED: use `UnknownLocation` - */ -deprecated class UnknownStmtLocation extends UnknownLocation { } diff --git a/cpp/ql/lib/semmle/code/cpp/Member.qll b/cpp/ql/lib/semmle/code/cpp/Member.qll deleted file mode 100644 index f47edbddeba..00000000000 --- a/cpp/ql/lib/semmle/code/cpp/Member.qll +++ /dev/null @@ -1,6 +0,0 @@ -/** - * DEPRECATED: import `semmle.code.cpp.Element` and/or `semmle.code.cpp.Type` directly as required. - */ - -import semmle.code.cpp.Element -import semmle.code.cpp.Type diff --git a/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll b/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll index 6ece9cb82a4..e95b5b07073 100644 --- a/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll +++ b/cpp/ql/lib/semmle/code/cpp/TemplateParameter.qll @@ -35,13 +35,6 @@ class NonTypeTemplateParameter extends Literal, TemplateParameterImpl { override string getAPrimaryQlClass() { result = "NonTypeTemplateParameter" } } -/** - * A C++ `typename` (or `class`) template parameter. - * - * DEPRECATED: Use `TypeTemplateParameter` instead. - */ -deprecated class TemplateParameter = TypeTemplateParameter; - /** * A C++ `typename` (or `class`) template parameter. * diff --git a/cpp/ql/lib/semmle/code/cpp/internal/ResolveClass.qll b/cpp/ql/lib/semmle/code/cpp/internal/ResolveClass.qll index 9b2acc05e9e..52c9aba7a86 100644 --- a/cpp/ql/lib/semmle/code/cpp/internal/ResolveClass.qll +++ b/cpp/ql/lib/semmle/code/cpp/internal/ResolveClass.qll @@ -1,59 +1,5 @@ import semmle.code.cpp.Type -/** For upgraded databases without mangled name info. */ -pragma[noinline] -private string getTopLevelClassName(@usertype c) { - not mangled_name(_, _, _) and - isClass(c) and - usertypes(c, result, _) and - not namespacembrs(_, c) and // not in a namespace - not member(_, _, c) and // not in some structure - not class_instantiation(c, _) // not a template instantiation -} - -/** - * For upgraded databases without mangled name info. - * Holds if `d` is a unique complete class named `name`. - */ -pragma[noinline] -private predicate existsCompleteWithName(string name, @usertype d) { - not mangled_name(_, _, _) and - is_complete(d) and - name = getTopLevelClassName(d) and - onlyOneCompleteClassExistsWithName(name) -} - -/** For upgraded databases without mangled name info. */ -pragma[noinline] -private predicate onlyOneCompleteClassExistsWithName(string name) { - not mangled_name(_, _, _) and - strictcount(@usertype c | is_complete(c) and getTopLevelClassName(c) = name) = 1 -} - -/** - * For upgraded databases without mangled name info. - * Holds if `c` is an incomplete class named `name`. - */ -pragma[noinline] -private predicate existsIncompleteWithName(string name, @usertype c) { - not mangled_name(_, _, _) and - not is_complete(c) and - name = getTopLevelClassName(c) -} - -/** - * For upgraded databases without mangled name info. - * Holds if `c` is an incomplete class, and there exists a unique complete class `d` - * with the same name. - */ -private predicate oldHasCompleteTwin(@usertype c, @usertype d) { - not mangled_name(_, _, _) and - exists(string name | - existsIncompleteWithName(name, c) and - existsCompleteWithName(name, d) - ) -} - pragma[noinline] private @mangledname getClassMangledName(@usertype c) { isClass(c) and @@ -103,10 +49,7 @@ private module Cached { @usertype resolveClass(@usertype c) { hasCompleteTwin(c, result) or - oldHasCompleteTwin(c, result) - or not hasCompleteTwin(c, _) and - not oldHasCompleteTwin(c, _) and result = c } From 3aa69823afcdd014650c3329ad76a2bf08e6bc00 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 26 May 2026 15:13:20 +0200 Subject: [PATCH 55/85] Ruby: Skip BodyStmt in ErbDirective.getAChildStmt. --- ruby/ql/lib/codeql/ruby/ast/Erb.qll | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ruby/ql/lib/codeql/ruby/ast/Erb.qll b/ruby/ql/lib/codeql/ruby/ast/Erb.qll index 4def19f7ceb..93d7d6f5e08 100644 --- a/ruby/ql/lib/codeql/ruby/ast/Erb.qll +++ b/ruby/ql/lib/codeql/ruby/ast/Erb.qll @@ -156,14 +156,23 @@ class ErbDirective extends TDirectiveNode, ErbAstNode { ) } + pragma[nomagic] + private Stmt getAChildStmt0() { + this.containsAstNodeStart(result) and + not this.containsAstNodeStart(result.getParent()) + } + /** * Gets a statement that starts in directive that is not a child of any other * statement starting in this directive. */ cached Stmt getAChildStmt() { + result = this.getAChildStmt0() and + not result instanceof BodyStmt + or this.containsAstNodeStart(result) and - not this.containsAstNodeStart(result.getParent()) + result = this.getAChildStmt0().(BodyStmt).getAStmt() } /** From 780591d42a67f6c30f1882fe36c54a6636dde2b3 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 26 May 2026 15:15:00 +0200 Subject: [PATCH 56/85] Ruby: Remove spurious parent-child edges for Ruby::SimpleSymbol. These treesitter nodes translate to multiple AstNodes, but we only want those that are Stmts. --- ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll b/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll index 072f453826c..9d2dd16ea63 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/Synthesis.qll @@ -1974,9 +1974,12 @@ private module CallableBodySynthesis { i = 0 and child = SynthChild(BodyStmtKind()) or - parent = TBodyStmtSynth(m, 0) and - i = 0 and - child = childRef(fromGenerated(body)) + exists(Stmt bodyStmt | + parent = TBodyStmtSynth(m, 0) and + i = 0 and + bodyStmt = fromGenerated(body) and + child = childRef(bodyStmt) + ) ) } From 35364a087a6a9ff89319fbe6c2d894837b1e8e5c Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 27 May 2026 10:23:16 +0200 Subject: [PATCH 57/85] C++: Update expected test results after extractor changes --- .../test/library-tests/friends/loop/friends.expected | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/ql/test/library-tests/friends/loop/friends.expected b/cpp/ql/test/library-tests/friends/loop/friends.expected index a59c1f0c65c..50030ed70bc 100644 --- a/cpp/ql/test/library-tests/friends/loop/friends.expected +++ b/cpp/ql/test/library-tests/friends/loop/friends.expected @@ -1,14 +1,14 @@ -| file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:26 | E | | file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:26 | E | -| file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:26 | F | +| file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:29 | E | | file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:26 | F | -| file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:26 | E | +| file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:29 | F | | file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:26 | E | -| file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:26 | F | +| file://:0:0:0:0 | E's friend | loop.cpp:5:26:5:29 | E | | file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:26 | F | -| file://:0:0:0:0 | F's friend | loop.cpp:5:26:5:26 | E | -| file://:0:0:0:0 | F's friend | loop.cpp:5:26:5:26 | E | +| file://:0:0:0:0 | E's friend | loop.cpp:10:26:10:29 | F | | file://:0:0:0:0 | F's friend | loop.cpp:5:26:5:26 | E | +| file://:0:0:0:0 | F's friend | loop.cpp:5:26:5:29 | E | +| file://:0:0:0:0 | F's friend | loop.cpp:5:26:5:29 | E | | loop.cpp:6:5:6:5 | E's friend | loop.cpp:5:26:5:26 | E | | loop.cpp:7:5:7:5 | E's friend | loop.cpp:7:36:7:36 | F | | loop.cpp:11:5:11:5 | F's friend | loop.cpp:11:36:11:36 | E | From 362c48cc6d8e442a147da4680414af12099d15ad Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 27 May 2026 10:44:44 +0200 Subject: [PATCH 58/85] C++: Add change note --- .../change-notes/2026-05-27-deprecated-removal.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md diff --git a/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md b/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md new file mode 100644 index 00000000000..65c42916fb2 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md @@ -0,0 +1,15 @@ +--- +category: breaking +--- +* Removed the deprecated `overrideReturnsNull` predicate from `Options.qll`. Use `CustomOptions.overrideReturnsNull` instead. +* Removed the deprecated `returnsNull` predicate from `Options.qll`. Use `CustomOptions.returnsNull` instead. +* Removed the deprecated `exits` predicate from `Options.qll`. Use `CustomOptions.exist` instead. +* Removed the deprecated `exprExits` predicate from `Options.qll`. Use `CustomOptions.exprExits` instead. +* Removed the deprecated `alwaysCheckReturnValue` predicate from `Options.qll`. Use `CustomOptions.alwaysCheckReturnValue` instead. +* Removed the deprecated `okToIgnoreReturnValue` predicate from `Options.qll`. Use `CustomOptions.okToIgnoreReturnValue` instead. +* Removed the deprecated `semmle.code.cpp.Member`. Import `semmle.code.cpp.Element` and/or `semmle.code.cpp.Type` directly. +* Removed the deprecated `UnknownDefaultLocation` class. Use `UnknownLocation` instead. +* Removed the deprecated `UnknownExprLocation` class. Use `UnknownLocation` instead. +* Removed the deprecated `UnknownStmtLocation` class. Use `UnknownLocation` instead. +* Removed the deprecated `TemplateParameter` class. Use `TypeTemplateParameter` instead. +* Support for class resolution across link targets has been removed for databases which were created with CodeQL versions before 1.23.0. From e66b1e4beb2654770cbec9fa303cec807dd729b2 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema <93738568+jketema@users.noreply.github.com> Date: Wed, 27 May 2026 10:58:05 +0200 Subject: [PATCH 59/85] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md b/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md index 65c42916fb2..33ad83230d4 100644 --- a/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md +++ b/cpp/ql/lib/change-notes/2026-05-27-deprecated-removal.md @@ -3,7 +3,7 @@ category: breaking --- * Removed the deprecated `overrideReturnsNull` predicate from `Options.qll`. Use `CustomOptions.overrideReturnsNull` instead. * Removed the deprecated `returnsNull` predicate from `Options.qll`. Use `CustomOptions.returnsNull` instead. -* Removed the deprecated `exits` predicate from `Options.qll`. Use `CustomOptions.exist` instead. +* Removed the deprecated `exits` predicate from `Options.qll`. Use `CustomOptions.exits` instead. * Removed the deprecated `exprExits` predicate from `Options.qll`. Use `CustomOptions.exprExits` instead. * Removed the deprecated `alwaysCheckReturnValue` predicate from `Options.qll`. Use `CustomOptions.alwaysCheckReturnValue` instead. * Removed the deprecated `okToIgnoreReturnValue` predicate from `Options.qll`. Use `CustomOptions.okToIgnoreReturnValue` instead. From b44bca9ea72456d4883e349d728ba96c6360a3cd Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 19 May 2026 16:50:24 +0100 Subject: [PATCH 60/85] Swift: Add HashFunction protocol and other realism to the CryptoKit test stubs (this is needed for new cases to work as intended). --- .../CWE-328/WeakPasswordHashing.expected | 50 ++---- .../CWE-328/WeakSensitiveDataHashing.expected | 54 ++----- .../Security/CWE-328/testCryptoKit.swift | 147 ++++++++++-------- 3 files changed, 105 insertions(+), 146 deletions(-) diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index f8db62cedbc..9db9a5f4a1c 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -1,27 +1,10 @@ edges -| testCryptoKit.swift:199:38:199:38 | passwordString | testCryptoKit.swift:199:38:199:53 | .utf8 | provenance | | -| testCryptoKit.swift:199:38:199:53 | .utf8 | testCryptoKit.swift:199:33:199:57 | call to Data.init(_:) | provenance | | nodes -| testCryptoKit.swift:65:47:65:47 | passwd | semmle.label | passwd | -| testCryptoKit.swift:71:36:71:36 | passwd | semmle.label | passwd | -| testCryptoKit.swift:77:44:77:44 | passwd | semmle.label | passwd | -| testCryptoKit.swift:83:37:83:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:89:37:89:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:95:37:95:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:104:23:104:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:113:23:113:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:122:23:122:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:131:23:131:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:140:23:140:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:149:32:149:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:158:32:158:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:167:32:167:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:176:32:176:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:185:32:185:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:195:49:195:49 | passwordData | semmle.label | passwordData | -| testCryptoKit.swift:199:33:199:57 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:199:38:199:38 | passwordString | semmle.label | passwordString | -| testCryptoKit.swift:199:38:199:53 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:168:32:168:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:177:32:177:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:186:32:186:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:195:32:195:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:204:32:204:32 | passwd | semmle.label | passwd | | testCryptoSwift.swift:154:30:154:30 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:157:31:157:31 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:160:47:160:47 | passwdArray | semmle.label | passwdArray | @@ -48,24 +31,11 @@ nodes | testCryptoSwift.swift:231:9:231:9 | passwd | semmle.label | passwd | subpaths #select -| testCryptoKit.swift:65:47:65:47 | passwd | testCryptoKit.swift:65:47:65:47 | passwd | testCryptoKit.swift:65:47:65:47 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:65:47:65:47 | passwd | password (passwd) | -| testCryptoKit.swift:71:36:71:36 | passwd | testCryptoKit.swift:71:36:71:36 | passwd | testCryptoKit.swift:71:36:71:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:71:36:71:36 | passwd | password (passwd) | -| testCryptoKit.swift:77:44:77:44 | passwd | testCryptoKit.swift:77:44:77:44 | passwd | testCryptoKit.swift:77:44:77:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:77:44:77:44 | passwd | password (passwd) | -| testCryptoKit.swift:83:37:83:37 | passwd | testCryptoKit.swift:83:37:83:37 | passwd | testCryptoKit.swift:83:37:83:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:83:37:83:37 | passwd | password (passwd) | -| testCryptoKit.swift:89:37:89:37 | passwd | testCryptoKit.swift:89:37:89:37 | passwd | testCryptoKit.swift:89:37:89:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:89:37:89:37 | passwd | password (passwd) | -| testCryptoKit.swift:95:37:95:37 | passwd | testCryptoKit.swift:95:37:95:37 | passwd | testCryptoKit.swift:95:37:95:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:95:37:95:37 | passwd | password (passwd) | -| testCryptoKit.swift:104:23:104:23 | passwd | testCryptoKit.swift:104:23:104:23 | passwd | testCryptoKit.swift:104:23:104:23 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:104:23:104:23 | passwd | password (passwd) | -| testCryptoKit.swift:113:23:113:23 | passwd | testCryptoKit.swift:113:23:113:23 | passwd | testCryptoKit.swift:113:23:113:23 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:113:23:113:23 | passwd | password (passwd) | -| testCryptoKit.swift:122:23:122:23 | passwd | testCryptoKit.swift:122:23:122:23 | passwd | testCryptoKit.swift:122:23:122:23 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:122:23:122:23 | passwd | password (passwd) | -| testCryptoKit.swift:131:23:131:23 | passwd | testCryptoKit.swift:131:23:131:23 | passwd | testCryptoKit.swift:131:23:131:23 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:131:23:131:23 | passwd | password (passwd) | -| testCryptoKit.swift:140:23:140:23 | passwd | testCryptoKit.swift:140:23:140:23 | passwd | testCryptoKit.swift:140:23:140:23 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:140:23:140:23 | passwd | password (passwd) | -| testCryptoKit.swift:149:32:149:32 | passwd | testCryptoKit.swift:149:32:149:32 | passwd | testCryptoKit.swift:149:32:149:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:149:32:149:32 | passwd | password (passwd) | -| testCryptoKit.swift:158:32:158:32 | passwd | testCryptoKit.swift:158:32:158:32 | passwd | testCryptoKit.swift:158:32:158:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:158:32:158:32 | passwd | password (passwd) | -| testCryptoKit.swift:167:32:167:32 | passwd | testCryptoKit.swift:167:32:167:32 | passwd | testCryptoKit.swift:167:32:167:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:167:32:167:32 | passwd | password (passwd) | -| testCryptoKit.swift:176:32:176:32 | passwd | testCryptoKit.swift:176:32:176:32 | passwd | testCryptoKit.swift:176:32:176:32 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:176:32:176:32 | passwd | password (passwd) | -| testCryptoKit.swift:185:32:185:32 | passwd | testCryptoKit.swift:185:32:185:32 | passwd | testCryptoKit.swift:185:32:185:32 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:185:32:185:32 | passwd | password (passwd) | -| testCryptoKit.swift:195:49:195:49 | passwordData | testCryptoKit.swift:195:49:195:49 | passwordData | testCryptoKit.swift:195:49:195:49 | passwordData | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:195:49:195:49 | passwordData | password (passwordData) | -| testCryptoKit.swift:199:33:199:57 | call to Data.init(_:) | testCryptoKit.swift:199:38:199:38 | passwordString | testCryptoKit.swift:199:33:199:57 | call to Data.init(_:) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:199:38:199:38 | passwordString | password (passwordString) | +| testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:32:168:32 | passwd | password (passwd) | +| testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:32 | passwd | password (passwd) | +| testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:186:32:186:32 | passwd | password (passwd) | +| testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:195:32:195:32 | passwd | password (passwd) | +| testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:204:32:204:32 | passwd | password (passwd) | | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:154:30:154:30 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:157:31:157:31 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:160:47:160:47 | passwdArray | password (passwdArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected index 5da99db8068..d48bbbf4dfa 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected @@ -1,26 +1,11 @@ edges nodes -| testCryptoKit.swift:66:43:66:43 | cert | semmle.label | cert | -| testCryptoKit.swift:68:43:68:43 | account_no | semmle.label | account_no | -| testCryptoKit.swift:69:43:69:43 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:72:36:72:36 | cert | semmle.label | cert | -| testCryptoKit.swift:74:36:74:36 | account_no | semmle.label | account_no | -| testCryptoKit.swift:75:36:75:36 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:78:44:78:44 | cert | semmle.label | cert | -| testCryptoKit.swift:80:44:80:44 | account_no | semmle.label | account_no | -| testCryptoKit.swift:81:44:81:44 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:105:23:105:23 | cert | semmle.label | cert | -| testCryptoKit.swift:107:23:107:23 | account_no | semmle.label | account_no | -| testCryptoKit.swift:108:23:108:23 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:114:23:114:23 | cert | semmle.label | cert | -| testCryptoKit.swift:116:23:116:23 | account_no | semmle.label | account_no | -| testCryptoKit.swift:117:23:117:23 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:150:32:150:32 | cert | semmle.label | cert | -| testCryptoKit.swift:152:32:152:32 | account_no | semmle.label | account_no | -| testCryptoKit.swift:153:32:153:32 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:159:32:159:32 | cert | semmle.label | cert | -| testCryptoKit.swift:161:32:161:32 | account_no | semmle.label | account_no | -| testCryptoKit.swift:162:32:162:32 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:169:32:169:32 | cert | semmle.label | cert | +| testCryptoKit.swift:171:32:171:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:172:32:172:32 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:178:32:178:32 | cert | semmle.label | cert | +| testCryptoKit.swift:180:32:180:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:181:32:181:32 | credit_card_no | semmle.label | credit_card_no | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | semmle.label | phoneNumberArray | @@ -33,27 +18,12 @@ nodes | testCryptoSwift.swift:221:9:221:9 | creditCardNumber | semmle.label | creditCardNumber | subpaths #select -| testCryptoKit.swift:66:43:66:43 | cert | testCryptoKit.swift:66:43:66:43 | cert | testCryptoKit.swift:66:43:66:43 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:66:43:66:43 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:68:43:68:43 | account_no | testCryptoKit.swift:68:43:68:43 | account_no | testCryptoKit.swift:68:43:68:43 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:68:43:68:43 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:69:43:69:43 | credit_card_no | testCryptoKit.swift:69:43:69:43 | credit_card_no | testCryptoKit.swift:69:43:69:43 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:69:43:69:43 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:72:36:72:36 | cert | testCryptoKit.swift:72:36:72:36 | cert | testCryptoKit.swift:72:36:72:36 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:72:36:72:36 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:74:36:74:36 | account_no | testCryptoKit.swift:74:36:74:36 | account_no | testCryptoKit.swift:74:36:74:36 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:74:36:74:36 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:75:36:75:36 | credit_card_no | testCryptoKit.swift:75:36:75:36 | credit_card_no | testCryptoKit.swift:75:36:75:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:75:36:75:36 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:78:44:78:44 | cert | testCryptoKit.swift:78:44:78:44 | cert | testCryptoKit.swift:78:44:78:44 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:78:44:78:44 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:80:44:80:44 | account_no | testCryptoKit.swift:80:44:80:44 | account_no | testCryptoKit.swift:80:44:80:44 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:80:44:80:44 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:81:44:81:44 | credit_card_no | testCryptoKit.swift:81:44:81:44 | credit_card_no | testCryptoKit.swift:81:44:81:44 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:81:44:81:44 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:105:23:105:23 | cert | testCryptoKit.swift:105:23:105:23 | cert | testCryptoKit.swift:105:23:105:23 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:105:23:105:23 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:107:23:107:23 | account_no | testCryptoKit.swift:107:23:107:23 | account_no | testCryptoKit.swift:107:23:107:23 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:107:23:107:23 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:108:23:108:23 | credit_card_no | testCryptoKit.swift:108:23:108:23 | credit_card_no | testCryptoKit.swift:108:23:108:23 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:108:23:108:23 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:114:23:114:23 | cert | testCryptoKit.swift:114:23:114:23 | cert | testCryptoKit.swift:114:23:114:23 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:114:23:114:23 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:116:23:116:23 | account_no | testCryptoKit.swift:116:23:116:23 | account_no | testCryptoKit.swift:116:23:116:23 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:116:23:116:23 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:117:23:117:23 | credit_card_no | testCryptoKit.swift:117:23:117:23 | credit_card_no | testCryptoKit.swift:117:23:117:23 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:117:23:117:23 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:150:32:150:32 | cert | testCryptoKit.swift:150:32:150:32 | cert | testCryptoKit.swift:150:32:150:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:150:32:150:32 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:152:32:152:32 | account_no | testCryptoKit.swift:152:32:152:32 | account_no | testCryptoKit.swift:152:32:152:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:152:32:152:32 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:153:32:153:32 | credit_card_no | testCryptoKit.swift:153:32:153:32 | credit_card_no | testCryptoKit.swift:153:32:153:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:153:32:153:32 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:159:32:159:32 | cert | testCryptoKit.swift:159:32:159:32 | cert | testCryptoKit.swift:159:32:159:32 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:159:32:159:32 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:161:32:161:32 | account_no | testCryptoKit.swift:161:32:161:32 | account_no | testCryptoKit.swift:161:32:161:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:161:32:161:32 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:162:32:162:32 | credit_card_no | testCryptoKit.swift:162:32:162:32 | credit_card_no | testCryptoKit.swift:162:32:162:32 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:162:32:162:32 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:169:32:169:32 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:171:32:171:32 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:172:32:172:32 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:178:32:178:32 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:180:32:180:32 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:181:32:181:32 | credit_card_no | sensitive data (private information credit_card_no) | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | sensitive data (private information phoneNumberArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index 755bd27e3c7..e3f5ffc702f 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -7,92 +7,111 @@ class Data init(_ elements: S) {} } -struct SHA256 { - static func hash(data: D) -> [UInt8] { - return [] - } +public protocol HashFunction { + associatedtype Digest - func update(data: D) {} - func update(bufferPointer: UnsafeRawBufferPointer) {} - func finalize() -> [UInt8] { return [] } + init() + mutating func update(bufferPointer: UnsafeRawBufferPointer) + func finalize() -> Digest } -struct SHA384 { - static func hash(data: D) -> [UInt8] { - return [] +extension HashFunction { + @inlinable + public static func hash(bufferPointer: UnsafeRawBufferPointer) -> Digest { + var hasher = Self() + hasher.update(bufferPointer: bufferPointer) + return hasher.finalize() } - func update(data: D) {} - func update(bufferPointer: UnsafeRawBufferPointer) {} - func finalize() -> [UInt8] { return [] } -} - -struct SHA512 { - static func hash(data: D) -> [UInt8] { - return [] + @inlinable + public static func hash(data: D) -> Self.Digest { + var hasher = Self() + hasher.update(data: data) + return hasher.finalize() } - func update(data: D) {} - func update(bufferPointer: UnsafeRawBufferPointer) {} - func finalize() -> [UInt8] { return [] } + @inlinable + public mutating func update(data: D) { + // ... + } } +public struct SHA256: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} + +public struct SHA384: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} + +public struct SHA512: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} enum Insecure { - struct MD5 { - static func hash(data: D) -> [UInt8] { - return [] - } + public struct MD5: HashFunction { + public typealias Digest = [UInt8] - func update(data: D) {} - func update(bufferPointer: UnsafeRawBufferPointer) {} - func finalize() -> [UInt8] { return [] } + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } } - struct SHA1 { - static func hash(data: D) -> [UInt8] { - return [] - } - func update(data: D) {} - func update(bufferPointer: UnsafeRawBufferPointer) {} - func finalize() -> [UInt8] { return [] } + public struct SHA1: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } } } // --- tests --- func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { - var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD - hash = Crypto.Insecure.MD5.hash(data: cert) // BAD + var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD [NOT DETECTED] + hash = Crypto.Insecure.MD5.hash(data: cert) // BAD [NOT DETECTED] hash = Crypto.Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD - hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD + hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD [NOT DETECTED] + hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD [NOT DETECTED] - hash = Insecure.MD5.hash(data: passwd) // BAD - hash = Insecure.MD5.hash(data: cert) // BAD + hash = Insecure.MD5.hash(data: passwd) // BAD [NOT DETECTED] + hash = Insecure.MD5.hash(data: cert) // BAD [NOT DETECTED] hash = Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Insecure.MD5.hash(data: account_no) // BAD - hash = Insecure.MD5.hash(data: credit_card_no) // BAD + hash = Insecure.MD5.hash(data: account_no) // BAD [NOT DETECTED] + hash = Insecure.MD5.hash(data: credit_card_no) // BAD [NOT DETECTED] - hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD - hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD + hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD [NOT DETECTED] + hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD [NOT DETECTED] hash = Crypto.Insecure.SHA1.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD - hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD + hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD [NOT DETECTED] + hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD [NOT DETECTED] - hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA256.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA256.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: credit_card_no) // GOOD, computationally expensive hash not required - hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA384.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA384.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: credit_card_no) // GOOD, computationally expensive hash not required - hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA512.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA512.hash(data: account_no) // GOOD, computationally expensive hash not required @@ -101,25 +120,25 @@ func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_pa func testMD5UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.MD5() - hash.update(data: passwd) // BAD - hash.update(data: cert) // BAD + hash.update(data: passwd) // BAD [NOT DETECTED] + hash.update(data: cert) // BAD [NOT DETECTED] hash.update(data: encrypted_passwd) // GOOD (not sensitive) - hash.update(data: account_no) // BAD - hash.update(data: credit_card_no) // BAD + hash.update(data: account_no) // BAD [NOT DETECTED] + hash.update(data: credit_card_no) // BAD [NOT DETECTED] } func testSHA1UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.SHA1() - hash.update(data: passwd) // BAD - hash.update(data: cert) // BAD + hash.update(data: passwd) // BAD [NOT DETECTED] + hash.update(data: cert) // BAD [NOT DETECTED] hash.update(data: encrypted_passwd) // GOOD (not sensitive) - hash.update(data: account_no) // BAD - hash.update(data: credit_card_no) // BAD + hash.update(data: account_no) // BAD [NOT DETECTED] + hash.update(data: credit_card_no) // BAD [NOT DETECTED] } func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA256() - hash.update(data: passwd) // BAD, not a computationally expensive hash + hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD @@ -128,7 +147,7 @@ func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd : func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA384() - hash.update(data: passwd) // BAD, not a computationally expensive hash + hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD @@ -137,7 +156,7 @@ func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd : func testSHA512UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA512() - hash.update(data: passwd) // BAD, not a computationally expensive hash + hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD @@ -189,14 +208,14 @@ func testSHA512UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, hash.update(bufferPointer: credit_card_no) // GOOD } -func tesBadExample(passwordString: String) { +func testBadExample(passwordString: String) { // this is the "bad" example from the .qhelp let passwordData = Data(passwordString.utf8) - let passwordHash = Crypto.SHA512.hash(data: passwordData) // BAD, not a computationally expensive hash + let passwordHash = Crypto.SHA512.hash(data: passwordData) // BAD, not a computationally expensive hash [NOT DETECTED] // ... - if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { // BAD, not a computationally expensive hash + if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { // BAD, not a computationally expensive hash [NOT DETECTED] // ... } } From d9c0b9ca31a73e76916820078d45f85e007ce969 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 26 May 2026 17:14:11 +0100 Subject: [PATCH 61/85] Swift: Additional test cases for CryptoKit. --- .../Security/CWE-328/testCryptoKit.swift | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index e3f5ffc702f..06ce0bd42d3 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -219,3 +219,36 @@ func testBadExample(passwordString: String) { // ... } } + +func testWithFlowAndMetatypes(cardNumber: String) { + let value1 = Data(cardNumber.utf8); + let _digest1 = Insecure.MD5.hash(data: value1); // BAD [NOT DETECTED] + + let value2 = Data(cardNumber.utf8); + let hasher2 = Insecure.MD5.self; // metatype + let _digest2 = hasher2.hash(data: value2); // BAD [NOT DETECTED] + + let value3 = Data(cardNumber.utf8); + let _digest3 = (Insecure.MD5.self).hash(data: value3); // BAD [NOT DETECTED] + + let value4 = Data(cardNumber.utf8); + testReceiver1(value: value4); + + let value5 = Data(cardNumber.utf8); + testReceiver2(hasher: Insecure.MD5.self, value: value5); + + let value6 = Data(cardNumber.utf8); + testReceiver3(hasher: Insecure.MD5.self, value: value6); +} + +func testReceiver1(value: Data) { + let _digest = Insecure.MD5.hash(data: value); // BAD [NOT DETECTED] +} + +func testReceiver2(hasher: Insecure.MD5.Type, value: Data) { + let _digest = hasher.hash(data: value); // BAD [NOT DETECTED] +} + +func testReceiver3(hasher: H.Type, value: Data) { + let _digest = hasher.hash(data: value); // BAD [NOT DETECTED] +} From 98b7659cc175f973b06cdf64555081179f79b1b8 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 20 May 2026 15:37:41 +0100 Subject: [PATCH 62/85] Swift: Add a special case sink for weak sensitive data hashing sinks that are calls through a metatype. --- .../WeakSensitiveDataHashingExtensions.qll | 18 +++++ .../CWE-328/WeakPasswordHashing.expected | 6 ++ .../CWE-328/WeakSensitiveDataHashing.expected | 66 +++++++++++++++++++ .../Security/CWE-328/testCryptoKit.swift | 34 +++++----- 4 files changed, 107 insertions(+), 17 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index 5f0cc9d756a..a8c76879cb6 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -76,3 +76,21 @@ private class DefaultWeakSenitiveDataHashingSink extends WeakSensitiveDataHashin override string getAlgorithm() { result = algorithm } } + +/** + * A sink for weak sensitive data hashing through a call with a metatype qualifier. + */ +private class WeakSenitiveDataHashingMetatypeSink extends WeakSensitiveDataHashingSink { + string algorithm; + + WeakSenitiveDataHashingMetatypeSink() { + exists(CallExpr c | + c.getAnArgument().getExpr() = this.asExpr() and + algorithm = ["MD5", "SHA1"] and + c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ".Type" and + c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] + ) + } + + override string getAlgorithm() { result = algorithm } +} diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index 9db9a5f4a1c..be78d099011 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -1,5 +1,8 @@ edges nodes +| testCryptoKit.swift:84:47:84:47 | passwd | semmle.label | passwd | +| testCryptoKit.swift:90:36:90:36 | passwd | semmle.label | passwd | +| testCryptoKit.swift:96:44:96:44 | passwd | semmle.label | passwd | | testCryptoKit.swift:168:32:168:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:177:32:177:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:186:32:186:32 | passwd | semmle.label | passwd | @@ -31,6 +34,9 @@ nodes | testCryptoSwift.swift:231:9:231:9 | passwd | semmle.label | passwd | subpaths #select +| testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:84:47:84:47 | passwd | password (passwd) | +| testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:90:36:90:36 | passwd | password (passwd) | +| testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:96:44:96:44 | passwd | password (passwd) | | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:32:168:32 | passwd | password (passwd) | | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:32 | passwd | password (passwd) | | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:186:32:186:32 | passwd | password (passwd) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected index d48bbbf4dfa..819b3e20aea 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected @@ -1,11 +1,63 @@ edges +| testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | testCryptoKit.swift:225:44:225:44 | value1 | provenance | | +| testCryptoKit.swift:224:23:224:23 | cardNumber | testCryptoKit.swift:224:23:224:34 | .utf8 | provenance | | +| testCryptoKit.swift:224:23:224:34 | .utf8 | testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | testCryptoKit.swift:229:39:229:39 | value2 | provenance | | +| testCryptoKit.swift:227:23:227:23 | cardNumber | testCryptoKit.swift:227:23:227:34 | .utf8 | provenance | | +| testCryptoKit.swift:227:23:227:34 | .utf8 | testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | testCryptoKit.swift:232:51:232:51 | value3 | provenance | | +| testCryptoKit.swift:231:23:231:23 | cardNumber | testCryptoKit.swift:231:23:231:34 | .utf8 | provenance | | +| testCryptoKit.swift:231:23:231:34 | .utf8 | testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | testCryptoKit.swift:235:26:235:26 | value4 | provenance | | +| testCryptoKit.swift:234:23:234:23 | cardNumber | testCryptoKit.swift:234:23:234:34 | .utf8 | provenance | | +| testCryptoKit.swift:234:23:234:34 | .utf8 | testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:235:26:235:26 | value4 | testCryptoKit.swift:244:20:244:27 | value | provenance | | +| testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | testCryptoKit.swift:238:53:238:53 | value5 | provenance | | +| testCryptoKit.swift:237:23:237:23 | cardNumber | testCryptoKit.swift:237:23:237:34 | .utf8 | provenance | | +| testCryptoKit.swift:237:23:237:34 | .utf8 | testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:238:53:238:53 | value5 | testCryptoKit.swift:248:47:248:54 | value | provenance | | +| testCryptoKit.swift:244:20:244:27 | value | testCryptoKit.swift:245:43:245:43 | value | provenance | | +| testCryptoKit.swift:248:47:248:54 | value | testCryptoKit.swift:249:37:249:37 | value | provenance | | nodes +| testCryptoKit.swift:85:43:85:43 | cert | semmle.label | cert | +| testCryptoKit.swift:87:43:87:43 | account_no | semmle.label | account_no | +| testCryptoKit.swift:88:43:88:43 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:91:36:91:36 | cert | semmle.label | cert | +| testCryptoKit.swift:93:36:93:36 | account_no | semmle.label | account_no | +| testCryptoKit.swift:94:36:94:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:97:44:97:44 | cert | semmle.label | cert | +| testCryptoKit.swift:99:44:99:44 | account_no | semmle.label | account_no | +| testCryptoKit.swift:100:44:100:44 | credit_card_no | semmle.label | credit_card_no | | testCryptoKit.swift:169:32:169:32 | cert | semmle.label | cert | | testCryptoKit.swift:171:32:171:32 | account_no | semmle.label | account_no | | testCryptoKit.swift:172:32:172:32 | credit_card_no | semmle.label | credit_card_no | | testCryptoKit.swift:178:32:178:32 | cert | semmle.label | cert | | testCryptoKit.swift:180:32:180:32 | account_no | semmle.label | account_no | | testCryptoKit.swift:181:32:181:32 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:224:23:224:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:224:23:224:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:225:44:225:44 | value1 | semmle.label | value1 | +| testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:227:23:227:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:227:23:227:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:229:39:229:39 | value2 | semmle.label | value2 | +| testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:231:23:231:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:231:23:231:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:232:51:232:51 | value3 | semmle.label | value3 | +| testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:234:23:234:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:234:23:234:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:235:26:235:26 | value4 | semmle.label | value4 | +| testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:237:23:237:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:237:23:237:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:238:53:238:53 | value5 | semmle.label | value5 | +| testCryptoKit.swift:244:20:244:27 | value | semmle.label | value | +| testCryptoKit.swift:245:43:245:43 | value | semmle.label | value | +| testCryptoKit.swift:248:47:248:54 | value | semmle.label | value | +| testCryptoKit.swift:249:37:249:37 | value | semmle.label | value | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | semmle.label | phoneNumberArray | @@ -18,12 +70,26 @@ nodes | testCryptoSwift.swift:221:9:221:9 | creditCardNumber | semmle.label | creditCardNumber | subpaths #select +| testCryptoKit.swift:85:43:85:43 | cert | testCryptoKit.swift:85:43:85:43 | cert | testCryptoKit.swift:85:43:85:43 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:85:43:85:43 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:87:43:87:43 | account_no | testCryptoKit.swift:87:43:87:43 | account_no | testCryptoKit.swift:87:43:87:43 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:87:43:87:43 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:88:43:88:43 | credit_card_no | testCryptoKit.swift:88:43:88:43 | credit_card_no | testCryptoKit.swift:88:43:88:43 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:88:43:88:43 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:91:36:91:36 | cert | testCryptoKit.swift:91:36:91:36 | cert | testCryptoKit.swift:91:36:91:36 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:91:36:91:36 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:93:36:93:36 | account_no | testCryptoKit.swift:93:36:93:36 | account_no | testCryptoKit.swift:93:36:93:36 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:93:36:93:36 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:94:36:94:36 | credit_card_no | testCryptoKit.swift:94:36:94:36 | credit_card_no | testCryptoKit.swift:94:36:94:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:94:36:94:36 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:97:44:97:44 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:99:44:99:44 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:100:44:100:44 | credit_card_no | sensitive data (private information credit_card_no) | | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:169:32:169:32 | cert | sensitive data (credential cert) | | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:171:32:171:32 | account_no | sensitive data (private information account_no) | | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:172:32:172:32 | credit_card_no | sensitive data (private information credit_card_no) | | testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:178:32:178:32 | cert | sensitive data (credential cert) | | testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:180:32:180:32 | account_no | sensitive data (private information account_no) | | testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:181:32:181:32 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:225:44:225:44 | value1 | testCryptoKit.swift:224:23:224:23 | cardNumber | testCryptoKit.swift:225:44:225:44 | value1 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:224:23:224:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:229:39:229:39 | value2 | testCryptoKit.swift:227:23:227:23 | cardNumber | testCryptoKit.swift:229:39:229:39 | value2 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:227:23:227:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:232:51:232:51 | value3 | testCryptoKit.swift:231:23:231:23 | cardNumber | testCryptoKit.swift:232:51:232:51 | value3 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:231:23:231:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:245:43:245:43 | value | testCryptoKit.swift:234:23:234:23 | cardNumber | testCryptoKit.swift:245:43:245:43 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:234:23:234:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:249:37:249:37 | value | testCryptoKit.swift:237:23:237:23 | cardNumber | testCryptoKit.swift:249:37:249:37 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:237:23:237:23 | cardNumber | sensitive data (private information cardNumber) | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | sensitive data (private information phoneNumberArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index 06ce0bd42d3..faf0f69ab12 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -81,23 +81,23 @@ enum Insecure { // --- tests --- func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { - var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD [NOT DETECTED] - hash = Crypto.Insecure.MD5.hash(data: cert) // BAD [NOT DETECTED] + var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD + hash = Crypto.Insecure.MD5.hash(data: cert) // BAD hash = Crypto.Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD [NOT DETECTED] - hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD [NOT DETECTED] + hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD + hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD - hash = Insecure.MD5.hash(data: passwd) // BAD [NOT DETECTED] - hash = Insecure.MD5.hash(data: cert) // BAD [NOT DETECTED] + hash = Insecure.MD5.hash(data: passwd) // BAD + hash = Insecure.MD5.hash(data: cert) // BAD hash = Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Insecure.MD5.hash(data: account_no) // BAD [NOT DETECTED] - hash = Insecure.MD5.hash(data: credit_card_no) // BAD [NOT DETECTED] + hash = Insecure.MD5.hash(data: account_no) // BAD + hash = Insecure.MD5.hash(data: credit_card_no) // BAD - hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD [NOT DETECTED] - hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD [NOT DETECTED] + hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD + hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD hash = Crypto.Insecure.SHA1.hash(data: encrypted_passwd) // GOOD (not sensitive) - hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD [NOT DETECTED] - hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD [NOT DETECTED] + hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD + hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA256.hash(data: cert) // GOOD, computationally expensive hash not required @@ -222,14 +222,14 @@ func testBadExample(passwordString: String) { func testWithFlowAndMetatypes(cardNumber: String) { let value1 = Data(cardNumber.utf8); - let _digest1 = Insecure.MD5.hash(data: value1); // BAD [NOT DETECTED] + let _digest1 = Insecure.MD5.hash(data: value1); // BAD let value2 = Data(cardNumber.utf8); let hasher2 = Insecure.MD5.self; // metatype - let _digest2 = hasher2.hash(data: value2); // BAD [NOT DETECTED] + let _digest2 = hasher2.hash(data: value2); // BAD let value3 = Data(cardNumber.utf8); - let _digest3 = (Insecure.MD5.self).hash(data: value3); // BAD [NOT DETECTED] + let _digest3 = (Insecure.MD5.self).hash(data: value3); // BAD let value4 = Data(cardNumber.utf8); testReceiver1(value: value4); @@ -242,11 +242,11 @@ func testWithFlowAndMetatypes(cardNumber: String) { } func testReceiver1(value: Data) { - let _digest = Insecure.MD5.hash(data: value); // BAD [NOT DETECTED] + let _digest = Insecure.MD5.hash(data: value); // BAD } func testReceiver2(hasher: Insecure.MD5.Type, value: Data) { - let _digest = hasher.hash(data: value); // BAD [NOT DETECTED] + let _digest = hasher.hash(data: value); // BAD } func testReceiver3(hasher: H.Type, value: Data) { From 2b4ea18dfe2118141c000a17bd4cba251c85ffc7 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 26 May 2026 17:33:50 +0100 Subject: [PATCH 63/85] Swift: Add a similar sink for password hashing as well. --- .../security/WeakPasswordHashingExtensions.qll | 18 ++++++++++++++++++ .../CWE-328/WeakPasswordHashing.expected | 14 ++++++++++++++ .../Security/CWE-328/testCryptoKit.swift | 10 +++++----- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll index 76ae9c21dab..80ed9774f39 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll @@ -111,6 +111,24 @@ private class DefaultWeakPasswordHashingSink extends WeakPasswordHashingSink { override string getAlgorithm() { result = algorithm } } +/** + * A sink for weak password hashing through a call with a metatype qualifier. + */ +private class WeakPasswordHashingMetatypeSink extends WeakPasswordHashingSink { + string algorithm; + + WeakPasswordHashingMetatypeSink() { + exists(CallExpr c | + c.getAnArgument().getExpr() = this.asExpr() and + algorithm = ["SHA256", "SHA384", "SHA512"] and + c.getQualifier().getType().getFullName() = algorithm + ".Type" and + c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] + ) + } + + override string getAlgorithm() { result = algorithm } +} + /** * A barrier for weak password hashing, when it occurs inside of * certain cryptographic algorithms as part of their design. diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index be78d099011..0aa4b617c9c 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -1,13 +1,22 @@ edges +| testCryptoKit.swift:218:38:218:38 | passwordString | testCryptoKit.swift:218:38:218:53 | .utf8 | provenance | | +| testCryptoKit.swift:218:38:218:53 | .utf8 | testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | provenance | | nodes | testCryptoKit.swift:84:47:84:47 | passwd | semmle.label | passwd | | testCryptoKit.swift:90:36:90:36 | passwd | semmle.label | passwd | | testCryptoKit.swift:96:44:96:44 | passwd | semmle.label | passwd | +| testCryptoKit.swift:102:37:102:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:108:37:108:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:114:37:114:37 | passwd | semmle.label | passwd | | testCryptoKit.swift:168:32:168:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:177:32:177:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:186:32:186:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:195:32:195:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:204:32:204:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:214:49:214:49 | passwordData | semmle.label | passwordData | +| testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:218:38:218:38 | passwordString | semmle.label | passwordString | +| testCryptoKit.swift:218:38:218:53 | .utf8 | semmle.label | .utf8 | | testCryptoSwift.swift:154:30:154:30 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:157:31:157:31 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:160:47:160:47 | passwdArray | semmle.label | passwdArray | @@ -37,11 +46,16 @@ subpaths | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:84:47:84:47 | passwd | password (passwd) | | testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:90:36:90:36 | passwd | password (passwd) | | testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:96:44:96:44 | passwd | password (passwd) | +| testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:102:37:102:37 | passwd | password (passwd) | +| testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:108:37:108:37 | passwd | password (passwd) | +| testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:114:37:114:37 | passwd | password (passwd) | | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:32:168:32 | passwd | password (passwd) | | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:32 | passwd | password (passwd) | | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:186:32:186:32 | passwd | password (passwd) | | testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:195:32:195:32 | passwd | password (passwd) | | testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:204:32:204:32 | passwd | password (passwd) | +| testCryptoKit.swift:214:49:214:49 | passwordData | testCryptoKit.swift:214:49:214:49 | passwordData | testCryptoKit.swift:214:49:214:49 | passwordData | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:214:49:214:49 | passwordData | password (passwordData) | +| testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | testCryptoKit.swift:218:38:218:38 | passwordString | testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:218:38:218:38 | passwordString | password (passwordString) | | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:154:30:154:30 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:157:31:157:31 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:160:47:160:47 | passwdArray | password (passwdArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index faf0f69ab12..d3ffa7282f1 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -99,19 +99,19 @@ func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_pa hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD - hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA256.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA256.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: credit_card_no) // GOOD, computationally expensive hash not required - hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA384.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA384.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: credit_card_no) // GOOD, computationally expensive hash not required - hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA512.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA512.hash(data: account_no) // GOOD, computationally expensive hash not required @@ -211,11 +211,11 @@ func testSHA512UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, func testBadExample(passwordString: String) { // this is the "bad" example from the .qhelp let passwordData = Data(passwordString.utf8) - let passwordHash = Crypto.SHA512.hash(data: passwordData) // BAD, not a computationally expensive hash [NOT DETECTED] + let passwordHash = Crypto.SHA512.hash(data: passwordData) // BAD, not a computationally expensive hash // ... - if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { // BAD, not a computationally expensive hash [NOT DETECTED] + if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { // BAD, not a computationally expensive hash // ... } } From c902c756512de679885099a09503d526addc3163 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 26 May 2026 14:02:55 +0100 Subject: [PATCH 64/85] Swift: Add change note. --- swift/ql/src/change-notes/2026-05-26-hashing-sinks.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 swift/ql/src/change-notes/2026-05-26-hashing-sinks.md diff --git a/swift/ql/src/change-notes/2026-05-26-hashing-sinks.md b/swift/ql/src/change-notes/2026-05-26-hashing-sinks.md new file mode 100644 index 00000000000..92a2c1c3a06 --- /dev/null +++ b/swift/ql/src/change-notes/2026-05-26-hashing-sinks.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Fixed an issue where common usage patterns for `CryptoKit` weren't being recognized as hashing sinks for the `swift/weak-sensitive-data-hashing` and `swift/weak-password-hashing` queries. These queries may find additional results after this change. From 94e6ec65115bca82d9263ac90d7f474d9d848f99 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 27 May 2026 10:19:06 +0100 Subject: [PATCH 65/85] Swift: Widen the new sinks to cover more cases the MaD sinks are missing. --- .../WeakPasswordHashingExtensions.qll | 2 +- .../WeakSensitiveDataHashingExtensions.qll | 2 +- .../CWE-328/WeakPasswordHashing.expected | 10 +++++++++ .../CWE-328/WeakSensitiveDataHashing.expected | 12 ++++++++++ .../Security/CWE-328/testCryptoKit.swift | 22 +++++++++---------- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll index 80ed9774f39..77487610276 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll @@ -121,7 +121,7 @@ private class WeakPasswordHashingMetatypeSink extends WeakPasswordHashingSink { exists(CallExpr c | c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["SHA256", "SHA384", "SHA512"] and - c.getQualifier().getType().getFullName() = algorithm + ".Type" and + c.getQualifier().getType().getFullName() = algorithm + ["", ".Type"] and c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] ) } diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index a8c76879cb6..a1fcb409269 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -87,7 +87,7 @@ private class WeakSenitiveDataHashingMetatypeSink extends WeakSensitiveDataHashi exists(CallExpr c | c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["MD5", "SHA1"] and - c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ".Type" and + c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ["", ".Type"] and c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] ) } diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index 0aa4b617c9c..295467e78ab 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -8,6 +8,11 @@ nodes | testCryptoKit.swift:102:37:102:37 | passwd | semmle.label | passwd | | testCryptoKit.swift:108:37:108:37 | passwd | semmle.label | passwd | | testCryptoKit.swift:114:37:114:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:123:23:123:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:132:23:132:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:141:23:141:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:150:23:150:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:159:23:159:23 | passwd | semmle.label | passwd | | testCryptoKit.swift:168:32:168:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:177:32:177:32 | passwd | semmle.label | passwd | | testCryptoKit.swift:186:32:186:32 | passwd | semmle.label | passwd | @@ -49,6 +54,11 @@ subpaths | testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:102:37:102:37 | passwd | password (passwd) | | testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:108:37:108:37 | passwd | password (passwd) | | testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:114:37:114:37 | passwd | password (passwd) | +| testCryptoKit.swift:123:23:123:23 | passwd | testCryptoKit.swift:123:23:123:23 | passwd | testCryptoKit.swift:123:23:123:23 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:123:23:123:23 | passwd | password (passwd) | +| testCryptoKit.swift:132:23:132:23 | passwd | testCryptoKit.swift:132:23:132:23 | passwd | testCryptoKit.swift:132:23:132:23 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:132:23:132:23 | passwd | password (passwd) | +| testCryptoKit.swift:141:23:141:23 | passwd | testCryptoKit.swift:141:23:141:23 | passwd | testCryptoKit.swift:141:23:141:23 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:141:23:141:23 | passwd | password (passwd) | +| testCryptoKit.swift:150:23:150:23 | passwd | testCryptoKit.swift:150:23:150:23 | passwd | testCryptoKit.swift:150:23:150:23 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:150:23:150:23 | passwd | password (passwd) | +| testCryptoKit.swift:159:23:159:23 | passwd | testCryptoKit.swift:159:23:159:23 | passwd | testCryptoKit.swift:159:23:159:23 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:159:23:159:23 | passwd | password (passwd) | | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:32:168:32 | passwd | password (passwd) | | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:32 | passwd | password (passwd) | | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:186:32:186:32 | passwd | password (passwd) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected index 819b3e20aea..95908a442f1 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected @@ -28,6 +28,12 @@ nodes | testCryptoKit.swift:97:44:97:44 | cert | semmle.label | cert | | testCryptoKit.swift:99:44:99:44 | account_no | semmle.label | account_no | | testCryptoKit.swift:100:44:100:44 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:124:23:124:23 | cert | semmle.label | cert | +| testCryptoKit.swift:126:23:126:23 | account_no | semmle.label | account_no | +| testCryptoKit.swift:127:23:127:23 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:133:23:133:23 | cert | semmle.label | cert | +| testCryptoKit.swift:135:23:135:23 | account_no | semmle.label | account_no | +| testCryptoKit.swift:136:23:136:23 | credit_card_no | semmle.label | credit_card_no | | testCryptoKit.swift:169:32:169:32 | cert | semmle.label | cert | | testCryptoKit.swift:171:32:171:32 | account_no | semmle.label | account_no | | testCryptoKit.swift:172:32:172:32 | credit_card_no | semmle.label | credit_card_no | @@ -79,6 +85,12 @@ subpaths | testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:97:44:97:44 | cert | sensitive data (credential cert) | | testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:99:44:99:44 | account_no | sensitive data (private information account_no) | | testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:100:44:100:44 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:124:23:124:23 | cert | testCryptoKit.swift:124:23:124:23 | cert | testCryptoKit.swift:124:23:124:23 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:124:23:124:23 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:126:23:126:23 | account_no | testCryptoKit.swift:126:23:126:23 | account_no | testCryptoKit.swift:126:23:126:23 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:126:23:126:23 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:127:23:127:23 | credit_card_no | testCryptoKit.swift:127:23:127:23 | credit_card_no | testCryptoKit.swift:127:23:127:23 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:127:23:127:23 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:133:23:133:23 | cert | testCryptoKit.swift:133:23:133:23 | cert | testCryptoKit.swift:133:23:133:23 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:133:23:133:23 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:135:23:135:23 | account_no | testCryptoKit.swift:135:23:135:23 | account_no | testCryptoKit.swift:135:23:135:23 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:135:23:135:23 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:136:23:136:23 | credit_card_no | testCryptoKit.swift:136:23:136:23 | credit_card_no | testCryptoKit.swift:136:23:136:23 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:136:23:136:23 | credit_card_no | sensitive data (private information credit_card_no) | | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:169:32:169:32 | cert | sensitive data (credential cert) | | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:171:32:171:32 | account_no | sensitive data (private information account_no) | | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:172:32:172:32 | credit_card_no | sensitive data (private information credit_card_no) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index d3ffa7282f1..11dd55a9d83 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -120,25 +120,25 @@ func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_pa func testMD5UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.MD5() - hash.update(data: passwd) // BAD [NOT DETECTED] - hash.update(data: cert) // BAD [NOT DETECTED] + hash.update(data: passwd) // BAD + hash.update(data: cert) // BAD hash.update(data: encrypted_passwd) // GOOD (not sensitive) - hash.update(data: account_no) // BAD [NOT DETECTED] - hash.update(data: credit_card_no) // BAD [NOT DETECTED] + hash.update(data: account_no) // BAD + hash.update(data: credit_card_no) // BAD } func testSHA1UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.SHA1() - hash.update(data: passwd) // BAD [NOT DETECTED] - hash.update(data: cert) // BAD [NOT DETECTED] + hash.update(data: passwd) // BAD + hash.update(data: cert) // BAD hash.update(data: encrypted_passwd) // GOOD (not sensitive) - hash.update(data: account_no) // BAD [NOT DETECTED] - hash.update(data: credit_card_no) // BAD [NOT DETECTED] + hash.update(data: account_no) // BAD + hash.update(data: credit_card_no) // BAD } func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA256() - hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash.update(data: passwd) // BAD, not a computationally expensive hash hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD @@ -147,7 +147,7 @@ func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd : func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA384() - hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash.update(data: passwd) // BAD, not a computationally expensive hash hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD @@ -156,7 +156,7 @@ func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd : func testSHA512UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.SHA512() - hash.update(data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash.update(data: passwd) // BAD, not a computationally expensive hash hash.update(data: cert) // GOOD hash.update(data: encrypted_passwd) // GOOD (not sensitive) hash.update(data: account_no) // GOOD From c6c3e1474cb37291e66b1bee431086fda805ffcd Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 27 May 2026 11:15:28 +0100 Subject: [PATCH 66/85] Swift: Add a few more test cases for simple missing models. --- .../CWE-328/WeakPasswordHashing.expected | 76 ++++---- .../CWE-328/WeakSensitiveDataHashing.expected | 170 +++++++++--------- .../Security/CWE-328/testCryptoKit.swift | 6 + 3 files changed, 129 insertions(+), 123 deletions(-) diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index 295467e78ab..7d99c97bd4d 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -1,27 +1,27 @@ edges -| testCryptoKit.swift:218:38:218:38 | passwordString | testCryptoKit.swift:218:38:218:53 | .utf8 | provenance | | -| testCryptoKit.swift:218:38:218:53 | .utf8 | testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:224:38:224:38 | passwordString | testCryptoKit.swift:224:38:224:53 | .utf8 | provenance | | +| testCryptoKit.swift:224:38:224:53 | .utf8 | testCryptoKit.swift:224:33:224:57 | call to Data.init(_:) | provenance | | nodes | testCryptoKit.swift:84:47:84:47 | passwd | semmle.label | passwd | -| testCryptoKit.swift:90:36:90:36 | passwd | semmle.label | passwd | -| testCryptoKit.swift:96:44:96:44 | passwd | semmle.label | passwd | -| testCryptoKit.swift:102:37:102:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:108:37:108:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:114:37:114:37 | passwd | semmle.label | passwd | -| testCryptoKit.swift:123:23:123:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:132:23:132:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:141:23:141:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:150:23:150:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:159:23:159:23 | passwd | semmle.label | passwd | -| testCryptoKit.swift:168:32:168:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:177:32:177:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:186:32:186:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:195:32:195:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:204:32:204:32 | passwd | semmle.label | passwd | -| testCryptoKit.swift:214:49:214:49 | passwordData | semmle.label | passwordData | -| testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:218:38:218:38 | passwordString | semmle.label | passwordString | -| testCryptoKit.swift:218:38:218:53 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:91:36:91:36 | passwd | semmle.label | passwd | +| testCryptoKit.swift:98:44:98:44 | passwd | semmle.label | passwd | +| testCryptoKit.swift:105:37:105:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:112:37:112:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:119:37:119:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:129:23:129:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:138:23:138:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:147:23:147:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:156:23:156:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:165:23:165:23 | passwd | semmle.label | passwd | +| testCryptoKit.swift:174:32:174:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:183:32:183:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:192:32:192:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:201:32:201:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:210:32:210:32 | passwd | semmle.label | passwd | +| testCryptoKit.swift:220:49:220:49 | passwordData | semmle.label | passwordData | +| testCryptoKit.swift:224:33:224:57 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:224:38:224:38 | passwordString | semmle.label | passwordString | +| testCryptoKit.swift:224:38:224:53 | .utf8 | semmle.label | .utf8 | | testCryptoSwift.swift:154:30:154:30 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:157:31:157:31 | passwdArray | semmle.label | passwdArray | | testCryptoSwift.swift:160:47:160:47 | passwdArray | semmle.label | passwdArray | @@ -49,23 +49,23 @@ nodes subpaths #select | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:84:47:84:47 | passwd | password (passwd) | -| testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | testCryptoKit.swift:90:36:90:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:90:36:90:36 | passwd | password (passwd) | -| testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | testCryptoKit.swift:96:44:96:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:96:44:96:44 | passwd | password (passwd) | -| testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | testCryptoKit.swift:102:37:102:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:102:37:102:37 | passwd | password (passwd) | -| testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | testCryptoKit.swift:108:37:108:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:108:37:108:37 | passwd | password (passwd) | -| testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | testCryptoKit.swift:114:37:114:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:114:37:114:37 | passwd | password (passwd) | -| testCryptoKit.swift:123:23:123:23 | passwd | testCryptoKit.swift:123:23:123:23 | passwd | testCryptoKit.swift:123:23:123:23 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:123:23:123:23 | passwd | password (passwd) | -| testCryptoKit.swift:132:23:132:23 | passwd | testCryptoKit.swift:132:23:132:23 | passwd | testCryptoKit.swift:132:23:132:23 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:132:23:132:23 | passwd | password (passwd) | -| testCryptoKit.swift:141:23:141:23 | passwd | testCryptoKit.swift:141:23:141:23 | passwd | testCryptoKit.swift:141:23:141:23 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:141:23:141:23 | passwd | password (passwd) | -| testCryptoKit.swift:150:23:150:23 | passwd | testCryptoKit.swift:150:23:150:23 | passwd | testCryptoKit.swift:150:23:150:23 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:150:23:150:23 | passwd | password (passwd) | -| testCryptoKit.swift:159:23:159:23 | passwd | testCryptoKit.swift:159:23:159:23 | passwd | testCryptoKit.swift:159:23:159:23 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:159:23:159:23 | passwd | password (passwd) | -| testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | testCryptoKit.swift:168:32:168:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:32:168:32 | passwd | password (passwd) | -| testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | testCryptoKit.swift:177:32:177:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:32 | passwd | password (passwd) | -| testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | testCryptoKit.swift:186:32:186:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:186:32:186:32 | passwd | password (passwd) | -| testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | testCryptoKit.swift:195:32:195:32 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:195:32:195:32 | passwd | password (passwd) | -| testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | testCryptoKit.swift:204:32:204:32 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:204:32:204:32 | passwd | password (passwd) | -| testCryptoKit.swift:214:49:214:49 | passwordData | testCryptoKit.swift:214:49:214:49 | passwordData | testCryptoKit.swift:214:49:214:49 | passwordData | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:214:49:214:49 | passwordData | password (passwordData) | -| testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | testCryptoKit.swift:218:38:218:38 | passwordString | testCryptoKit.swift:218:33:218:57 | call to Data.init(_:) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:218:38:218:38 | passwordString | password (passwordString) | +| testCryptoKit.swift:91:36:91:36 | passwd | testCryptoKit.swift:91:36:91:36 | passwd | testCryptoKit.swift:91:36:91:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:91:36:91:36 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:44 | passwd | testCryptoKit.swift:98:44:98:44 | passwd | testCryptoKit.swift:98:44:98:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:98:44:98:44 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:37 | passwd | testCryptoKit.swift:105:37:105:37 | passwd | testCryptoKit.swift:105:37:105:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:105:37:105:37 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:37 | passwd | testCryptoKit.swift:112:37:112:37 | passwd | testCryptoKit.swift:112:37:112:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:112:37:112:37 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:37 | passwd | testCryptoKit.swift:119:37:119:37 | passwd | testCryptoKit.swift:119:37:119:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:119:37:119:37 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:23 | passwd | testCryptoKit.swift:129:23:129:23 | passwd | testCryptoKit.swift:129:23:129:23 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:129:23:129:23 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:23 | passwd | testCryptoKit.swift:138:23:138:23 | passwd | testCryptoKit.swift:138:23:138:23 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:138:23:138:23 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:23 | passwd | testCryptoKit.swift:147:23:147:23 | passwd | testCryptoKit.swift:147:23:147:23 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:147:23:147:23 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:23 | passwd | testCryptoKit.swift:156:23:156:23 | passwd | testCryptoKit.swift:156:23:156:23 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:156:23:156:23 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:23 | passwd | testCryptoKit.swift:165:23:165:23 | passwd | testCryptoKit.swift:165:23:165:23 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:165:23:165:23 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:32 | passwd | testCryptoKit.swift:174:32:174:32 | passwd | testCryptoKit.swift:174:32:174:32 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:174:32:174:32 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:32 | passwd | testCryptoKit.swift:183:32:183:32 | passwd | testCryptoKit.swift:183:32:183:32 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:183:32:183:32 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:32 | passwd | testCryptoKit.swift:192:32:192:32 | passwd | testCryptoKit.swift:192:32:192:32 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:192:32:192:32 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:32 | passwd | testCryptoKit.swift:201:32:201:32 | passwd | testCryptoKit.swift:201:32:201:32 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:201:32:201:32 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:32 | passwd | testCryptoKit.swift:210:32:210:32 | passwd | testCryptoKit.swift:210:32:210:32 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:210:32:210:32 | passwd | password (passwd) | +| testCryptoKit.swift:220:49:220:49 | passwordData | testCryptoKit.swift:220:49:220:49 | passwordData | testCryptoKit.swift:220:49:220:49 | passwordData | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:220:49:220:49 | passwordData | password (passwordData) | +| testCryptoKit.swift:224:33:224:57 | call to Data.init(_:) | testCryptoKit.swift:224:38:224:38 | passwordString | testCryptoKit.swift:224:33:224:57 | call to Data.init(_:) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:224:38:224:38 | passwordString | password (passwordString) | | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | testCryptoSwift.swift:154:30:154:30 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:154:30:154:30 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | testCryptoSwift.swift:157:31:157:31 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:157:31:157:31 | passwdArray | password (passwdArray) | | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | testCryptoSwift.swift:160:47:160:47 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:160:47:160:47 | passwdArray | password (passwdArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected index 95908a442f1..ebb8154b0f8 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakSensitiveDataHashing.expected @@ -1,69 +1,69 @@ edges -| testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | testCryptoKit.swift:225:44:225:44 | value1 | provenance | | -| testCryptoKit.swift:224:23:224:23 | cardNumber | testCryptoKit.swift:224:23:224:34 | .utf8 | provenance | | -| testCryptoKit.swift:224:23:224:34 | .utf8 | testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | provenance | | -| testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | testCryptoKit.swift:229:39:229:39 | value2 | provenance | | -| testCryptoKit.swift:227:23:227:23 | cardNumber | testCryptoKit.swift:227:23:227:34 | .utf8 | provenance | | -| testCryptoKit.swift:227:23:227:34 | .utf8 | testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | provenance | | -| testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | testCryptoKit.swift:232:51:232:51 | value3 | provenance | | -| testCryptoKit.swift:231:23:231:23 | cardNumber | testCryptoKit.swift:231:23:231:34 | .utf8 | provenance | | -| testCryptoKit.swift:231:23:231:34 | .utf8 | testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | provenance | | -| testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | testCryptoKit.swift:235:26:235:26 | value4 | provenance | | -| testCryptoKit.swift:234:23:234:23 | cardNumber | testCryptoKit.swift:234:23:234:34 | .utf8 | provenance | | -| testCryptoKit.swift:234:23:234:34 | .utf8 | testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | provenance | | -| testCryptoKit.swift:235:26:235:26 | value4 | testCryptoKit.swift:244:20:244:27 | value | provenance | | -| testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | testCryptoKit.swift:238:53:238:53 | value5 | provenance | | +| testCryptoKit.swift:230:18:230:38 | call to Data.init(_:) | testCryptoKit.swift:231:44:231:44 | value1 | provenance | | +| testCryptoKit.swift:230:23:230:23 | cardNumber | testCryptoKit.swift:230:23:230:34 | .utf8 | provenance | | +| testCryptoKit.swift:230:23:230:34 | .utf8 | testCryptoKit.swift:230:18:230:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:233:18:233:38 | call to Data.init(_:) | testCryptoKit.swift:235:39:235:39 | value2 | provenance | | +| testCryptoKit.swift:233:23:233:23 | cardNumber | testCryptoKit.swift:233:23:233:34 | .utf8 | provenance | | +| testCryptoKit.swift:233:23:233:34 | .utf8 | testCryptoKit.swift:233:18:233:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | testCryptoKit.swift:238:51:238:51 | value3 | provenance | | | testCryptoKit.swift:237:23:237:23 | cardNumber | testCryptoKit.swift:237:23:237:34 | .utf8 | provenance | | | testCryptoKit.swift:237:23:237:34 | .utf8 | testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | provenance | | -| testCryptoKit.swift:238:53:238:53 | value5 | testCryptoKit.swift:248:47:248:54 | value | provenance | | -| testCryptoKit.swift:244:20:244:27 | value | testCryptoKit.swift:245:43:245:43 | value | provenance | | -| testCryptoKit.swift:248:47:248:54 | value | testCryptoKit.swift:249:37:249:37 | value | provenance | | +| testCryptoKit.swift:240:18:240:38 | call to Data.init(_:) | testCryptoKit.swift:241:26:241:26 | value4 | provenance | | +| testCryptoKit.swift:240:23:240:23 | cardNumber | testCryptoKit.swift:240:23:240:34 | .utf8 | provenance | | +| testCryptoKit.swift:240:23:240:34 | .utf8 | testCryptoKit.swift:240:18:240:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:241:26:241:26 | value4 | testCryptoKit.swift:250:20:250:27 | value | provenance | | +| testCryptoKit.swift:243:18:243:38 | call to Data.init(_:) | testCryptoKit.swift:244:53:244:53 | value5 | provenance | | +| testCryptoKit.swift:243:23:243:23 | cardNumber | testCryptoKit.swift:243:23:243:34 | .utf8 | provenance | | +| testCryptoKit.swift:243:23:243:34 | .utf8 | testCryptoKit.swift:243:18:243:38 | call to Data.init(_:) | provenance | | +| testCryptoKit.swift:244:53:244:53 | value5 | testCryptoKit.swift:254:47:254:54 | value | provenance | | +| testCryptoKit.swift:250:20:250:27 | value | testCryptoKit.swift:251:43:251:43 | value | provenance | | +| testCryptoKit.swift:254:47:254:54 | value | testCryptoKit.swift:255:37:255:37 | value | provenance | | nodes -| testCryptoKit.swift:85:43:85:43 | cert | semmle.label | cert | -| testCryptoKit.swift:87:43:87:43 | account_no | semmle.label | account_no | -| testCryptoKit.swift:88:43:88:43 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:91:36:91:36 | cert | semmle.label | cert | -| testCryptoKit.swift:93:36:93:36 | account_no | semmle.label | account_no | -| testCryptoKit.swift:94:36:94:36 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:97:44:97:44 | cert | semmle.label | cert | -| testCryptoKit.swift:99:44:99:44 | account_no | semmle.label | account_no | -| testCryptoKit.swift:100:44:100:44 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:124:23:124:23 | cert | semmle.label | cert | -| testCryptoKit.swift:126:23:126:23 | account_no | semmle.label | account_no | -| testCryptoKit.swift:127:23:127:23 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:133:23:133:23 | cert | semmle.label | cert | -| testCryptoKit.swift:135:23:135:23 | account_no | semmle.label | account_no | -| testCryptoKit.swift:136:23:136:23 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:169:32:169:32 | cert | semmle.label | cert | -| testCryptoKit.swift:171:32:171:32 | account_no | semmle.label | account_no | -| testCryptoKit.swift:172:32:172:32 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:178:32:178:32 | cert | semmle.label | cert | -| testCryptoKit.swift:180:32:180:32 | account_no | semmle.label | account_no | -| testCryptoKit.swift:181:32:181:32 | credit_card_no | semmle.label | credit_card_no | -| testCryptoKit.swift:224:18:224:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:224:23:224:23 | cardNumber | semmle.label | cardNumber | -| testCryptoKit.swift:224:23:224:34 | .utf8 | semmle.label | .utf8 | -| testCryptoKit.swift:225:44:225:44 | value1 | semmle.label | value1 | -| testCryptoKit.swift:227:18:227:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:227:23:227:23 | cardNumber | semmle.label | cardNumber | -| testCryptoKit.swift:227:23:227:34 | .utf8 | semmle.label | .utf8 | -| testCryptoKit.swift:229:39:229:39 | value2 | semmle.label | value2 | -| testCryptoKit.swift:231:18:231:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:231:23:231:23 | cardNumber | semmle.label | cardNumber | -| testCryptoKit.swift:231:23:231:34 | .utf8 | semmle.label | .utf8 | -| testCryptoKit.swift:232:51:232:51 | value3 | semmle.label | value3 | -| testCryptoKit.swift:234:18:234:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | -| testCryptoKit.swift:234:23:234:23 | cardNumber | semmle.label | cardNumber | -| testCryptoKit.swift:234:23:234:34 | .utf8 | semmle.label | .utf8 | -| testCryptoKit.swift:235:26:235:26 | value4 | semmle.label | value4 | +| testCryptoKit.swift:86:43:86:43 | cert | semmle.label | cert | +| testCryptoKit.swift:88:43:88:43 | account_no | semmle.label | account_no | +| testCryptoKit.swift:89:43:89:43 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:93:36:93:36 | cert | semmle.label | cert | +| testCryptoKit.swift:95:36:95:36 | account_no | semmle.label | account_no | +| testCryptoKit.swift:96:36:96:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:100:44:100:44 | cert | semmle.label | cert | +| testCryptoKit.swift:102:44:102:44 | account_no | semmle.label | account_no | +| testCryptoKit.swift:103:44:103:44 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:130:23:130:23 | cert | semmle.label | cert | +| testCryptoKit.swift:132:23:132:23 | account_no | semmle.label | account_no | +| testCryptoKit.swift:133:23:133:23 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:139:23:139:23 | cert | semmle.label | cert | +| testCryptoKit.swift:141:23:141:23 | account_no | semmle.label | account_no | +| testCryptoKit.swift:142:23:142:23 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:175:32:175:32 | cert | semmle.label | cert | +| testCryptoKit.swift:177:32:177:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:178:32:178:32 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:184:32:184:32 | cert | semmle.label | cert | +| testCryptoKit.swift:186:32:186:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:187:32:187:32 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:230:18:230:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:230:23:230:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:230:23:230:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:231:44:231:44 | value1 | semmle.label | value1 | +| testCryptoKit.swift:233:18:233:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:233:23:233:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:233:23:233:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:235:39:235:39 | value2 | semmle.label | value2 | | testCryptoKit.swift:237:18:237:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | | testCryptoKit.swift:237:23:237:23 | cardNumber | semmle.label | cardNumber | | testCryptoKit.swift:237:23:237:34 | .utf8 | semmle.label | .utf8 | -| testCryptoKit.swift:238:53:238:53 | value5 | semmle.label | value5 | -| testCryptoKit.swift:244:20:244:27 | value | semmle.label | value | -| testCryptoKit.swift:245:43:245:43 | value | semmle.label | value | -| testCryptoKit.swift:248:47:248:54 | value | semmle.label | value | -| testCryptoKit.swift:249:37:249:37 | value | semmle.label | value | +| testCryptoKit.swift:238:51:238:51 | value3 | semmle.label | value3 | +| testCryptoKit.swift:240:18:240:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:240:23:240:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:240:23:240:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:241:26:241:26 | value4 | semmle.label | value4 | +| testCryptoKit.swift:243:18:243:38 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testCryptoKit.swift:243:23:243:23 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:243:23:243:34 | .utf8 | semmle.label | .utf8 | +| testCryptoKit.swift:244:53:244:53 | value5 | semmle.label | value5 | +| testCryptoKit.swift:250:20:250:27 | value | semmle.label | value | +| testCryptoKit.swift:251:43:251:43 | value | semmle.label | value | +| testCryptoKit.swift:254:47:254:54 | value | semmle.label | value | +| testCryptoKit.swift:255:37:255:37 | value | semmle.label | value | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | semmle.label | phoneNumberArray | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | semmle.label | phoneNumberArray | @@ -76,32 +76,32 @@ nodes | testCryptoSwift.swift:221:9:221:9 | creditCardNumber | semmle.label | creditCardNumber | subpaths #select -| testCryptoKit.swift:85:43:85:43 | cert | testCryptoKit.swift:85:43:85:43 | cert | testCryptoKit.swift:85:43:85:43 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:85:43:85:43 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:87:43:87:43 | account_no | testCryptoKit.swift:87:43:87:43 | account_no | testCryptoKit.swift:87:43:87:43 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:87:43:87:43 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:88:43:88:43 | credit_card_no | testCryptoKit.swift:88:43:88:43 | credit_card_no | testCryptoKit.swift:88:43:88:43 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:88:43:88:43 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:91:36:91:36 | cert | testCryptoKit.swift:91:36:91:36 | cert | testCryptoKit.swift:91:36:91:36 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:91:36:91:36 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:93:36:93:36 | account_no | testCryptoKit.swift:93:36:93:36 | account_no | testCryptoKit.swift:93:36:93:36 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:93:36:93:36 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:94:36:94:36 | credit_card_no | testCryptoKit.swift:94:36:94:36 | credit_card_no | testCryptoKit.swift:94:36:94:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:94:36:94:36 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | testCryptoKit.swift:97:44:97:44 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:97:44:97:44 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | testCryptoKit.swift:99:44:99:44 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:99:44:99:44 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | testCryptoKit.swift:100:44:100:44 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:100:44:100:44 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:124:23:124:23 | cert | testCryptoKit.swift:124:23:124:23 | cert | testCryptoKit.swift:124:23:124:23 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:124:23:124:23 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:126:23:126:23 | account_no | testCryptoKit.swift:126:23:126:23 | account_no | testCryptoKit.swift:126:23:126:23 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:126:23:126:23 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:127:23:127:23 | credit_card_no | testCryptoKit.swift:127:23:127:23 | credit_card_no | testCryptoKit.swift:127:23:127:23 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:127:23:127:23 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:133:23:133:23 | cert | testCryptoKit.swift:133:23:133:23 | cert | testCryptoKit.swift:133:23:133:23 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:133:23:133:23 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:135:23:135:23 | account_no | testCryptoKit.swift:135:23:135:23 | account_no | testCryptoKit.swift:135:23:135:23 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:135:23:135:23 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:136:23:136:23 | credit_card_no | testCryptoKit.swift:136:23:136:23 | credit_card_no | testCryptoKit.swift:136:23:136:23 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:136:23:136:23 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | testCryptoKit.swift:169:32:169:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:169:32:169:32 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | testCryptoKit.swift:171:32:171:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:171:32:171:32 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | testCryptoKit.swift:172:32:172:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:172:32:172:32 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | testCryptoKit.swift:178:32:178:32 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:178:32:178:32 | cert | sensitive data (credential cert) | -| testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | testCryptoKit.swift:180:32:180:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:180:32:180:32 | account_no | sensitive data (private information account_no) | -| testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | testCryptoKit.swift:181:32:181:32 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:181:32:181:32 | credit_card_no | sensitive data (private information credit_card_no) | -| testCryptoKit.swift:225:44:225:44 | value1 | testCryptoKit.swift:224:23:224:23 | cardNumber | testCryptoKit.swift:225:44:225:44 | value1 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:224:23:224:23 | cardNumber | sensitive data (private information cardNumber) | -| testCryptoKit.swift:229:39:229:39 | value2 | testCryptoKit.swift:227:23:227:23 | cardNumber | testCryptoKit.swift:229:39:229:39 | value2 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:227:23:227:23 | cardNumber | sensitive data (private information cardNumber) | -| testCryptoKit.swift:232:51:232:51 | value3 | testCryptoKit.swift:231:23:231:23 | cardNumber | testCryptoKit.swift:232:51:232:51 | value3 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:231:23:231:23 | cardNumber | sensitive data (private information cardNumber) | -| testCryptoKit.swift:245:43:245:43 | value | testCryptoKit.swift:234:23:234:23 | cardNumber | testCryptoKit.swift:245:43:245:43 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:234:23:234:23 | cardNumber | sensitive data (private information cardNumber) | -| testCryptoKit.swift:249:37:249:37 | value | testCryptoKit.swift:237:23:237:23 | cardNumber | testCryptoKit.swift:249:37:249:37 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:237:23:237:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:86:43:86:43 | cert | testCryptoKit.swift:86:43:86:43 | cert | testCryptoKit.swift:86:43:86:43 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:86:43:86:43 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:88:43:88:43 | account_no | testCryptoKit.swift:88:43:88:43 | account_no | testCryptoKit.swift:88:43:88:43 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:88:43:88:43 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:89:43:89:43 | credit_card_no | testCryptoKit.swift:89:43:89:43 | credit_card_no | testCryptoKit.swift:89:43:89:43 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:89:43:89:43 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:93:36:93:36 | cert | testCryptoKit.swift:93:36:93:36 | cert | testCryptoKit.swift:93:36:93:36 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:93:36:93:36 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:95:36:95:36 | account_no | testCryptoKit.swift:95:36:95:36 | account_no | testCryptoKit.swift:95:36:95:36 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:95:36:95:36 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:96:36:96:36 | credit_card_no | testCryptoKit.swift:96:36:96:36 | credit_card_no | testCryptoKit.swift:96:36:96:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:96:36:96:36 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:100:44:100:44 | cert | testCryptoKit.swift:100:44:100:44 | cert | testCryptoKit.swift:100:44:100:44 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:100:44:100:44 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:102:44:102:44 | account_no | testCryptoKit.swift:102:44:102:44 | account_no | testCryptoKit.swift:102:44:102:44 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:102:44:102:44 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:103:44:103:44 | credit_card_no | testCryptoKit.swift:103:44:103:44 | credit_card_no | testCryptoKit.swift:103:44:103:44 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:103:44:103:44 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:130:23:130:23 | cert | testCryptoKit.swift:130:23:130:23 | cert | testCryptoKit.swift:130:23:130:23 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:130:23:130:23 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:132:23:132:23 | account_no | testCryptoKit.swift:132:23:132:23 | account_no | testCryptoKit.swift:132:23:132:23 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:132:23:132:23 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:133:23:133:23 | credit_card_no | testCryptoKit.swift:133:23:133:23 | credit_card_no | testCryptoKit.swift:133:23:133:23 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:133:23:133:23 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:139:23:139:23 | cert | testCryptoKit.swift:139:23:139:23 | cert | testCryptoKit.swift:139:23:139:23 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:139:23:139:23 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:141:23:141:23 | account_no | testCryptoKit.swift:141:23:141:23 | account_no | testCryptoKit.swift:141:23:141:23 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:141:23:141:23 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:142:23:142:23 | credit_card_no | testCryptoKit.swift:142:23:142:23 | credit_card_no | testCryptoKit.swift:142:23:142:23 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:142:23:142:23 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:175:32:175:32 | cert | testCryptoKit.swift:175:32:175:32 | cert | testCryptoKit.swift:175:32:175:32 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:175:32:175:32 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:177:32:177:32 | account_no | testCryptoKit.swift:177:32:177:32 | account_no | testCryptoKit.swift:177:32:177:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:177:32:177:32 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:178:32:178:32 | credit_card_no | testCryptoKit.swift:178:32:178:32 | credit_card_no | testCryptoKit.swift:178:32:178:32 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:178:32:178:32 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:184:32:184:32 | cert | testCryptoKit.swift:184:32:184:32 | cert | testCryptoKit.swift:184:32:184:32 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:184:32:184:32 | cert | sensitive data (credential cert) | +| testCryptoKit.swift:186:32:186:32 | account_no | testCryptoKit.swift:186:32:186:32 | account_no | testCryptoKit.swift:186:32:186:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:186:32:186:32 | account_no | sensitive data (private information account_no) | +| testCryptoKit.swift:187:32:187:32 | credit_card_no | testCryptoKit.swift:187:32:187:32 | credit_card_no | testCryptoKit.swift:187:32:187:32 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:187:32:187:32 | credit_card_no | sensitive data (private information credit_card_no) | +| testCryptoKit.swift:231:44:231:44 | value1 | testCryptoKit.swift:230:23:230:23 | cardNumber | testCryptoKit.swift:231:44:231:44 | value1 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:230:23:230:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:235:39:235:39 | value2 | testCryptoKit.swift:233:23:233:23 | cardNumber | testCryptoKit.swift:235:39:235:39 | value2 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:233:23:233:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:238:51:238:51 | value3 | testCryptoKit.swift:237:23:237:23 | cardNumber | testCryptoKit.swift:238:51:238:51 | value3 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:237:23:237:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:251:43:251:43 | value | testCryptoKit.swift:240:23:240:23 | cardNumber | testCryptoKit.swift:251:43:251:43 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:240:23:240:23 | cardNumber | sensitive data (private information cardNumber) | +| testCryptoKit.swift:255:37:255:37 | value | testCryptoKit.swift:243:23:243:23 | cardNumber | testCryptoKit.swift:255:37:255:37 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:243:23:243:23 | cardNumber | sensitive data (private information cardNumber) | | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:153:30:153:30 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:156:31:156:31 | phoneNumberArray | sensitive data (private information phoneNumberArray) | | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:166:20:166:20 | phoneNumberArray | sensitive data (private information phoneNumberArray) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index 11dd55a9d83..32a5dfa1f34 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -82,36 +82,42 @@ enum Insecure { func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD + hash = Crypto.Insecure.MD5.hash(bufferPointer: passwd) // BAD [NOT DETECTED] hash = Crypto.Insecure.MD5.hash(data: cert) // BAD hash = Crypto.Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD hash = Insecure.MD5.hash(data: passwd) // BAD + hash = Insecure.MD5.hash(bufferPointer: passwd) // BAD [NOT DETECTED] hash = Insecure.MD5.hash(data: cert) // BAD hash = Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Insecure.MD5.hash(data: account_no) // BAD hash = Insecure.MD5.hash(data: credit_card_no) // BAD hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD + hash = Crypto.Insecure.SHA1.hash(bufferPointer: passwd) // BAD [NOT DETECTED] hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD hash = Crypto.Insecure.SHA1.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA256.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA256.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA256.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: credit_card_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA384.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA384.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA384.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: credit_card_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash + hash = Crypto.SHA512.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] hash = Crypto.SHA512.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA512.hash(data: account_no) // GOOD, computationally expensive hash not required From f962eac9145e345a34b8064a6a4ce16fd093d53a Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 26 May 2026 17:54:51 +0100 Subject: [PATCH 67/85] Swift: Fill the simple gaps in modelling. --- .../swift/security/WeakPasswordHashingExtensions.qll | 5 ++++- .../security/WeakSensitiveDataHashingExtensions.qll | 4 +++- .../Security/CWE-328/WeakPasswordHashing.expected | 12 ++++++++++++ .../query-tests/Security/CWE-328/testCryptoKit.swift | 12 ++++++------ 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll index 77487610276..8718e031e71 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll @@ -54,12 +54,15 @@ private class WeakSensitiveDataHashingSinks extends SinkModelCsv { // CryptoKit // (SHA-256, SHA-384 and SHA-512 are all variants of the SHA-2 algorithm) ";SHA256;true;hash(data:);;;Argument[0];weak-password-hash-input-SHA256", + ";SHA256;true;hash(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA256", ";SHA256;true;update(data:);;;Argument[0];weak-password-hash-input-SHA256", ";SHA256;true;update(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA256", ";SHA384;true;hash(data:);;;Argument[0];weak-password-hash-input-SHA384", + ";SHA384;true;hash(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA384", ";SHA384;true;update(data:);;;Argument[0];weak-password-hash-input-SHA384", ";SHA384;true;update(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA384", ";SHA512;true;hash(data:);;;Argument[0];weak-password-hash-input-SHA512", + ";SHA512;true;hash(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA512", ";SHA512;true;update(data:);;;Argument[0];weak-password-hash-input-SHA512", ";SHA512;true;update(bufferPointer:);;;Argument[0];weak-password-hash-input-SHA512", // CryptoSwift @@ -122,7 +125,7 @@ private class WeakPasswordHashingMetatypeSink extends WeakPasswordHashingSink { c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["SHA256", "SHA384", "SHA512"] and c.getQualifier().getType().getFullName() = algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] + c.getStaticTarget().getName() = ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] ) } diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index a1fcb409269..dcb32995747 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -40,9 +40,11 @@ private class WeakSensitiveDataHashingSinks extends SinkModelCsv { [ // CryptoKit ";Insecure.MD5;true;hash(data:);;;Argument[0];weak-hash-input-MD5", + ";Insecure.MD5;true;hash(bufferPointer:);;;Argument[0];weak-hash-input-MD5", ";Insecure.MD5;true;update(data:);;;Argument[0];weak-hash-input-MD5", ";Insecure.MD5;true;update(bufferPointer:);;;Argument[0];weak-hash-input-MD5", ";Insecure.SHA1;true;hash(data:);;;Argument[0];weak-hash-input-SHA1", + ";Insecure.SHA1;true;hash(bufferPointer:);;;Argument[0];weak-hash-input-SHA1", ";Insecure.SHA1;true;update(data:);;;Argument[0];weak-hash-input-SHA1", ";Insecure.SHA1;true;update(bufferPointer:);;;Argument[0];weak-hash-input-SHA1", // CryptoSwift @@ -88,7 +90,7 @@ private class WeakSenitiveDataHashingMetatypeSink extends WeakSensitiveDataHashi c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["MD5", "SHA1"] and c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = ["hash(data:)", "update(data:)", "update(bufferPointer:)"] + c.getStaticTarget().getName() = ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] ) } diff --git a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected index 7d99c97bd4d..273f26164fd 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected +++ b/swift/ql/test/query-tests/Security/CWE-328/WeakPasswordHashing.expected @@ -3,11 +3,17 @@ edges | testCryptoKit.swift:224:38:224:53 | .utf8 | testCryptoKit.swift:224:33:224:57 | call to Data.init(_:) | provenance | | nodes | testCryptoKit.swift:84:47:84:47 | passwd | semmle.label | passwd | +| testCryptoKit.swift:85:52:85:52 | passwd | semmle.label | passwd | | testCryptoKit.swift:91:36:91:36 | passwd | semmle.label | passwd | +| testCryptoKit.swift:92:45:92:45 | passwd | semmle.label | passwd | | testCryptoKit.swift:98:44:98:44 | passwd | semmle.label | passwd | +| testCryptoKit.swift:99:53:99:53 | passwd | semmle.label | passwd | | testCryptoKit.swift:105:37:105:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:106:46:106:46 | passwd | semmle.label | passwd | | testCryptoKit.swift:112:37:112:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:113:46:113:46 | passwd | semmle.label | passwd | | testCryptoKit.swift:119:37:119:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:120:46:120:46 | passwd | semmle.label | passwd | | testCryptoKit.swift:129:23:129:23 | passwd | semmle.label | passwd | | testCryptoKit.swift:138:23:138:23 | passwd | semmle.label | passwd | | testCryptoKit.swift:147:23:147:23 | passwd | semmle.label | passwd | @@ -49,11 +55,17 @@ nodes subpaths #select | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | testCryptoKit.swift:84:47:84:47 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:84:47:84:47 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:52 | passwd | testCryptoKit.swift:85:52:85:52 | passwd | testCryptoKit.swift:85:52:85:52 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:85:52:85:52 | passwd | password (passwd) | | testCryptoKit.swift:91:36:91:36 | passwd | testCryptoKit.swift:91:36:91:36 | passwd | testCryptoKit.swift:91:36:91:36 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:91:36:91:36 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:45 | passwd | testCryptoKit.swift:92:45:92:45 | passwd | testCryptoKit.swift:92:45:92:45 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:92:45:92:45 | passwd | password (passwd) | | testCryptoKit.swift:98:44:98:44 | passwd | testCryptoKit.swift:98:44:98:44 | passwd | testCryptoKit.swift:98:44:98:44 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:98:44:98:44 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:53 | passwd | testCryptoKit.swift:99:53:99:53 | passwd | testCryptoKit.swift:99:53:99:53 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:99:53:99:53 | passwd | password (passwd) | | testCryptoKit.swift:105:37:105:37 | passwd | testCryptoKit.swift:105:37:105:37 | passwd | testCryptoKit.swift:105:37:105:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:105:37:105:37 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:46 | passwd | testCryptoKit.swift:106:46:106:46 | passwd | testCryptoKit.swift:106:46:106:46 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:106:46:106:46 | passwd | password (passwd) | | testCryptoKit.swift:112:37:112:37 | passwd | testCryptoKit.swift:112:37:112:37 | passwd | testCryptoKit.swift:112:37:112:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:112:37:112:37 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:46 | passwd | testCryptoKit.swift:113:46:113:46 | passwd | testCryptoKit.swift:113:46:113:46 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:113:46:113:46 | passwd | password (passwd) | | testCryptoKit.swift:119:37:119:37 | passwd | testCryptoKit.swift:119:37:119:37 | passwd | testCryptoKit.swift:119:37:119:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:119:37:119:37 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:46 | passwd | testCryptoKit.swift:120:46:120:46 | passwd | testCryptoKit.swift:120:46:120:46 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:120:46:120:46 | passwd | password (passwd) | | testCryptoKit.swift:129:23:129:23 | passwd | testCryptoKit.swift:129:23:129:23 | passwd | testCryptoKit.swift:129:23:129:23 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:129:23:129:23 | passwd | password (passwd) | | testCryptoKit.swift:138:23:138:23 | passwd | testCryptoKit.swift:138:23:138:23 | passwd | testCryptoKit.swift:138:23:138:23 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:138:23:138:23 | passwd | password (passwd) | | testCryptoKit.swift:147:23:147:23 | passwd | testCryptoKit.swift:147:23:147:23 | passwd | testCryptoKit.swift:147:23:147:23 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:147:23:147:23 | passwd | password (passwd) | diff --git a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift index 32a5dfa1f34..6869805e65a 100644 --- a/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift +++ b/swift/ql/test/query-tests/Security/CWE-328/testCryptoKit.swift @@ -82,42 +82,42 @@ enum Insecure { func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { var hash = Crypto.Insecure.MD5.hash(data: passwd) // BAD - hash = Crypto.Insecure.MD5.hash(bufferPointer: passwd) // BAD [NOT DETECTED] + hash = Crypto.Insecure.MD5.hash(bufferPointer: passwd) // BAD hash = Crypto.Insecure.MD5.hash(data: cert) // BAD hash = Crypto.Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Crypto.Insecure.MD5.hash(data: account_no) // BAD hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // BAD hash = Insecure.MD5.hash(data: passwd) // BAD - hash = Insecure.MD5.hash(bufferPointer: passwd) // BAD [NOT DETECTED] + hash = Insecure.MD5.hash(bufferPointer: passwd) // BAD hash = Insecure.MD5.hash(data: cert) // BAD hash = Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Insecure.MD5.hash(data: account_no) // BAD hash = Insecure.MD5.hash(data: credit_card_no) // BAD hash = Crypto.Insecure.SHA1.hash(data: passwd) // BAD - hash = Crypto.Insecure.SHA1.hash(bufferPointer: passwd) // BAD [NOT DETECTED] + hash = Crypto.Insecure.SHA1.hash(bufferPointer: passwd) // BAD hash = Crypto.Insecure.SHA1.hash(data: cert) // BAD hash = Crypto.Insecure.SHA1.hash(data: encrypted_passwd) // GOOD (not sensitive) hash = Crypto.Insecure.SHA1.hash(data: account_no) // BAD hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // BAD hash = Crypto.SHA256.hash(data: passwd) // BAD, not a computationally expensive hash - hash = Crypto.SHA256.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA256.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA256.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA256.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA256.hash(data: credit_card_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: passwd) // BAD, not a computationally expensive hash - hash = Crypto.SHA384.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA384.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA384.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA384.hash(data: account_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA384.hash(data: credit_card_no) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: passwd) // BAD, not a computationally expensive hash - hash = Crypto.SHA512.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash [NOT DETECTED] + hash = Crypto.SHA512.hash(bufferPointer: passwd) // BAD, not a computationally expensive hash hash = Crypto.SHA512.hash(data: cert) // GOOD, computationally expensive hash not required hash = Crypto.SHA512.hash(data: encrypted_passwd) // GOOD, not sensitive hash = Crypto.SHA512.hash(data: account_no) // GOOD, computationally expensive hash not required From 6b55f865cdf234f8e6733434cc5fb70f5d8addf5 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 27 May 2026 13:24:45 +0200 Subject: [PATCH 68/85] C#: Update integration test expected output. --- .../Assemblies.expected | 1 - 1 file changed, 1 deletion(-) diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected index 2be1117efc0..6b32d2248c5 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected @@ -22,7 +22,6 @@ | [...]/csharp/tools/[...]/Microsoft.Win32.Primitives.dll | | [...]/csharp/tools/[...]/Microsoft.Win32.Registry.dll | | [...]/csharp/tools/[...]/Mono.Posix.NETStandard.dll | -| [...]/csharp/tools/[...]/NaturalSort.Extension.dll | | [...]/csharp/tools/[...]/Newtonsoft.Json.dll | | [...]/csharp/tools/[...]/NuGet.Versioning.dll | | [...]/csharp/tools/[...]/StructuredLogger.dll | From d4c7b5b6feb26d055025790e53747c602258e2dd Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 27 May 2026 14:01:34 +0200 Subject: [PATCH 69/85] C#: Update encoding of SBCS to UTF8 with BOM. --- csharp/ql/test/library-tests/encoding/SBCS.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/ql/test/library-tests/encoding/SBCS.cs b/csharp/ql/test/library-tests/encoding/SBCS.cs index 46d3af48696..9a2d677ba16 100644 --- a/csharp/ql/test/library-tests/encoding/SBCS.cs +++ b/csharp/ql/test/library-tests/encoding/SBCS.cs @@ -1,4 +1,4 @@ -class SBCS +class SBCS { - string sbcs = "’"; + string sbcs = "�"; } From 41fd59c1c1a5927d945718afaf63aee1a9819db9 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 27 May 2026 15:02:28 +0000 Subject: [PATCH 70/85] Unified: regenerate Ast.qll and dbscheme --- unified/ql/lib/codeql/unified/Ast.qll | 3544 ++----------------------- unified/ql/lib/unified.dbscheme | 2425 +---------------- 2 files changed, 318 insertions(+), 5651 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 1835f2c449a..d9060c26f0f 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1,5 +1,5 @@ /** - * CodeQL library for Swift + * CodeQL library for Unified * Automatically generated from the tree-sitter grammar; do not edit */ @@ -24,20 +24,20 @@ private predicate discardLocation(@location_default loc) { } overlay[local] -module Swift { +module Unified { /** The base class for all AST nodes */ - class AstNode extends @swift_ast_node { + class AstNode extends @unified_ast_node { /** Gets a string representation of this element. */ string toString() { result = this.getAPrimaryQlClass() } /** Gets the location of this element. */ - final L::Location getLocation() { swift_ast_node_location(this, result) } + final L::Location getLocation() { unified_ast_node_location(this, result) } /** Gets the parent of this element. */ - final AstNode getParent() { swift_ast_node_parent(this, result, _) } + final AstNode getParent() { unified_ast_node_parent(this, result, _) } /** Gets the index of this node among the children of its parent. */ - final int getParentIndex() { swift_ast_node_parent(this, _, result) } + final int getParentIndex() { unified_ast_node_parent(this, _, result) } /** Gets a field or child node of this node. */ AstNode getAFieldOrChild() { none() } @@ -50,9 +50,9 @@ module Swift { } /** A token. */ - class Token extends @swift_token, AstNode { + class Token extends @unified_token, AstNode { /** Gets the value of this token. */ - final string getValue() { swift_tokeninfo(this, _, result) } + final string getValue() { unified_tokeninfo(this, _, result) } /** Gets a string representation of this element. */ final override string toString() { result = this.getValue() } @@ -61,3548 +61,386 @@ module Swift { override string getAPrimaryQlClass() { result = "Token" } } - /** A reserved word. */ - class ReservedWord extends @swift_reserved_word, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ReservedWord" } - } - /** Gets the file containing the given `node`. */ - private @file getNodeFile(@swift_ast_node node) { - exists(@location_default loc | swift_ast_node_location(node, loc) | + private @file getNodeFile(@unified_ast_node node) { + exists(@location_default loc | unified_ast_node_location(node, loc) | locations_default(loc, result, _, _, _, _) ) } /** Holds if `node` is in the `file` and is part of the overlay base database. */ - private predicate discardableAstNode(@file file, @swift_ast_node node) { + private predicate discardableAstNode(@file file, @unified_ast_node node) { not isOverlay() and file = getNodeFile(node) } /** Holds if `node` should be discarded, because it is part of the overlay base and is in a file that was also extracted as part of the overlay database. */ overlay[discard_entity] - private predicate discardAstNode(@swift_ast_node node) { + private predicate discardAstNode(@unified_ast_node node) { exists(@file file, string path | files(file, path) | discardableAstNode(file, node) and overlayChangedFiles(path) ) } - /** A class representing `additive_expression` nodes. */ - class AdditiveExpression extends @swift_additive_expression, AstNode { + /** A class representing `apply_pattern` nodes. */ + class ApplyPattern extends @unified_apply_pattern, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AdditiveExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_additive_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_additive_expression_def(this, _, value, _) | - result = "+" and value = 0 - or - result = "-" and value = 1 - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_additive_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_additive_expression_def(this, result, _, _) or - swift_additive_expression_def(this, _, _, result) - } - } - - /** A class representing `array_literal` nodes. */ - class ArrayLiteral extends @swift_array_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ArrayLiteral" } - - /** Gets the node corresponding to the field `element`. */ - final Expression getElement(int i) { swift_array_literal_element(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_array_literal_element(this, _, result) } - } - - /** A class representing `array_type` nodes. */ - class ArrayType extends @swift_array_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ArrayType" } - - /** Gets the node corresponding to the field `element`. */ - final Type getElement() { swift_array_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_array_type_def(this, result) } - } - - /** A class representing `as_expression` nodes. */ - class AsExpression extends @swift_as_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AsExpression" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_as_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `operator`. */ - final AsOperator getOperator() { swift_as_expression_def(this, _, result, _) } - - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_as_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_as_expression_def(this, result, _, _) or - swift_as_expression_def(this, _, result, _) or - swift_as_expression_def(this, _, _, result) - } - } - - /** A class representing `as_operator` tokens. */ - class AsOperator extends @swift_token_as_operator, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AsOperator" } - } - - /** A class representing `assignment` nodes. */ - class Assignment extends @swift_assignment, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Assignment" } - - /** Gets the node corresponding to the field `operator`. */ - final string getOperator() { - exists(int value | swift_assignment_def(this, value, _, _) | - result = "%=" and value = 0 - or - result = "*=" and value = 1 - or - result = "+=" and value = 2 - or - result = "-=" and value = 3 - or - result = "/=" and value = 4 - or - result = "=" and value = 5 - ) - } - - /** Gets the node corresponding to the field `result`. */ - final Expression getResult() { swift_assignment_def(this, _, result, _) } - - /** Gets the node corresponding to the field `target`. */ - final DirectlyAssignableExpression getTarget() { swift_assignment_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_assignment_def(this, _, result, _) or swift_assignment_def(this, _, _, result) - } - } - - /** A class representing `associatedtype_declaration` nodes. */ - class AssociatedtypeDeclaration extends @swift_associatedtype_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AssociatedtypeDeclaration" } - - /** Gets the node corresponding to the field `default_value`. */ - final Type getDefaultValue() { swift_associatedtype_declaration_default_value(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_associatedtype_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `must_inherit`. */ - final Type getMustInherit() { swift_associatedtype_declaration_must_inherit(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_associatedtype_declaration_def(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_associatedtype_declaration_type_constraints(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_associatedtype_declaration_default_value(this, result) or - swift_associatedtype_declaration_modifiers(this, result) or - swift_associatedtype_declaration_must_inherit(this, result) or - swift_associatedtype_declaration_def(this, result) or - swift_associatedtype_declaration_type_constraints(this, result) - } - } - - /** A class representing `async_keyword` tokens. */ - class AsyncKeyword extends @swift_token_async_keyword, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AsyncKeyword" } - } - - /** A class representing `attribute` nodes. */ - class Attribute extends @swift_attribute, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Attribute" } + final override string getAPrimaryQlClass() { result = "ApplyPattern" } /** Gets the node corresponding to the field `argument`. */ - final Expression getArgument(int i) { swift_attribute_argument(this, i, result) } + final Pattern getArgument(int i) { unified_apply_pattern_argument(this, i, result) } - /** Gets the node corresponding to the field `argument_name`. */ - final SimpleIdentifier getArgumentName(int i) { swift_attribute_argument_name(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final UserType getName() { swift_attribute_def(this, result) } - - /** Gets the node corresponding to the field `param_ref`. */ - final SimpleIdentifier getParamRef(int i) { swift_attribute_param_ref(this, i, result) } - - /** Gets the node corresponding to the field `platform`. */ - final SimpleIdentifier getPlatform(int i) { swift_attribute_platform(this, i, result) } - - /** Gets the node corresponding to the field `version`. */ - final IntegerLiteral getVersion(int i) { swift_attribute_version(this, i, result) } + /** Gets the node corresponding to the field `constructor`. */ + final Expr getConstructor() { unified_apply_pattern_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_attribute_argument(this, _, result) or - swift_attribute_argument_name(this, _, result) or - swift_attribute_def(this, result) or - swift_attribute_param_ref(this, _, result) or - swift_attribute_platform(this, _, result) or - swift_attribute_version(this, _, result) + unified_apply_pattern_argument(this, _, result) or unified_apply_pattern_def(this, result) } } - /** A class representing `availability_condition` nodes. */ - class AvailabilityCondition extends @swift_availability_condition, AstNode { + /** A class representing `binary_expr` nodes. */ + class BinaryExpr extends @unified_binary_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AvailabilityCondition" } + final override string getAPrimaryQlClass() { result = "BinaryExpr" } - /** Gets the node corresponding to the field `platform`. */ - final Identifier getPlatform(int i) { swift_availability_condition_platform(this, i, result) } + /** Gets the node corresponding to the field `left`. */ + final Expr getLeft() { unified_binary_expr_def(this, result, _, _) } - /** Gets the node corresponding to the field `version`. */ - final IntegerLiteral getVersion(int i) { swift_availability_condition_version(this, i, result) } + /** Gets the node corresponding to the field `operator`. */ + final Operator getOperator() { unified_binary_expr_def(this, _, result, _) } + + /** Gets the node corresponding to the field `right`. */ + final Expr getRight() { unified_binary_expr_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_availability_condition_platform(this, _, result) or - swift_availability_condition_version(this, _, result) + unified_binary_expr_def(this, result, _, _) or + unified_binary_expr_def(this, _, result, _) or + unified_binary_expr_def(this, _, _, result) } } - /** A class representing `await_expression` nodes. */ - class AwaitExpression extends @swift_await_expression, AstNode { + /** A class representing `block_stmt` nodes. */ + class BlockStmt extends @unified_block_stmt, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "AwaitExpression" } + final override string getAPrimaryQlClass() { result = "BlockStmt" } - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_await_expression_def(this, result) } + /** Gets the node corresponding to the field `body`. */ + final Stmt getBody(int i) { unified_block_stmt_body(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_await_expression_def(this, result) } + final override AstNode getAFieldOrChild() { unified_block_stmt_body(this, _, result) } } - /** A class representing `bang` tokens. */ - class Bang extends @swift_token_bang, Token { + /** A class representing `call_expr` nodes. */ + class CallExpr extends @unified_call_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Bang" } - } + final override string getAPrimaryQlClass() { result = "CallExpr" } - /** A class representing `bin_literal` tokens. */ - class BinLiteral extends @swift_token_bin_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "BinLiteral" } - } - - /** A class representing `binding_pattern` nodes. */ - class BindingPattern extends @swift_binding_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "BindingPattern" } - - /** Gets the node corresponding to the field `binding`. */ - final ValueBindingPattern getBinding() { swift_binding_pattern_def(this, result, _) } - - /** Gets the node corresponding to the field `pattern`. */ - final Pattern getPattern() { swift_binding_pattern_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_binding_pattern_def(this, result, _) or swift_binding_pattern_def(this, _, result) - } - } - - /** A class representing `bitwise_operation` nodes. */ - class BitwiseOperation extends @swift_bitwise_operation, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "BitwiseOperation" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_bitwise_operation_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_bitwise_operation_def(this, _, value, _) | - result = "&" and value = 0 - or - result = "<<" and value = 1 - or - result = ">>" and value = 2 - or - result = "^" and value = 3 - or - result = "|" and value = 4 - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_bitwise_operation_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_bitwise_operation_def(this, result, _, _) or - swift_bitwise_operation_def(this, _, _, result) - } - } - - /** A class representing `block` nodes. */ - class Block extends @swift_block, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Block" } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_block_statement(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_block_statement(this, _, result) } - } - - /** A class representing `boolean_literal` tokens. */ - class BooleanLiteral extends @swift_token_boolean_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "BooleanLiteral" } - } - - /** A class representing `call_expression` nodes. */ - class CallExpression extends @swift_call_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CallExpression" } + /** Gets the node corresponding to the field `argument`. */ + final Expr getArgument(int i) { unified_call_expr_argument(this, i, result) } /** Gets the node corresponding to the field `function`. */ - final Expression getFunction() { swift_call_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `suffix`. */ - final CallSuffix getSuffix() { swift_call_expression_def(this, _, result) } + final Expr getFunction() { unified_call_expr_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_call_expression_def(this, result, _) or swift_call_expression_def(this, _, result) + unified_call_expr_argument(this, _, result) or unified_call_expr_def(this, result) } } - /** A class representing `call_suffix` nodes. */ - class CallSuffix extends @swift_call_suffix, AstNode { + class Condition extends @unified_condition, AstNode { } + + /** A class representing `empty_stmt` tokens. */ + class EmptyStmt extends @unified_token_empty_stmt, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CallSuffix" } - - /** Gets the node corresponding to the field `arguments`. */ - final ValueArguments getArguments() { swift_call_suffix_arguments(this, result) } - - /** Gets the node corresponding to the field `lambda`. */ - final LambdaLiteral getLambda(int i) { swift_call_suffix_lambda(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_call_suffix_name(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_call_suffix_arguments(this, result) or - swift_call_suffix_lambda(this, _, result) or - swift_call_suffix_name(this, _, result) - } + final override string getAPrimaryQlClass() { result = "EmptyStmt" } } - /** A class representing `capture_list` nodes. */ - class CaptureList extends @swift_capture_list, AstNode { + class Expr extends @unified_expr, AstNode { } + + /** A class representing `expr_condition` nodes. */ + class ExprCondition extends @unified_expr_condition, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CaptureList" } - - /** Gets the node corresponding to the field `item`. */ - final CaptureListItem getItem(int i) { swift_capture_list_item(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_capture_list_item(this, _, result) } - } - - /** A class representing `capture_list_item` nodes. */ - class CaptureListItem extends @swift_capture_list_item, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CaptureListItem" } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_capture_list_item_def(this, result) } - - /** Gets the node corresponding to the field `ownership`. */ - final OwnershipModifier getOwnership() { swift_capture_list_item_ownership(this, result) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_capture_list_item_value(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_capture_list_item_def(this, result) or - swift_capture_list_item_ownership(this, result) or - swift_capture_list_item_value(this, result) - } - } - - /** A class representing `case_pattern` nodes. */ - class CasePattern extends @swift_case_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CasePattern" } - - /** Gets the node corresponding to the field `arguments`. */ - final TuplePattern getArguments() { swift_case_pattern_arguments(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_case_pattern_def(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final UserType getType() { swift_case_pattern_type(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_case_pattern_arguments(this, result) or - swift_case_pattern_def(this, result) or - swift_case_pattern_type(this, result) - } - } - - /** A class representing `catch_block` nodes. */ - class CatchBlock extends @swift_catch_block, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CatchBlock" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_catch_block_def(this, result, _) } - - /** Gets the node corresponding to the field `error`. */ - final Pattern getError() { swift_catch_block_error(this, result) } - - /** Gets the node corresponding to the field `keyword`. */ - final CatchKeyword getKeyword() { swift_catch_block_def(this, _, result) } - - /** Gets the node corresponding to the field `where`. */ - final WhereClause getWhere() { swift_catch_block_where(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_catch_block_def(this, result, _) or - swift_catch_block_error(this, result) or - swift_catch_block_def(this, _, result) or - swift_catch_block_where(this, result) - } - } - - /** A class representing `catch_keyword` tokens. */ - class CatchKeyword extends @swift_token_catch_keyword, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CatchKeyword" } - } - - /** A class representing `check_expression` nodes. */ - class CheckExpression extends @swift_check_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CheckExpression" } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_check_expression_def(this, value, _, _) | - (result = "is" and value = 0) - ) - } - - /** Gets the node corresponding to the field `target`. */ - final Expression getTarget() { swift_check_expression_def(this, _, result, _) } - - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_check_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_check_expression_def(this, _, result, _) or - swift_check_expression_def(this, _, _, result) - } - } - - /** A class representing `class_body` nodes. */ - class ClassBody extends @swift_class_body, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ClassBody" } - - /** Gets the node corresponding to the field `member`. */ - final TypeLevelDeclaration getMember(int i) { swift_class_body_member(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_class_body_member(this, _, result) } - } - - /** A class representing `class_declaration` nodes. */ - class ClassDeclaration extends @swift_class_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ClassDeclaration" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_class_declaration_attribute(this, i, result) } - - /** Gets the node corresponding to the field `body`. */ - final AstNode getBody() { swift_class_declaration_def(this, result, _, _) } - - /** Gets the node corresponding to the field `declaration_kind`. */ - final string getDeclarationKind() { - exists(int value | swift_class_declaration_def(this, _, value, _) | - result = "actor" and value = 0 - or - result = "class" and value = 1 - or - result = "enum" and value = 2 - or - result = "extension" and value = 3 - or - result = "struct" and value = 4 - ) - } - - /** Gets the node corresponding to the field `inherits`. */ - final InheritanceSpecifier getInherits(int i) { - swift_class_declaration_inherits(this, i, result) - } - - /** Gets the node corresponding to the field `modifiers`. */ - final AstNode getModifiers(int i) { swift_class_declaration_modifiers(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_class_declaration_def(this, _, _, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_class_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_class_declaration_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_class_declaration_attribute(this, _, result) or - swift_class_declaration_def(this, result, _, _) or - swift_class_declaration_inherits(this, _, result) or - swift_class_declaration_modifiers(this, _, result) or - swift_class_declaration_def(this, _, _, result) or - swift_class_declaration_type_constraints(this, result) or - swift_class_declaration_type_parameters(this, result) - } - } - - /** A class representing `comment` tokens. */ - class Comment extends @swift_token_comment, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Comment" } - } - - /** A class representing `comparison_expression` nodes. */ - class ComparisonExpression extends @swift_comparison_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ComparisonExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_comparison_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_comparison_expression_def(this, _, value, _) | - result = "<" and value = 0 - or - result = "<=" and value = 1 - or - result = ">" and value = 2 - or - result = ">=" and value = 3 - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_comparison_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_comparison_expression_def(this, result, _, _) or - swift_comparison_expression_def(this, _, _, result) - } - } - - /** A class representing `compilation_condition` nodes. */ - class CompilationCondition extends @swift_compilation_condition, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CompilationCondition" } - - /** Gets the node corresponding to the field `inner`. */ - final CompilationCondition getInner() { swift_compilation_condition_inner(this, result) } - - /** Gets the node corresponding to the field `lhs`. */ - final CompilationCondition getLhs() { swift_compilation_condition_lhs(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_compilation_condition_name(this, i, result) } - - /** Gets the node corresponding to the field `operand`. */ - final CompilationCondition getOperand() { swift_compilation_condition_operand(this, result) } - - /** Gets the node corresponding to the field `rhs`. */ - final CompilationCondition getRhs() { swift_compilation_condition_rhs(this, result) } - - /** Gets the node corresponding to the field `value`. */ - final BooleanLiteral getValue() { swift_compilation_condition_value(this, result) } - - /** Gets the node corresponding to the field `version`. */ - final IntegerLiteral getVersion(int i) { swift_compilation_condition_version(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_compilation_condition_inner(this, result) or - swift_compilation_condition_lhs(this, result) or - swift_compilation_condition_name(this, _, result) or - swift_compilation_condition_operand(this, result) or - swift_compilation_condition_rhs(this, result) or - swift_compilation_condition_value(this, result) or - swift_compilation_condition_version(this, _, result) - } - } - - /** A class representing `computed_getter` nodes. */ - class ComputedGetter extends @swift_computed_getter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ComputedGetter" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_computed_getter_attribute(this, i, result) } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_computed_getter_body(this, result) } - - /** Gets the node corresponding to the field `specifier`. */ - final GetterSpecifier getSpecifier() { swift_computed_getter_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_computed_getter_attribute(this, _, result) or - swift_computed_getter_body(this, result) or - swift_computed_getter_def(this, result) - } - } - - /** A class representing `computed_modify` nodes. */ - class ComputedModify extends @swift_computed_modify, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ComputedModify" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_computed_modify_attribute(this, i, result) } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_computed_modify_body(this, result) } - - /** Gets the node corresponding to the field `specifier`. */ - final ModifySpecifier getSpecifier() { swift_computed_modify_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_computed_modify_attribute(this, _, result) or - swift_computed_modify_body(this, result) or - swift_computed_modify_def(this, result) - } - } - - /** A class representing `computed_property` nodes. */ - class ComputedProperty extends @swift_computed_property, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ComputedProperty" } - - /** Gets the node corresponding to the field `accessor`. */ - final AstNode getAccessor(int i) { swift_computed_property_accessor(this, i, result) } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_computed_property_statement(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_computed_property_accessor(this, _, result) or - swift_computed_property_statement(this, _, result) - } - } - - /** A class representing `computed_setter` nodes. */ - class ComputedSetter extends @swift_computed_setter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ComputedSetter" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_computed_setter_attribute(this, i, result) } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_computed_setter_body(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final SimpleIdentifier getParameter() { swift_computed_setter_parameter(this, result) } - - /** Gets the node corresponding to the field `specifier`. */ - final SetterSpecifier getSpecifier() { swift_computed_setter_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_computed_setter_attribute(this, _, result) or - swift_computed_setter_body(this, result) or - swift_computed_setter_parameter(this, result) or - swift_computed_setter_def(this, result) - } - } - - /** A class representing `conjunction_expression` nodes. */ - class ConjunctionExpression extends @swift_conjunction_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ConjunctionExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_conjunction_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_conjunction_expression_def(this, _, value, _) | - (result = "&&" and value = 0) - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_conjunction_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_conjunction_expression_def(this, result, _, _) or - swift_conjunction_expression_def(this, _, _, result) - } - } - - /** A class representing `constructor_expression` nodes. */ - class ConstructorExpression extends @swift_constructor_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ConstructorExpression" } - - /** Gets the node corresponding to the field `constructed_type`. */ - final AstNode getConstructedType() { swift_constructor_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `suffix`. */ - final ConstructorSuffix getSuffix() { swift_constructor_expression_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_constructor_expression_def(this, result, _) or - swift_constructor_expression_def(this, _, result) - } - } - - /** A class representing `constructor_suffix` nodes. */ - class ConstructorSuffix extends @swift_constructor_suffix, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ConstructorSuffix" } - - /** Gets the node corresponding to the field `arguments`. */ - final ValueArguments getArguments() { swift_constructor_suffix_arguments(this, result) } - - /** Gets the node corresponding to the field `lambda`. */ - final LambdaLiteral getLambda(int i) { swift_constructor_suffix_lambda(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_constructor_suffix_name(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_constructor_suffix_arguments(this, result) or - swift_constructor_suffix_lambda(this, _, result) or - swift_constructor_suffix_name(this, _, result) - } - } - - /** A class representing `control_transfer_statement` nodes. */ - class ControlTransferStatement extends @swift_control_transfer_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ControlTransferStatement" } - - /** Gets the node corresponding to the field `kind`. */ - final AstNode getKind() { swift_control_transfer_statement_def(this, result) } - - /** Gets the node corresponding to the field `result`. */ - final Expression getResult() { swift_control_transfer_statement_result(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_control_transfer_statement_def(this, result) or - swift_control_transfer_statement_result(this, result) - } - } - - /** A class representing `custom_operator` tokens. */ - class CustomOperator extends @swift_token_custom_operator, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "CustomOperator" } - } - - /** A class representing `default_keyword` tokens. */ - class DefaultKeyword extends @swift_token_default_keyword, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DefaultKeyword" } - } - - /** A class representing `deinit_declaration` nodes. */ - class DeinitDeclaration extends @swift_deinit_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DeinitDeclaration" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_deinit_declaration_def(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_deinit_declaration_modifiers(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_deinit_declaration_def(this, result) or swift_deinit_declaration_modifiers(this, result) - } - } - - /** A class representing `deprecated_operator_declaration_body` nodes. */ - class DeprecatedOperatorDeclarationBody extends @swift_deprecated_operator_declaration_body, - AstNode - { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DeprecatedOperatorDeclarationBody" } - - /** Gets the node corresponding to the field `entry`. */ - final AstNode getEntry(int i) { - swift_deprecated_operator_declaration_body_entry(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_deprecated_operator_declaration_body_entry(this, _, result) - } - } - - /** A class representing `diagnostic` tokens. */ - class Diagnostic extends @swift_token_diagnostic, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Diagnostic" } - } - - /** A class representing `dictionary_literal` nodes. */ - class DictionaryLiteral extends @swift_dictionary_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DictionaryLiteral" } - - /** Gets the node corresponding to the field `element`. */ - final DictionaryLiteralItem getElement(int i) { - swift_dictionary_literal_element(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_dictionary_literal_element(this, _, result) } - } - - /** A class representing `dictionary_literal_item` nodes. */ - class DictionaryLiteralItem extends @swift_dictionary_literal_item, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DictionaryLiteralItem" } - - /** Gets the node corresponding to the field `key`. */ - final Expression getKey() { swift_dictionary_literal_item_def(this, result, _) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_dictionary_literal_item_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_dictionary_literal_item_def(this, result, _) or - swift_dictionary_literal_item_def(this, _, result) - } - } - - /** A class representing `dictionary_type` nodes. */ - class DictionaryType extends @swift_dictionary_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DictionaryType" } - - /** Gets the node corresponding to the field `key`. */ - final Type getKey() { swift_dictionary_type_def(this, result, _) } - - /** Gets the node corresponding to the field `value`. */ - final Type getValue() { swift_dictionary_type_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_dictionary_type_def(this, result, _) or swift_dictionary_type_def(this, _, result) - } - } - - /** A class representing `didset_clause` nodes. */ - class DidsetClause extends @swift_didset_clause, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DidsetClause" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_didset_clause_def(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_didset_clause_modifiers(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final SimpleIdentifier getParameter() { swift_didset_clause_parameter(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_didset_clause_def(this, result) or - swift_didset_clause_modifiers(this, result) or - swift_didset_clause_parameter(this, result) - } - } - - /** A class representing `directive` nodes. */ - class Directive extends @swift_directive, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Directive" } - - /** Gets the node corresponding to the field `condition`. */ - final CompilationCondition getCondition() { swift_directive_condition(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_directive_condition(this, result) } - } - - /** A class representing `directly_assignable_expression` nodes. */ - class DirectlyAssignableExpression extends @swift_directly_assignable_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DirectlyAssignableExpression" } + final override string getAPrimaryQlClass() { result = "ExprCondition" } /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_directly_assignable_expression_def(this, result) } + final Expr getExpr() { unified_expr_condition_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_directly_assignable_expression_def(this, result) - } + final override AstNode getAFieldOrChild() { unified_expr_condition_def(this, result) } } - /** A class representing `disjunction_expression` nodes. */ - class DisjunctionExpression extends @swift_disjunction_expression, AstNode { + /** A class representing `expr_stmt` nodes. */ + class ExprStmt extends @unified_expr_stmt, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DisjunctionExpression" } + final override string getAPrimaryQlClass() { result = "ExprStmt" } - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_disjunction_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_disjunction_expression_def(this, _, value, _) | - (result = "||" and value = 0) - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_disjunction_expression_def(this, _, _, result) } + /** Gets the node corresponding to the field `expr`. */ + final Expr getExpr() { unified_expr_stmt_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_disjunction_expression_def(this, result, _, _) or - swift_disjunction_expression_def(this, _, _, result) - } + final override AstNode getAFieldOrChild() { unified_expr_stmt_def(this, result) } } - /** A class representing `do_statement` nodes. */ - class DoStatement extends @swift_do_statement, AstNode { + /** A class representing `guard_if_stmt` nodes. */ + class GuardIfStmt extends @unified_guard_if_stmt, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "DoStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_do_statement_def(this, result) } - - /** Gets the node corresponding to the field `catch`. */ - final CatchBlock getCatch(int i) { swift_do_statement_catch(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_do_statement_def(this, result) or swift_do_statement_catch(this, _, result) - } - } - - /** A class representing `enum_case_entry` nodes. */ - class EnumCaseEntry extends @swift_enum_case_entry, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EnumCaseEntry" } - - /** Gets the node corresponding to the field `data_contents`. */ - final EnumTypeParameters getDataContents() { swift_enum_case_entry_data_contents(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_enum_case_entry_def(this, result) } - - /** Gets the node corresponding to the field `raw_value`. */ - final Expression getRawValue() { swift_enum_case_entry_raw_value(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_enum_case_entry_data_contents(this, result) or - swift_enum_case_entry_def(this, result) or - swift_enum_case_entry_raw_value(this, result) - } - } - - /** A class representing `enum_class_body` nodes. */ - class EnumClassBody extends @swift_enum_class_body, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EnumClassBody" } - - /** Gets the node corresponding to the field `member`. */ - final AstNode getMember(int i) { swift_enum_class_body_member(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_enum_class_body_member(this, _, result) } - } - - /** A class representing `enum_entry` nodes. */ - class EnumEntry extends @swift_enum_entry, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EnumEntry" } - - /** Gets the node corresponding to the field `case`. */ - final EnumCaseEntry getCase(int i) { swift_enum_entry_case(this, i, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_enum_entry_modifiers(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_enum_entry_case(this, _, result) or swift_enum_entry_modifiers(this, result) - } - } - - /** A class representing `enum_type_parameter` nodes. */ - class EnumTypeParameter extends @swift_enum_type_parameter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EnumTypeParameter" } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue() { swift_enum_type_parameter_default_value(this, result) } - - /** Gets the node corresponding to the field `external_name`. */ - final WildcardPattern getExternalName() { - swift_enum_type_parameter_external_name(this, result) - } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_enum_type_parameter_name(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_enum_type_parameter_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_enum_type_parameter_default_value(this, result) or - swift_enum_type_parameter_external_name(this, result) or - swift_enum_type_parameter_name(this, result) or - swift_enum_type_parameter_def(this, result) - } - } - - /** A class representing `enum_type_parameters` nodes. */ - class EnumTypeParameters extends @swift_enum_type_parameters, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EnumTypeParameters" } - - /** Gets the node corresponding to the field `parameter`. */ - final EnumTypeParameter getParameter(int i) { - swift_enum_type_parameters_parameter(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_enum_type_parameters_parameter(this, _, result) - } - } - - /** A class representing `equality_constraint` nodes. */ - class EqualityConstraint extends @swift_equality_constraint, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EqualityConstraint" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_equality_constraint_attribute(this, i, result) } - - /** Gets the node corresponding to the field `constrained_type`. */ - final AstNode getConstrainedType() { swift_equality_constraint_def(this, result, _) } - - /** Gets the node corresponding to the field `must_equal`. */ - final Type getMustEqual() { swift_equality_constraint_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_equality_constraint_attribute(this, _, result) or - swift_equality_constraint_def(this, result, _) or - swift_equality_constraint_def(this, _, result) - } - } - - /** A class representing `equality_expression` nodes. */ - class EqualityExpression extends @swift_equality_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "EqualityExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_equality_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_equality_expression_def(this, _, value, _) | - result = "!=" and value = 0 - or - result = "!==" and value = 1 - or - result = "==" and value = 2 - or - result = "===" and value = 3 - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_equality_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_equality_expression_def(this, result, _, _) or - swift_equality_expression_def(this, _, _, result) - } - } - - /** A class representing `existential_type` nodes. */ - class ExistentialType extends @swift_existential_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ExistentialType" } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_existential_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_existential_type_def(this, result) } - } - - class Expression extends @swift_expression, AstNode { } - - /** A class representing `external_macro_definition` nodes. */ - class ExternalMacroDefinition extends @swift_external_macro_definition, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ExternalMacroDefinition" } - - /** Gets the node corresponding to the field `arguments`. */ - final ValueArguments getArguments() { swift_external_macro_definition_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_external_macro_definition_def(this, result) } - } - - /** A class representing `for_statement` nodes. */ - class ForStatement extends @swift_for_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ForStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_for_statement_def(this, result, _, _) } - - /** Gets the node corresponding to the field `collection`. */ - final Expression getCollection() { swift_for_statement_def(this, _, result, _) } - - /** Gets the node corresponding to the field `item`. */ - final Pattern getItem() { swift_for_statement_def(this, _, _, result) } - - /** Gets the node corresponding to the field `try`. */ - final TryOperator getTry() { swift_for_statement_try(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType() { swift_for_statement_type(this, result) } - - /** Gets the node corresponding to the field `where`. */ - final WhereClause getWhere() { swift_for_statement_where(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_for_statement_def(this, result, _, _) or - swift_for_statement_def(this, _, result, _) or - swift_for_statement_def(this, _, _, result) or - swift_for_statement_try(this, result) or - swift_for_statement_type(this, result) or - swift_for_statement_where(this, result) - } - } - - /** A class representing `fully_open_range` tokens. */ - class FullyOpenRange extends @swift_token_fully_open_range, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FullyOpenRange" } - } - - /** A class representing `function_declaration` nodes. */ - class FunctionDeclaration extends @swift_function_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionDeclaration" } - - /** Gets the node corresponding to the field `async`. */ - final ReservedWord getAsync() { swift_function_declaration_async(this, result) } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_function_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `modifiers`. */ - final AstNode getModifiers(int i) { swift_function_declaration_modifiers(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_function_declaration_def(this, _, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final FunctionParameter getParameter(int i) { - swift_function_declaration_parameter(this, i, result) - } - - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType() { swift_function_declaration_return_type(this, result) } - - /** Gets the node corresponding to the field `throws`. */ - final AstNode getThrows() { swift_function_declaration_throws(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_function_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_function_declaration_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_function_declaration_async(this, result) or - swift_function_declaration_def(this, result, _) or - swift_function_declaration_modifiers(this, _, result) or - swift_function_declaration_def(this, _, result) or - swift_function_declaration_parameter(this, _, result) or - swift_function_declaration_return_type(this, result) or - swift_function_declaration_throws(this, result) or - swift_function_declaration_type_constraints(this, result) or - swift_function_declaration_type_parameters(this, result) - } - } - - /** A class representing `function_modifier` tokens. */ - class FunctionModifier extends @swift_token_function_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionModifier" } - } - - /** A class representing `function_parameter` nodes. */ - class FunctionParameter extends @swift_function_parameter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionParameter" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute() { swift_function_parameter_attribute(this, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue() { swift_function_parameter_default_value(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter() { swift_function_parameter_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_function_parameter_attribute(this, result) or - swift_function_parameter_default_value(this, result) or - swift_function_parameter_def(this, result) - } - } - - /** A class representing `function_type` nodes. */ - class FunctionType extends @swift_function_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionType" } - - /** Gets the node corresponding to the field `async`. */ - final ReservedWord getAsync() { swift_function_type_async(this, result) } - - /** Gets the node corresponding to the field `params`. */ - final UnannotatedType getParams() { swift_function_type_def(this, result, _) } - - /** Gets the node corresponding to the field `return_type`. */ - final Type getReturnType() { swift_function_type_def(this, _, result) } - - /** Gets the node corresponding to the field `throws`. */ - final AstNode getThrows() { swift_function_type_throws(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_function_type_async(this, result) or - swift_function_type_def(this, result, _) or - swift_function_type_def(this, _, result) or - swift_function_type_throws(this, result) - } - } - - /** A class representing `getter_specifier` nodes. */ - class GetterSpecifier extends @swift_getter_specifier, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "GetterSpecifier" } - - /** Gets the node corresponding to the field `effect`. */ - final AstNode getEffect(int i) { swift_getter_specifier_effect(this, i, result) } - - /** Gets the node corresponding to the field `mutation`. */ - final MutationModifier getMutation() { swift_getter_specifier_mutation(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_getter_specifier_effect(this, _, result) or - swift_getter_specifier_mutation(this, result) - } - } - - class GlobalDeclaration extends @swift_global_declaration, AstNode { } - - /** A class representing `guard_statement` nodes. */ - class GuardStatement extends @swift_guard_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "GuardStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_guard_statement_def(this, result) } + final override string getAPrimaryQlClass() { result = "GuardIfStmt" } /** Gets the node corresponding to the field `condition`. */ - final IfCondition getCondition(int i) { swift_guard_statement_condition(this, i, result) } + final Condition getCondition() { unified_guard_if_stmt_def(this, result, _) } + + /** Gets the node corresponding to the field `else`. */ + final Stmt getElse() { unified_guard_if_stmt_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_guard_statement_def(this, result) or swift_guard_statement_condition(this, _, result) + unified_guard_if_stmt_def(this, result, _) or unified_guard_if_stmt_def(this, _, result) } } - /** A class representing `hex_literal` tokens. */ - class HexLiteral extends @swift_token_hex_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "HexLiteral" } - } - - /** A class representing `identifier` nodes. */ - class Identifier extends @swift_identifier, AstNode { + /** A class representing `identifier` tokens. */ + class Identifier extends @unified_token_identifier, Token { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Identifier" } - - /** Gets the node corresponding to the field `part`. */ - final SimpleIdentifier getPart(int i) { swift_identifier_part(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_identifier_part(this, _, result) } } - /** A class representing `if_condition` nodes. */ - class IfCondition extends @swift_if_condition, AstNode { + /** A class representing `if_stmt` nodes. */ + class IfStmt extends @unified_if_stmt, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "IfCondition" } - - /** Gets the node corresponding to the field `kind`. */ - final AstNode getKind() { swift_if_condition_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_if_condition_def(this, result) } - } - - /** A class representing `if_let_binding` nodes. */ - class IfLetBinding extends @swift_if_let_binding, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "IfLetBinding" } - - /** Gets the node corresponding to the field `pattern`. */ - final Pattern getPattern() { swift_if_let_binding_def(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType() { swift_if_let_binding_type(this, result) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_if_let_binding_value(this, result) } - - /** Gets the node corresponding to the field `where`. */ - final WhereClause getWhere() { swift_if_let_binding_where(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_if_let_binding_def(this, result) or - swift_if_let_binding_type(this, result) or - swift_if_let_binding_value(this, result) or - swift_if_let_binding_where(this, result) - } - } - - /** A class representing `if_statement` nodes. */ - class IfStatement extends @swift_if_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "IfStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_if_statement_def(this, result) } + final override string getAPrimaryQlClass() { result = "IfStmt" } /** Gets the node corresponding to the field `condition`. */ - final IfCondition getCondition(int i) { swift_if_statement_condition(this, i, result) } + final Condition getCondition() { unified_if_stmt_def(this, result) } - /** Gets the node corresponding to the field `else_branch`. */ - final AstNode getElseBranch() { swift_if_statement_else_branch(this, result) } + /** Gets the node corresponding to the field `else`. */ + final Stmt getElse() { unified_if_stmt_else(this, result) } + + /** Gets the node corresponding to the field `then`. */ + final Stmt getThen() { unified_if_stmt_then(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_statement_def(this, result) or - swift_if_statement_condition(this, _, result) or - swift_if_statement_else_branch(this, result) + unified_if_stmt_def(this, result) or + unified_if_stmt_else(this, result) or + unified_if_stmt_then(this, result) } } - /** A class representing `implicitly_unwrapped_type` nodes. */ - class ImplicitlyUnwrappedType extends @swift_implicitly_unwrapped_type, AstNode { + /** A class representing `ignore_pattern` tokens. */ + class IgnorePattern extends @unified_token_ignore_pattern, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ImplicitlyUnwrappedType" } - - /** Gets the node corresponding to the field `name`. */ - final Type getName() { swift_implicitly_unwrapped_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_implicitly_unwrapped_type_def(this, result) } + final override string getAPrimaryQlClass() { result = "IgnorePattern" } } - /** A class representing `import_declaration` nodes. */ - class ImportDeclaration extends @swift_import_declaration, AstNode { + /** A class representing `int_literal` tokens. */ + class IntLiteral extends @unified_token_int_literal, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ImportDeclaration" } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_import_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final Identifier getName() { swift_import_declaration_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_import_declaration_modifiers(this, result) or swift_import_declaration_def(this, result) - } + final override string getAPrimaryQlClass() { result = "IntLiteral" } } - /** A class representing `infix_expression` nodes. */ - class InfixExpression extends @swift_infix_expression, AstNode { + /** A class representing `lambda_expr` nodes. */ + class LambdaExpr extends @unified_lambda_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InfixExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_infix_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final CustomOperator getOp() { swift_infix_expression_def(this, _, result, _) } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_infix_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_infix_expression_def(this, result, _, _) or - swift_infix_expression_def(this, _, result, _) or - swift_infix_expression_def(this, _, _, result) - } - } - - /** A class representing `inheritance_constraint` nodes. */ - class InheritanceConstraint extends @swift_inheritance_constraint, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InheritanceConstraint" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_inheritance_constraint_attribute(this, i, result) } - - /** Gets the node corresponding to the field `constrained_type`. */ - final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result, _) } - - /** Gets the node corresponding to the field `inherits_from`. */ - final AstNode getInheritsFrom() { swift_inheritance_constraint_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_inheritance_constraint_attribute(this, _, result) or - swift_inheritance_constraint_def(this, result, _) or - swift_inheritance_constraint_def(this, _, result) - } - } - - /** A class representing `inheritance_modifier` tokens. */ - class InheritanceModifier extends @swift_token_inheritance_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InheritanceModifier" } - } - - /** A class representing `inheritance_specifier` nodes. */ - class InheritanceSpecifier extends @swift_inheritance_specifier, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InheritanceSpecifier" } - - /** Gets the node corresponding to the field `inherits_from`. */ - final AstNode getInheritsFrom() { swift_inheritance_specifier_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_inheritance_specifier_def(this, result) } - } - - /** A class representing `init_declaration` nodes. */ - class InitDeclaration extends @swift_init_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InitDeclaration" } - - /** Gets the node corresponding to the field `async`. */ - final ReservedWord getAsync() { swift_init_declaration_async(this, result) } - - /** Gets the node corresponding to the field `bang`. */ - final Bang getBang() { swift_init_declaration_bang(this, result) } + final override string getAPrimaryQlClass() { result = "LambdaExpr" } /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_init_declaration_body(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_init_declaration_modifiers(this, result) } + final AstNode getBody() { unified_lambda_expr_def(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final FunctionParameter getParameter(int i) { - swift_init_declaration_parameter(this, i, result) - } - - /** Gets the node corresponding to the field `throws`. */ - final AstNode getThrows() { swift_init_declaration_throws(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_init_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_init_declaration_type_parameters(this, result) - } + final Parameter getParameter(int i) { unified_lambda_expr_parameter(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_init_declaration_async(this, result) or - swift_init_declaration_bang(this, result) or - swift_init_declaration_body(this, result) or - swift_init_declaration_modifiers(this, result) or - swift_init_declaration_parameter(this, _, result) or - swift_init_declaration_throws(this, result) or - swift_init_declaration_type_constraints(this, result) or - swift_init_declaration_type_parameters(this, result) + unified_lambda_expr_def(this, result) or unified_lambda_expr_parameter(this, _, result) } } - /** A class representing `integer_literal` tokens. */ - class IntegerLiteral extends @swift_token_integer_literal, Token { + /** A class representing `let_pattern_condition` nodes. */ + class LetPatternCondition extends @unified_let_pattern_condition, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "IntegerLiteral" } - } + final override string getAPrimaryQlClass() { result = "LetPatternCondition" } - /** A class representing `interpolated_expression` nodes. */ - class InterpolatedExpression extends @swift_interpolated_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "InterpolatedExpression" } - - /** Gets the node corresponding to the field `name`. */ - final ValueArgumentLabel getName() { swift_interpolated_expression_name(this, result) } - - /** Gets the node corresponding to the field `reference_specifier`. */ - final ValueArgumentLabel getReferenceSpecifier(int i) { - swift_interpolated_expression_reference_specifier(this, i, result) - } - - /** Gets the node corresponding to the field `type_modifiers`. */ - final TypeModifiers getTypeModifiers() { - swift_interpolated_expression_type_modifiers(this, result) - } + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { unified_let_pattern_condition_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_interpolated_expression_value(this, result) } + final Expr getValue() { unified_let_pattern_condition_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_interpolated_expression_name(this, result) or - swift_interpolated_expression_reference_specifier(this, _, result) or - swift_interpolated_expression_type_modifiers(this, result) or - swift_interpolated_expression_value(this, result) + unified_let_pattern_condition_def(this, result, _) or + unified_let_pattern_condition_def(this, _, result) } } - /** A class representing `key_path_component` nodes. */ - class KeyPathComponent extends @swift_key_path_component, AstNode { + /** A class representing `member_access_expr` nodes. */ + class MemberAccessExpr extends @unified_member_access_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "KeyPathComponent" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_key_path_component_name(this, result) } - - /** Gets the node corresponding to the field `postfix`. */ - final KeyPathPostfix getPostfix(int i) { swift_key_path_component_postfix(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_key_path_component_name(this, result) or - swift_key_path_component_postfix(this, _, result) - } - } - - /** A class representing `key_path_expression` nodes. */ - class KeyPathExpression extends @swift_key_path_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "KeyPathExpression" } - - /** Gets the node corresponding to the field `component`. */ - final KeyPathComponent getComponent(int i) { - swift_key_path_expression_component(this, i, result) - } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_key_path_expression_type(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_key_path_expression_component(this, _, result) or - swift_key_path_expression_type(this, result) - } - } - - /** A class representing `key_path_postfix` nodes. */ - class KeyPathPostfix extends @swift_key_path_postfix, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "KeyPathPostfix" } - - /** Gets the node corresponding to the field `argument`. */ - final ValueArgument getArgument(int i) { swift_key_path_postfix_argument(this, i, result) } - - /** Gets the node corresponding to the field `force_unwrap`. */ - final Bang getForceUnwrap() { swift_key_path_postfix_force_unwrap(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_key_path_postfix_argument(this, _, result) or - swift_key_path_postfix_force_unwrap(this, result) - } - } - - /** A class representing `key_path_string_expression` nodes. */ - class KeyPathStringExpression extends @swift_key_path_string_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "KeyPathStringExpression" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_key_path_string_expression_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_key_path_string_expression_def(this, result) } - } - - /** A class representing `lambda_function_type` nodes. */ - class LambdaFunctionType extends @swift_lambda_function_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LambdaFunctionType" } - - /** Gets the node corresponding to the field `async`. */ - final ReservedWord getAsync() { swift_lambda_function_type_async(this, result) } - - /** Gets the node corresponding to the field `params`. */ - final LambdaFunctionTypeParameters getParams() { - swift_lambda_function_type_params(this, result) - } - - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType() { swift_lambda_function_type_return_type(this, result) } - - /** Gets the node corresponding to the field `throws`. */ - final AstNode getThrows() { swift_lambda_function_type_throws(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_lambda_function_type_async(this, result) or - swift_lambda_function_type_params(this, result) or - swift_lambda_function_type_return_type(this, result) or - swift_lambda_function_type_throws(this, result) - } - } - - /** A class representing `lambda_function_type_parameters` nodes. */ - class LambdaFunctionTypeParameters extends @swift_lambda_function_type_parameters, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LambdaFunctionTypeParameters" } - - /** Gets the node corresponding to the field `parameter`. */ - final LambdaParameter getParameter(int i) { - swift_lambda_function_type_parameters_parameter(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_lambda_function_type_parameters_parameter(this, _, result) - } - } - - /** A class representing `lambda_literal` nodes. */ - class LambdaLiteral extends @swift_lambda_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LambdaLiteral" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_lambda_literal_attribute(this, i, result) } - - /** Gets the node corresponding to the field `captures`. */ - final CaptureList getCaptures() { swift_lambda_literal_captures(this, result) } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_lambda_literal_statement(this, i, result) } - - /** Gets the node corresponding to the field `type`. */ - final LambdaFunctionType getType() { swift_lambda_literal_type(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_lambda_literal_attribute(this, _, result) or - swift_lambda_literal_captures(this, result) or - swift_lambda_literal_statement(this, _, result) or - swift_lambda_literal_type(this, result) - } - } - - /** A class representing `lambda_parameter` nodes. */ - class LambdaParameter extends @swift_lambda_parameter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LambdaParameter" } - - /** Gets the node corresponding to the field `external_name`. */ - final SimpleIdentifier getExternalName() { swift_lambda_parameter_external_name(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final ParameterModifiers getModifiers() { swift_lambda_parameter_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_lambda_parameter_def(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_lambda_parameter_type(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_lambda_parameter_external_name(this, result) or - swift_lambda_parameter_modifiers(this, result) or - swift_lambda_parameter_def(this, result) or - swift_lambda_parameter_type(this, result) - } - } - - /** A class representing `line_str_text` tokens. */ - class LineStrText extends @swift_token_line_str_text, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LineStrText" } - } - - /** A class representing `line_string_literal` nodes. */ - class LineStringLiteral extends @swift_line_string_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "LineStringLiteral" } - - /** Gets the node corresponding to the field `interpolation`. */ - final InterpolatedExpression getInterpolation(int i) { - swift_line_string_literal_interpolation(this, i, result) - } - - /** Gets the node corresponding to the field `text`. */ - final AstNode getText(int i) { swift_line_string_literal_text(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_line_string_literal_interpolation(this, _, result) or - swift_line_string_literal_text(this, _, result) - } - } - - class LocalDeclaration extends @swift_local_declaration, AstNode { } - - /** A class representing `macro_declaration` nodes. */ - class MacroDeclaration extends @swift_macro_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MacroDeclaration" } - - /** Gets the node corresponding to the field `definition`. */ - final MacroDefinition getDefinition() { swift_macro_declaration_definition(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_macro_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_macro_declaration_def(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final FunctionParameter getParameter(int i) { - swift_macro_declaration_parameter(this, i, result) - } - - /** Gets the node corresponding to the field `return_type`. */ - final UnannotatedType getReturnType() { swift_macro_declaration_return_type(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_macro_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_macro_declaration_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_macro_declaration_definition(this, result) or - swift_macro_declaration_modifiers(this, result) or - swift_macro_declaration_def(this, result) or - swift_macro_declaration_parameter(this, _, result) or - swift_macro_declaration_return_type(this, result) or - swift_macro_declaration_type_constraints(this, result) or - swift_macro_declaration_type_parameters(this, result) - } - } - - /** A class representing `macro_definition` nodes. */ - class MacroDefinition extends @swift_macro_definition, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MacroDefinition" } - - /** Gets the node corresponding to the field `body`. */ - final AstNode getBody() { swift_macro_definition_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_macro_definition_def(this, result) } - } - - /** A class representing `macro_invocation` nodes. */ - class MacroInvocation extends @swift_macro_invocation, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MacroInvocation" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_macro_invocation_def(this, result, _) } - - /** Gets the node corresponding to the field `suffix`. */ - final CallSuffix getSuffix() { swift_macro_invocation_def(this, _, result) } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_macro_invocation_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_macro_invocation_def(this, result, _) or - swift_macro_invocation_def(this, _, result) or - swift_macro_invocation_type_parameters(this, result) - } - } - - /** A class representing `member_modifier` tokens. */ - class MemberModifier extends @swift_token_member_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MemberModifier" } - } - - /** A class representing `metatype` nodes. */ - class Metatype extends @swift_metatype, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Metatype" } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_metatype_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_metatype_def(this, result) } - } - - /** A class representing `modifiers` nodes. */ - class Modifiers extends @swift_modifiers, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Modifiers" } - - /** Gets the node corresponding to the field `modifier`. */ - final AstNode getModifier(int i) { swift_modifiers_modifier(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_modifiers_modifier(this, _, result) } - } - - /** A class representing `modify_specifier` nodes. */ - class ModifySpecifier extends @swift_modify_specifier, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ModifySpecifier" } - - /** Gets the node corresponding to the field `mutation`. */ - final MutationModifier getMutation() { swift_modify_specifier_mutation(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_modify_specifier_mutation(this, result) } - } - - /** A class representing `multi_line_str_text` tokens. */ - class MultiLineStrText extends @swift_token_multi_line_str_text, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MultiLineStrText" } - } - - /** A class representing `multi_line_string_literal` nodes. */ - class MultiLineStringLiteral extends @swift_multi_line_string_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MultiLineStringLiteral" } - - /** Gets the node corresponding to the field `interpolation`. */ - final InterpolatedExpression getInterpolation(int i) { - swift_multi_line_string_literal_interpolation(this, i, result) - } - - /** Gets the node corresponding to the field `text`. */ - final AstNode getText(int i) { swift_multi_line_string_literal_text(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_multi_line_string_literal_interpolation(this, _, result) or - swift_multi_line_string_literal_text(this, _, result) - } - } - - /** A class representing `multiline_comment` tokens. */ - class MultilineComment extends @swift_token_multiline_comment, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MultilineComment" } - } - - /** A class representing `multiplicative_expression` nodes. */ - class MultiplicativeExpression extends @swift_multiplicative_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MultiplicativeExpression" } - - /** Gets the node corresponding to the field `lhs`. */ - final Expression getLhs() { swift_multiplicative_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_multiplicative_expression_def(this, _, value, _) | - result = "%" and value = 0 - or - result = "*" and value = 1 - or - result = "/" and value = 2 - ) - } - - /** Gets the node corresponding to the field `rhs`. */ - final Expression getRhs() { swift_multiplicative_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_multiplicative_expression_def(this, result, _, _) or - swift_multiplicative_expression_def(this, _, _, result) - } - } - - /** A class representing `mutation_modifier` tokens. */ - class MutationModifier extends @swift_token_mutation_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "MutationModifier" } - } - - /** A class representing `navigation_expression` nodes. */ - class NavigationExpression extends @swift_navigation_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "NavigationExpression" } - - /** Gets the node corresponding to the field `suffix`. */ - final NavigationSuffix getSuffix() { swift_navigation_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget() { swift_navigation_expression_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_navigation_expression_def(this, result, _) or - swift_navigation_expression_def(this, _, result) - } - } - - /** A class representing `navigation_suffix` nodes. */ - class NavigationSuffix extends @swift_navigation_suffix, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "NavigationSuffix" } - - /** Gets the node corresponding to the field `suffix`. */ - final AstNode getSuffix() { swift_navigation_suffix_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_navigation_suffix_def(this, result) } - } - - /** A class representing `nested_type_identifier` nodes. */ - class NestedTypeIdentifier extends @swift_nested_type_identifier, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "NestedTypeIdentifier" } - - /** Gets the node corresponding to the field `base`. */ - final UnannotatedType getBase() { swift_nested_type_identifier_def(this, result) } + final override string getAPrimaryQlClass() { result = "MemberAccessExpr" } /** Gets the node corresponding to the field `member`. */ - final SimpleIdentifier getMember(int i) { swift_nested_type_identifier_member(this, i, result) } + final Identifier getMember() { unified_member_access_expr_def(this, result, _) } + + /** Gets the node corresponding to the field `target`. */ + final Expr getTarget() { unified_member_access_expr_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_nested_type_identifier_def(this, result) or - swift_nested_type_identifier_member(this, _, result) + unified_member_access_expr_def(this, result, _) or + unified_member_access_expr_def(this, _, result) } } - /** A class representing `nil_coalescing_expression` nodes. */ - class NilCoalescingExpression extends @swift_nil_coalescing_expression, AstNode { + /** A class representing `name_expr` nodes. */ + class NameExpr extends @unified_name_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "NilCoalescingExpression" } + final override string getAPrimaryQlClass() { result = "NameExpr" } - /** Gets the node corresponding to the field `if_nil`. */ - final Expression getIfNil() { swift_nil_coalescing_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_nil_coalescing_expression_def(this, _, result) } + /** Gets the node corresponding to the field `identifier`. */ + final Identifier getIdentifier() { unified_name_expr_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_nil_coalescing_expression_def(this, result, _) or - swift_nil_coalescing_expression_def(this, _, result) - } + final override AstNode getAFieldOrChild() { unified_name_expr_def(this, result) } } - /** A class representing `oct_literal` tokens. */ - class OctLiteral extends @swift_token_oct_literal, Token { + /** A class representing `operator` tokens. */ + class Operator extends @unified_token_operator, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OctLiteral" } - } - - /** A class representing `opaque_type` nodes. */ - class OpaqueType extends @swift_opaque_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OpaqueType" } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_opaque_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_opaque_type_def(this, result) } - } - - /** A class representing `open_end_range_expression` nodes. */ - class OpenEndRangeExpression extends @swift_open_end_range_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OpenEndRangeExpression" } - - /** Gets the node corresponding to the field `start`. */ - final Expression getStart() { swift_open_end_range_expression_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_open_end_range_expression_def(this, result) } - } - - /** A class representing `open_start_range_expression` nodes. */ - class OpenStartRangeExpression extends @swift_open_start_range_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OpenStartRangeExpression" } - - /** Gets the node corresponding to the field `end`. */ - final Expression getEnd() { swift_open_start_range_expression_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_open_start_range_expression_def(this, result) - } - } - - /** A class representing `operator_declaration` nodes. */ - class OperatorDeclaration extends @swift_operator_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OperatorDeclaration" } - - /** Gets the node corresponding to the field `body`. */ - final DeprecatedOperatorDeclarationBody getBody() { - swift_operator_declaration_body(this, result) - } - - /** Gets the node corresponding to the field `kind`. */ - final string getKind() { - exists(int value | swift_operator_declaration_def(this, value, _) | - result = "infix" and value = 0 - or - result = "postfix" and value = 1 - or - result = "prefix" and value = 2 - ) - } - - /** Gets the node corresponding to the field `name`. */ - final ReferenceableOperator getName() { swift_operator_declaration_def(this, _, result) } - - /** Gets the node corresponding to the field `precedence_group`. */ - final SimpleIdentifier getPrecedenceGroup() { - swift_operator_declaration_precedence_group(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_operator_declaration_body(this, result) or - swift_operator_declaration_def(this, _, result) or - swift_operator_declaration_precedence_group(this, result) - } - } - - /** A class representing `optional_chain_marker` nodes. */ - class OptionalChainMarker extends @swift_optional_chain_marker, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OptionalChainMarker" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_optional_chain_marker_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_optional_chain_marker_def(this, result) } - } - - /** A class representing `optional_type` nodes. */ - class OptionalType extends @swift_optional_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OptionalType" } - - /** Gets the node corresponding to the field `wrapped`. */ - final AstNode getWrapped() { swift_optional_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_optional_type_def(this, result) } - } - - /** A class representing `ownership_modifier` tokens. */ - class OwnershipModifier extends @swift_token_ownership_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "OwnershipModifier" } + final override string getAPrimaryQlClass() { result = "Operator" } } /** A class representing `parameter` nodes. */ - class Parameter extends @swift_parameter, AstNode { + class Parameter extends @unified_parameter, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "Parameter" } - /** Gets the node corresponding to the field `external_name`. */ - final SimpleIdentifier getExternalName() { swift_parameter_external_name(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final ParameterModifiers getModifiers() { swift_parameter_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_parameter_def(this, result, _) } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_parameter_def(this, _, result) } + /** Gets the node corresponding to the field `pattern`. */ + final Pattern getPattern() { unified_parameter_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_parameter_external_name(this, result) or - swift_parameter_modifiers(this, result) or - swift_parameter_def(this, result, _) or - swift_parameter_def(this, _, result) - } + final override AstNode getAFieldOrChild() { unified_parameter_def(this, result) } } - /** A class representing `parameter_modifier` tokens. */ - class ParameterModifier extends @swift_token_parameter_modifier, Token { + class Pattern extends @unified_pattern, AstNode { } + + /** A class representing `sequence_condition` nodes. */ + class SequenceCondition extends @unified_sequence_condition, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ParameterModifier" } - } - - /** A class representing `parameter_modifiers` nodes. */ - class ParameterModifiers extends @swift_parameter_modifiers, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ParameterModifiers" } - - /** Gets the node corresponding to the field `modifier`. */ - final ParameterModifier getModifier(int i) { - swift_parameter_modifiers_modifier(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_parameter_modifiers_modifier(this, _, result) - } - } - - /** A class representing `parenthesized_type` nodes. */ - class ParenthesizedType extends @swift_parenthesized_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ParenthesizedType" } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_parenthesized_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_parenthesized_type_def(this, result) } - } - - /** A class representing `pattern` nodes. */ - class Pattern extends @swift_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Pattern" } - - /** Gets the node corresponding to the field `binding`. */ - final ValueBindingPattern getBinding() { swift_pattern_binding(this, result) } - - /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier() { swift_pattern_bound_identifier(this, result) } - - /** Gets the node corresponding to the field `kind`. */ - final AstNode getKind() { swift_pattern_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_pattern_binding(this, result) or - swift_pattern_bound_identifier(this, result) or - swift_pattern_def(this, result) - } - } - - /** A class representing `playground_literal` nodes. */ - class PlaygroundLiteral extends @swift_playground_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PlaygroundLiteral" } - - /** Gets the node corresponding to the field `argument`. */ - final PlaygroundLiteralArgument getArgument(int i) { - swift_playground_literal_argument(this, i, result) - } - - /** Gets the node corresponding to the field `kind`. */ - final string getKind() { - exists(int value | swift_playground_literal_def(this, value) | - result = "colorLiteral" and value = 0 - or - result = "fileLiteral" and value = 1 - or - result = "imageLiteral" and value = 2 - ) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_playground_literal_argument(this, _, result) } - } - - /** A class representing `playground_literal_argument` nodes. */ - class PlaygroundLiteralArgument extends @swift_playground_literal_argument, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PlaygroundLiteralArgument" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_playground_literal_argument_def(this, result, _) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_playground_literal_argument_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_playground_literal_argument_def(this, result, _) or - swift_playground_literal_argument_def(this, _, result) - } - } - - /** A class representing `postfix_expression` nodes. */ - class PostfixExpression extends @swift_postfix_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PostfixExpression" } - - /** Gets the node corresponding to the field `operation`. */ - final AstNode getOperation() { swift_postfix_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `target`. */ - final Expression getTarget() { swift_postfix_expression_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_postfix_expression_def(this, result, _) or swift_postfix_expression_def(this, _, result) - } - } - - /** A class representing `precedence_group_attribute` nodes. */ - class PrecedenceGroupAttribute extends @swift_precedence_group_attribute, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PrecedenceGroupAttribute" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_precedence_group_attribute_def(this, result, _) } - - /** Gets the node corresponding to the field `value`. */ - final AstNode getValue() { swift_precedence_group_attribute_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_precedence_group_attribute_def(this, result, _) or - swift_precedence_group_attribute_def(this, _, result) - } - } - - /** A class representing `precedence_group_attributes` nodes. */ - class PrecedenceGroupAttributes extends @swift_precedence_group_attributes, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PrecedenceGroupAttributes" } - - /** Gets the node corresponding to the field `attribute`. */ - final PrecedenceGroupAttribute getAttribute(int i) { - swift_precedence_group_attributes_attribute(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_precedence_group_attributes_attribute(this, _, result) - } - } - - /** A class representing `precedence_group_declaration` nodes. */ - class PrecedenceGroupDeclaration extends @swift_precedence_group_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PrecedenceGroupDeclaration" } - - /** Gets the node corresponding to the field `attributes`. */ - final PrecedenceGroupAttributes getAttributes() { - swift_precedence_group_declaration_attributes(this, result) - } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_precedence_group_declaration_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_precedence_group_declaration_attributes(this, result) or - swift_precedence_group_declaration_def(this, result) - } - } - - /** A class representing `prefix_expression` nodes. */ - class PrefixExpression extends @swift_prefix_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PrefixExpression" } - - /** Gets the node corresponding to the field `operation`. */ - final AstNode getOperation() { swift_prefix_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `target`. */ - final Expression getTarget() { swift_prefix_expression_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_prefix_expression_def(this, result, _) or swift_prefix_expression_def(this, _, result) - } - } - - /** A class representing `property_behavior_modifier` tokens. */ - class PropertyBehaviorModifier extends @swift_token_property_behavior_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PropertyBehaviorModifier" } - } - - /** A class representing `property_binding` nodes. */ - class PropertyBinding extends @swift_property_binding, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PropertyBinding" } - - /** Gets the node corresponding to the field `computed_value`. */ - final ComputedProperty getComputedValue() { - swift_property_binding_computed_value(this, result) - } - - /** Gets the node corresponding to the field `name`. */ - final Pattern getName() { swift_property_binding_def(this, result) } - - /** Gets the node corresponding to the field `observers`. */ - final WillsetDidsetBlock getObservers() { swift_property_binding_observers(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType() { swift_property_binding_type(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_property_binding_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_property_binding_value(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_property_binding_computed_value(this, result) or - swift_property_binding_def(this, result) or - swift_property_binding_observers(this, result) or - swift_property_binding_type(this, result) or - swift_property_binding_type_constraints(this, result) or - swift_property_binding_value(this, result) - } - } - - /** A class representing `property_declaration` nodes. */ - class PropertyDeclaration extends @swift_property_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PropertyDeclaration" } - - /** Gets the node corresponding to the field `binding`. */ - final ValueBindingPattern getBinding() { swift_property_declaration_def(this, result) } - - /** Gets the node corresponding to the field `declarator`. */ - final PropertyBinding getDeclarator(int i) { - swift_property_declaration_declarator(this, i, result) - } - - /** Gets the node corresponding to the field `modifiers`. */ - final AstNode getModifiers(int i) { swift_property_declaration_modifiers(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_property_declaration_def(this, result) or - swift_property_declaration_declarator(this, _, result) or - swift_property_declaration_modifiers(this, _, result) - } - } - - /** A class representing `property_modifier` tokens. */ - class PropertyModifier extends @swift_token_property_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "PropertyModifier" } - } - - /** A class representing `protocol_body` nodes. */ - class ProtocolBody extends @swift_protocol_body, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolBody" } - - /** Gets the node corresponding to the field `member`. */ - final ProtocolMemberDeclaration getMember(int i) { swift_protocol_body_member(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_protocol_body_member(this, _, result) } - } - - /** A class representing `protocol_composition_type` nodes. */ - class ProtocolCompositionType extends @swift_protocol_composition_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolCompositionType" } - - /** Gets the node corresponding to the field `type`. */ - final UnannotatedType getType(int i) { swift_protocol_composition_type_type(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_composition_type_type(this, _, result) - } - } - - /** A class representing `protocol_declaration` nodes. */ - class ProtocolDeclaration extends @swift_protocol_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolDeclaration" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_protocol_declaration_attribute(this, i, result) } - - /** Gets the node corresponding to the field `body`. */ - final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `inherits`. */ - final InheritanceSpecifier getInherits(int i) { - swift_protocol_declaration_inherits(this, i, result) - } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_protocol_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_protocol_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_protocol_declaration_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_declaration_attribute(this, _, result) or - swift_protocol_declaration_def(this, result, _) or - swift_protocol_declaration_inherits(this, _, result) or - swift_protocol_declaration_modifiers(this, result) or - swift_protocol_declaration_def(this, _, result) or - swift_protocol_declaration_type_constraints(this, result) or - swift_protocol_declaration_type_parameters(this, result) - } - } - - /** A class representing `protocol_function_declaration` nodes. */ - class ProtocolFunctionDeclaration extends @swift_protocol_function_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolFunctionDeclaration" } - - /** Gets the node corresponding to the field `async`. */ - final ReservedWord getAsync() { swift_protocol_function_declaration_async(this, result) } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_protocol_function_declaration_body(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_protocol_function_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_protocol_function_declaration_def(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final FunctionParameter getParameter(int i) { - swift_protocol_function_declaration_parameter(this, i, result) - } - - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType() { swift_protocol_function_declaration_return_type(this, result) } - - /** Gets the node corresponding to the field `throws`. */ - final AstNode getThrows() { swift_protocol_function_declaration_throws(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_protocol_function_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_protocol_function_declaration_type_parameters(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_function_declaration_async(this, result) or - swift_protocol_function_declaration_body(this, result) or - swift_protocol_function_declaration_modifiers(this, result) or - swift_protocol_function_declaration_def(this, result) or - swift_protocol_function_declaration_parameter(this, _, result) or - swift_protocol_function_declaration_return_type(this, result) or - swift_protocol_function_declaration_throws(this, result) or - swift_protocol_function_declaration_type_constraints(this, result) or - swift_protocol_function_declaration_type_parameters(this, result) - } - } - - class ProtocolMemberDeclaration extends @swift_protocol_member_declaration, AstNode { } - - /** A class representing `protocol_property_declaration` nodes. */ - class ProtocolPropertyDeclaration extends @swift_protocol_property_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolPropertyDeclaration" } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_protocol_property_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final Pattern getName() { swift_protocol_property_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `requirements`. */ - final ProtocolPropertyRequirements getRequirements() { - swift_protocol_property_declaration_def(this, _, result) - } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType() { swift_protocol_property_declaration_type(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_protocol_property_declaration_type_constraints(this, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_property_declaration_modifiers(this, result) or - swift_protocol_property_declaration_def(this, result, _) or - swift_protocol_property_declaration_def(this, _, result) or - swift_protocol_property_declaration_type(this, result) or - swift_protocol_property_declaration_type_constraints(this, result) - } - } - - /** A class representing `protocol_property_requirements` nodes. */ - class ProtocolPropertyRequirements extends @swift_protocol_property_requirements, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ProtocolPropertyRequirements" } - - /** Gets the node corresponding to the field `accessor`. */ - final AstNode getAccessor(int i) { - swift_protocol_property_requirements_accessor(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_property_requirements_accessor(this, _, result) - } - } - - /** A class representing `range_expression` nodes. */ - class RangeExpression extends @swift_range_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RangeExpression" } - - /** Gets the node corresponding to the field `end`. */ - final Expression getEnd() { swift_range_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `op`. */ - final string getOp() { - exists(int value | swift_range_expression_def(this, _, value, _) | - result = "..." and value = 0 - or - result = "..<" and value = 1 - ) - } - - /** Gets the node corresponding to the field `start`. */ - final Expression getStart() { swift_range_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_range_expression_def(this, result, _, _) or - swift_range_expression_def(this, _, _, result) - } - } - - /** A class representing `raw_str_continuing_indicator` tokens. */ - class RawStrContinuingIndicator extends @swift_token_raw_str_continuing_indicator, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStrContinuingIndicator" } - } - - /** A class representing `raw_str_end_part` tokens. */ - class RawStrEndPart extends @swift_token_raw_str_end_part, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStrEndPart" } - } - - /** A class representing `raw_str_interpolation` nodes. */ - class RawStrInterpolation extends @swift_raw_str_interpolation, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStrInterpolation" } - - /** Gets the node corresponding to the field `interpolation`. */ - final InterpolatedExpression getInterpolation(int i) { - swift_raw_str_interpolation_interpolation(this, i, result) - } - - /** Gets the node corresponding to the field `start`. */ - final RawStrInterpolationStart getStart() { swift_raw_str_interpolation_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_raw_str_interpolation_interpolation(this, _, result) or - swift_raw_str_interpolation_def(this, result) - } - } - - /** A class representing `raw_str_interpolation_start` tokens. */ - class RawStrInterpolationStart extends @swift_token_raw_str_interpolation_start, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStrInterpolationStart" } - } - - /** A class representing `raw_str_part` tokens. */ - class RawStrPart extends @swift_token_raw_str_part, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStrPart" } - } - - /** A class representing `raw_string_literal` nodes. */ - class RawStringLiteral extends @swift_raw_string_literal, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RawStringLiteral" } - - /** Gets the node corresponding to the field `continuing`. */ - final RawStrContinuingIndicator getContinuing(int i) { - swift_raw_string_literal_continuing(this, i, result) - } - - /** Gets the node corresponding to the field `interpolation`. */ - final RawStrInterpolation getInterpolation(int i) { - swift_raw_string_literal_interpolation(this, i, result) - } - - /** Gets the node corresponding to the field `text`. */ - final AstNode getText(int i) { swift_raw_string_literal_text(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_raw_string_literal_continuing(this, _, result) or - swift_raw_string_literal_interpolation(this, _, result) or - swift_raw_string_literal_text(this, _, result) - } - } - - /** A class representing `real_literal` tokens. */ - class RealLiteral extends @swift_token_real_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RealLiteral" } - } - - /** A class representing `referenceable_operator` nodes. */ - class ReferenceableOperator extends @swift_referenceable_operator, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ReferenceableOperator" } - - /** Gets the node corresponding to the field `operator`. */ - final AstNode getOperator() { swift_referenceable_operator_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_referenceable_operator_def(this, result) } - } - - /** A class representing `regex_literal` tokens. */ - class RegexLiteral extends @swift_token_regex_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RegexLiteral" } - } - - /** A class representing `repeat_while_statement` nodes. */ - class RepeatWhileStatement extends @swift_repeat_while_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "RepeatWhileStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_repeat_while_statement_def(this, result) } + final override string getAPrimaryQlClass() { result = "SequenceCondition" } /** Gets the node corresponding to the field `condition`. */ - final IfCondition getCondition(int i) { - swift_repeat_while_statement_condition(this, i, result) - } + final Condition getCondition() { unified_sequence_condition_def(this, result) } + + /** Gets the node corresponding to the field `stmt`. */ + final Stmt getStmt(int i) { unified_sequence_condition_stmt(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_repeat_while_statement_def(this, result) or - swift_repeat_while_statement_condition(this, _, result) + unified_sequence_condition_def(this, result) or + unified_sequence_condition_stmt(this, _, result) } } - /** A class representing `selector_expression` nodes. */ - class SelectorExpression extends @swift_selector_expression, AstNode { + class Stmt extends @unified_stmt, AstNode { } + + /** A class representing `string_literal` tokens. */ + class StringLiteral extends @unified_token_string_literal, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SelectorExpression" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_selector_expression_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_selector_expression_def(this, result) } + final override string getAPrimaryQlClass() { result = "StringLiteral" } } - /** A class representing `self_expression` tokens. */ - class SelfExpression extends @swift_token_self_expression, Token { + /** A class representing `top_level` nodes. */ + class TopLevel extends @unified_top_level, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SelfExpression" } - } - - /** A class representing `setter_specifier` nodes. */ - class SetterSpecifier extends @swift_setter_specifier, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SetterSpecifier" } - - /** Gets the node corresponding to the field `mutation`. */ - final MutationModifier getMutation() { swift_setter_specifier_mutation(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_setter_specifier_mutation(this, result) } - } - - /** A class representing `shebang_line` tokens. */ - class ShebangLine extends @swift_token_shebang_line, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ShebangLine" } - } - - /** A class representing `simple_identifier` tokens. */ - class SimpleIdentifier extends @swift_token_simple_identifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SimpleIdentifier" } - } - - /** A class representing `simple_user_type` nodes. */ - class SimpleUserType extends @swift_simple_user_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SimpleUserType" } - - /** Gets the node corresponding to the field `arguments`. */ - final TypeArguments getArguments() { swift_simple_user_type_arguments(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_simple_user_type_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_simple_user_type_arguments(this, result) or swift_simple_user_type_def(this, result) - } - } - - /** A class representing `source_file` nodes. */ - class SourceFile extends @swift_source_file, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SourceFile" } - - /** Gets the node corresponding to the field `shebang`. */ - final ShebangLine getShebang() { swift_source_file_shebang(this, result) } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_source_file_statement(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_source_file_shebang(this, result) or swift_source_file_statement(this, _, result) - } - } - - /** A class representing `special_literal` tokens. */ - class SpecialLiteral extends @swift_token_special_literal, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SpecialLiteral" } - } - - /** A class representing `statement_label` tokens. */ - class StatementLabel extends @swift_token_statement_label, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "StatementLabel" } - } - - /** A class representing `str_escaped_char` tokens. */ - class StrEscapedChar extends @swift_token_str_escaped_char, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "StrEscapedChar" } - } - - /** A class representing `subscript_declaration` nodes. */ - class SubscriptDeclaration extends @swift_subscript_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SubscriptDeclaration" } + final override string getAPrimaryQlClass() { result = "TopLevel" } /** Gets the node corresponding to the field `body`. */ - final ComputedProperty getBody() { swift_subscript_declaration_def(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_subscript_declaration_modifiers(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final FunctionParameter getParameter(int i) { - swift_subscript_declaration_parameter(this, i, result) - } - - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType() { swift_subscript_declaration_return_type(this, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints() { - swift_subscript_declaration_type_constraints(this, result) - } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_subscript_declaration_type_parameters(this, result) - } + final AstNode getBody(int i) { unified_top_level_body(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_subscript_declaration_def(this, result) or - swift_subscript_declaration_modifiers(this, result) or - swift_subscript_declaration_parameter(this, _, result) or - swift_subscript_declaration_return_type(this, result) or - swift_subscript_declaration_type_constraints(this, result) or - swift_subscript_declaration_type_parameters(this, result) - } - } - - /** A class representing `super_expression` tokens. */ - class SuperExpression extends @swift_token_super_expression, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SuperExpression" } - } - - /** A class representing `suppressed_constraint` nodes. */ - class SuppressedConstraint extends @swift_suppressed_constraint, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SuppressedConstraint" } - - /** Gets the node corresponding to the field `suppressed`. */ - final TypeIdentifier getSuppressed() { swift_suppressed_constraint_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_suppressed_constraint_def(this, result) } - } - - /** A class representing `switch_entry` nodes. */ - class SwitchEntry extends @swift_switch_entry, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SwitchEntry" } - - /** Gets the node corresponding to the field `default`. */ - final DefaultKeyword getDefault() { swift_switch_entry_default(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_switch_entry_modifiers(this, result) } - - /** Gets the node corresponding to the field `pattern`. */ - final SwitchPattern getPattern(int i) { swift_switch_entry_pattern(this, i, result) } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_switch_entry_statement(this, i, result) } - - /** Gets the node corresponding to the field `where`. */ - final WhereClause getWhere() { swift_switch_entry_where(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_switch_entry_default(this, result) or - swift_switch_entry_modifiers(this, result) or - swift_switch_entry_pattern(this, _, result) or - swift_switch_entry_statement(this, _, result) or - swift_switch_entry_where(this, result) - } - } - - /** A class representing `switch_pattern` nodes. */ - class SwitchPattern extends @swift_switch_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SwitchPattern" } - - /** Gets the node corresponding to the field `pattern`. */ - final Pattern getPattern() { swift_switch_pattern_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_switch_pattern_def(this, result) } - } - - /** A class representing `switch_statement` nodes. */ - class SwitchStatement extends @swift_switch_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "SwitchStatement" } - - /** Gets the node corresponding to the field `entry`. */ - final SwitchEntry getEntry(int i) { swift_switch_statement_entry(this, i, result) } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_switch_statement_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_switch_statement_entry(this, _, result) or swift_switch_statement_def(this, result) - } - } - - /** A class representing `ternary_expression` nodes. */ - class TernaryExpression extends @swift_ternary_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TernaryExpression" } - - /** Gets the node corresponding to the field `condition`. */ - final Expression getCondition() { swift_ternary_expression_def(this, result, _, _) } - - /** Gets the node corresponding to the field `if_false`. */ - final Expression getIfFalse() { swift_ternary_expression_def(this, _, result, _) } - - /** Gets the node corresponding to the field `if_true`. */ - final Expression getIfTrue() { swift_ternary_expression_def(this, _, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_ternary_expression_def(this, result, _, _) or - swift_ternary_expression_def(this, _, result, _) or - swift_ternary_expression_def(this, _, _, result) - } - } - - /** A class representing `throw_keyword` tokens. */ - class ThrowKeyword extends @swift_token_throw_keyword, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ThrowKeyword" } - } - - /** A class representing `throws` tokens. */ - class Throws extends @swift_token_throws, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Throws" } - } - - /** A class representing `throws_clause` nodes. */ - class ThrowsClause extends @swift_throws_clause, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ThrowsClause" } - - /** Gets the node corresponding to the field `type`. */ - final UnannotatedType getType() { swift_throws_clause_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_throws_clause_def(this, result) } - } - - /** A class representing `try_expression` nodes. */ - class TryExpression extends @swift_try_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TryExpression" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_try_expression_def(this, result, _) } - - /** Gets the node corresponding to the field `operator`. */ - final TryOperator getOperator() { swift_try_expression_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_try_expression_def(this, result, _) or swift_try_expression_def(this, _, result) - } - } - - /** A class representing `try_operator` tokens. */ - class TryOperator extends @swift_token_try_operator, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TryOperator" } - } - - /** A class representing `tuple_expression` nodes. */ - class TupleExpression extends @swift_tuple_expression, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TupleExpression" } - - /** Gets the node corresponding to the field `element`. */ - final TupleExpressionItem getElement(int i) { swift_tuple_expression_element(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_tuple_expression_element(this, _, result) } - } - - /** A class representing `tuple_expression_item` nodes. */ - class TupleExpressionItem extends @swift_tuple_expression_item, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TupleExpressionItem" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_tuple_expression_item_name(this, result) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_tuple_expression_item_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_tuple_expression_item_name(this, result) or - swift_tuple_expression_item_def(this, result) - } + final override AstNode getAFieldOrChild() { unified_top_level_body(this, _, result) } } /** A class representing `tuple_pattern` nodes. */ - class TuplePattern extends @swift_tuple_pattern, AstNode { + class TuplePattern extends @unified_tuple_pattern, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TuplePattern" } - /** Gets the node corresponding to the field `item`. */ - final TuplePatternItem getItem(int i) { swift_tuple_pattern_item(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_tuple_pattern_item(this, _, result) } - } - - /** A class representing `tuple_pattern_item` nodes. */ - class TuplePatternItem extends @swift_tuple_pattern_item, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TuplePatternItem" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_tuple_pattern_item_name(this, result) } - - /** Gets the node corresponding to the field `pattern`. */ - final Pattern getPattern() { swift_tuple_pattern_item_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_tuple_pattern_item_name(this, result) or swift_tuple_pattern_item_def(this, result) - } - } - - /** A class representing `tuple_type` nodes. */ - class TupleType extends @swift_tuple_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TupleType" } - /** Gets the node corresponding to the field `element`. */ - final TupleTypeItem getElement(int i) { swift_tuple_type_element(this, i, result) } + final Pattern getElement(int i) { unified_tuple_pattern_element(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_tuple_type_element(this, _, result) } + final override AstNode getAFieldOrChild() { unified_tuple_pattern_element(this, _, result) } } - /** A class representing `tuple_type_item` nodes. */ - class TupleTypeItem extends @swift_tuple_type_item, AstNode { + /** A class representing `unary_expr` nodes. */ + class UnaryExpr extends @unified_unary_expr, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TupleTypeItem" } + final override string getAPrimaryQlClass() { result = "UnaryExpr" } - /** Gets the node corresponding to the field `external_name`. */ - final WildcardPattern getExternalName() { swift_tuple_type_item_external_name(this, result) } + /** Gets the node corresponding to the field `operand`. */ + final Expr getOperand() { unified_unary_expr_def(this, result, _) } - /** Gets the node corresponding to the field `modifiers`. */ - final ParameterModifiers getModifiers() { swift_tuple_type_item_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_tuple_type_item_name(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_tuple_type_item_def(this, result) } + /** Gets the node corresponding to the field `operator`. */ + final Operator getOperator() { unified_unary_expr_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_tuple_type_item_external_name(this, result) or - swift_tuple_type_item_modifiers(this, result) or - swift_tuple_type_item_name(this, result) or - swift_tuple_type_item_def(this, result) + unified_unary_expr_def(this, result, _) or unified_unary_expr_def(this, _, result) } } - /** A class representing `type` nodes. */ - class Type extends @swift_type__, AstNode { + /** A class representing `unsupported_node` tokens. */ + class UnsupportedNode extends @unified_token_unsupported_node, Token { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Type" } + final override string getAPrimaryQlClass() { result = "UnsupportedNode" } + } - /** Gets the node corresponding to the field `modifiers`. */ - final TypeModifiers getModifiers() { swift_type_modifiers(this, result) } + /** A class representing `var_pattern` nodes. */ + class VarPattern extends @unified_var_pattern, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "VarPattern" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_def(this, result) } + /** Gets the node corresponding to the field `identifier`. */ + final Identifier getIdentifier() { unified_var_pattern_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { unified_var_pattern_def(this, result) } + } + + /** A class representing `variable_declaration_stmt` nodes. */ + class VariableDeclarationStmt extends @unified_variable_declaration_stmt, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "VariableDeclarationStmt" } + + /** Gets the node corresponding to the field `variable_declarator`. */ + final VariableDeclarator getVariableDeclarator(int i) { + unified_variable_declaration_stmt_variable_declarator(this, i, result) + } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_type_modifiers(this, result) or swift_type_def(this, result) + unified_variable_declaration_stmt_variable_declarator(this, _, result) } } - /** A class representing `type_annotation` nodes. */ - class TypeAnnotation extends @swift_type_annotation, AstNode { + /** A class representing `variable_declarator` nodes. */ + class VariableDeclarator extends @unified_variable_declarator, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeAnnotation" } - - /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_type_annotation_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_annotation_def(this, result) } - } - - /** A class representing `type_arguments` nodes. */ - class TypeArguments extends @swift_type_arguments, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeArguments" } - - /** Gets the node corresponding to the field `argument`. */ - final Type getArgument(int i) { swift_type_arguments_argument(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_arguments_argument(this, _, result) } - } - - /** A class representing `type_casting_pattern` nodes. */ - class TypeCastingPattern extends @swift_type_casting_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeCastingPattern" } + final override string getAPrimaryQlClass() { result = "VariableDeclarator" } /** Gets the node corresponding to the field `pattern`. */ - final Pattern getPattern() { swift_type_casting_pattern_pattern(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_type_casting_pattern_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_casting_pattern_pattern(this, result) or - swift_type_casting_pattern_def(this, result) - } - } - - /** A class representing `type_constraint` nodes. */ - class TypeConstraint extends @swift_type_constraint, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeConstraint" } - - /** Gets the node corresponding to the field `constraint`. */ - final AstNode getConstraint() { swift_type_constraint_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_constraint_def(this, result) } - } - - /** A class representing `type_constraints` nodes. */ - class TypeConstraints extends @swift_type_constraints, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeConstraints" } - - /** Gets the node corresponding to the field `constraint`. */ - final TypeConstraint getConstraint(int i) { swift_type_constraints_constraint(this, i, result) } - - /** Gets the node corresponding to the field `keyword`. */ - final WhereKeyword getKeyword() { swift_type_constraints_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_constraints_constraint(this, _, result) or swift_type_constraints_def(this, result) - } - } - - /** A class representing `type_identifier` tokens. */ - class TypeIdentifier extends @swift_token_type_identifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeIdentifier" } - } - - class TypeLevelDeclaration extends @swift_type_level_declaration, AstNode { } - - /** A class representing `type_modifiers` nodes. */ - class TypeModifiers extends @swift_type_modifiers, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeModifiers" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_type_modifiers_attribute(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_modifiers_attribute(this, _, result) } - } - - /** A class representing `type_pack_expansion` nodes. */ - class TypePackExpansion extends @swift_type_pack_expansion, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypePackExpansion" } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_pack_expansion_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_pack_expansion_def(this, result) } - } - - /** A class representing `type_parameter` nodes. */ - class TypeParameter extends @swift_type_parameter, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeParameter" } - - /** Gets the node corresponding to the field `modifiers`. */ - final TypeParameterModifiers getModifiers() { swift_type_parameter_modifiers(this, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_type_parameter_def(this, result) } - - /** Gets the node corresponding to the field `type`. */ - final Type getType() { swift_type_parameter_type(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_parameter_modifiers(this, result) or - swift_type_parameter_def(this, result) or - swift_type_parameter_type(this, result) - } - } - - /** A class representing `type_parameter_modifiers` nodes. */ - class TypeParameterModifiers extends @swift_type_parameter_modifiers, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeParameterModifiers" } - - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { - swift_type_parameter_modifiers_attribute(this, i, result) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_parameter_modifiers_attribute(this, _, result) - } - } - - /** A class representing `type_parameter_pack` nodes. */ - class TypeParameterPack extends @swift_type_parameter_pack, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeParameterPack" } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_parameter_pack_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_type_parameter_pack_def(this, result) } - } - - /** A class representing `type_parameters` nodes. */ - class TypeParameters extends @swift_type_parameters, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypeParameters" } - - /** Gets the node corresponding to the field `constraints`. */ - final TypeConstraints getConstraints() { swift_type_parameters_constraints(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final TypeParameter getParameter(int i) { swift_type_parameters_parameter(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_parameters_constraints(this, result) or - swift_type_parameters_parameter(this, _, result) - } - } - - /** A class representing `typealias_declaration` nodes. */ - class TypealiasDeclaration extends @swift_typealias_declaration, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "TypealiasDeclaration" } - - /** Gets the node corresponding to the field `modifiers`. */ - final AstNode getModifiers(int i) { swift_typealias_declaration_modifiers(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_typealias_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `type_parameters`. */ - final TypeParameters getTypeParameters() { - swift_typealias_declaration_type_parameters(this, result) - } + final Pattern getPattern() { unified_variable_declarator_def(this, result) } /** Gets the node corresponding to the field `value`. */ - final Type getValue() { swift_typealias_declaration_def(this, _, result) } + final Expr getValue() { unified_variable_declarator_value(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_typealias_declaration_modifiers(this, _, result) or - swift_typealias_declaration_def(this, result, _) or - swift_typealias_declaration_type_parameters(this, result) or - swift_typealias_declaration_def(this, _, result) - } - } - - class UnannotatedType extends @swift_unannotated_type, AstNode { } - - /** A class representing `user_type` nodes. */ - class UserType extends @swift_user_type, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "UserType" } - - /** Gets the node corresponding to the field `part`. */ - final SimpleUserType getPart(int i) { swift_user_type_part(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_user_type_part(this, _, result) } - } - - /** A class representing `value_argument` nodes. */ - class ValueArgument extends @swift_value_argument, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValueArgument" } - - /** Gets the node corresponding to the field `name`. */ - final ValueArgumentLabel getName() { swift_value_argument_name(this, result) } - - /** Gets the node corresponding to the field `reference_specifier`. */ - final ValueArgumentLabel getReferenceSpecifier(int i) { - swift_value_argument_reference_specifier(this, i, result) - } - - /** Gets the node corresponding to the field `type_modifiers`. */ - final TypeModifiers getTypeModifiers() { swift_value_argument_type_modifiers(this, result) } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue() { swift_value_argument_value(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_value_argument_name(this, result) or - swift_value_argument_reference_specifier(this, _, result) or - swift_value_argument_type_modifiers(this, result) or - swift_value_argument_value(this, result) - } - } - - /** A class representing `value_argument_label` nodes. */ - class ValueArgumentLabel extends @swift_value_argument_label, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValueArgumentLabel" } - - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName() { swift_value_argument_label_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_argument_label_def(this, result) } - } - - /** A class representing `value_arguments` nodes. */ - class ValueArguments extends @swift_value_arguments, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValueArguments" } - - /** Gets the node corresponding to the field `argument`. */ - final ValueArgument getArgument(int i) { swift_value_arguments_argument(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_arguments_argument(this, _, result) } - } - - /** A class representing `value_binding_pattern` nodes. */ - class ValueBindingPattern extends @swift_value_binding_pattern, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValueBindingPattern" } - - /** Gets the node corresponding to the field `mutability`. */ - final string getMutability() { - exists(int value | swift_value_binding_pattern_def(this, value) | - result = "let" and value = 0 - or - result = "var" and value = 1 - ) - } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { none() } - } - - /** A class representing `value_pack_expansion` nodes. */ - class ValuePackExpansion extends @swift_value_pack_expansion, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValuePackExpansion" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_value_pack_expansion_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_pack_expansion_def(this, result) } - } - - /** A class representing `value_parameter_pack` nodes. */ - class ValueParameterPack extends @swift_value_parameter_pack, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "ValueParameterPack" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_value_parameter_pack_def(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_parameter_pack_def(this, result) } - } - - /** A class representing `visibility_modifier` tokens. */ - class VisibilityModifier extends @swift_token_visibility_modifier, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "VisibilityModifier" } - } - - /** A class representing `where_clause` nodes. */ - class WhereClause extends @swift_where_clause, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WhereClause" } - - /** Gets the node corresponding to the field `expr`. */ - final Expression getExpr() { swift_where_clause_def(this, result, _) } - - /** Gets the node corresponding to the field `keyword`. */ - final WhereKeyword getKeyword() { swift_where_clause_def(this, _, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_where_clause_def(this, result, _) or swift_where_clause_def(this, _, result) - } - } - - /** A class representing `where_keyword` tokens. */ - class WhereKeyword extends @swift_token_where_keyword, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WhereKeyword" } - } - - /** A class representing `while_statement` nodes. */ - class WhileStatement extends @swift_while_statement, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WhileStatement" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_while_statement_def(this, result) } - - /** Gets the node corresponding to the field `condition`. */ - final IfCondition getCondition(int i) { swift_while_statement_condition(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_while_statement_def(this, result) or swift_while_statement_condition(this, _, result) - } - } - - /** A class representing `wildcard_pattern` tokens. */ - class WildcardPattern extends @swift_token_wildcard_pattern, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WildcardPattern" } - } - - /** A class representing `willset_clause` nodes. */ - class WillsetClause extends @swift_willset_clause, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WillsetClause" } - - /** Gets the node corresponding to the field `body`. */ - final Block getBody() { swift_willset_clause_def(this, result) } - - /** Gets the node corresponding to the field `modifiers`. */ - final Modifiers getModifiers() { swift_willset_clause_modifiers(this, result) } - - /** Gets the node corresponding to the field `parameter`. */ - final SimpleIdentifier getParameter() { swift_willset_clause_parameter(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_willset_clause_def(this, result) or - swift_willset_clause_modifiers(this, result) or - swift_willset_clause_parameter(this, result) - } - } - - /** A class representing `willset_didset_block` nodes. */ - class WillsetDidsetBlock extends @swift_willset_didset_block, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "WillsetDidsetBlock" } - - /** Gets the node corresponding to the field `didset`. */ - final DidsetClause getDidset() { swift_willset_didset_block_didset(this, result) } - - /** Gets the node corresponding to the field `willset`. */ - final WillsetClause getWillset() { swift_willset_didset_block_willset(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_willset_didset_block_didset(this, result) or - swift_willset_didset_block_willset(this, result) + unified_variable_declarator_def(this, result) or + unified_variable_declarator_value(this, result) } } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 5cf748c1571..28718d79423 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -1,4 +1,4 @@ -// CodeQL database schema for Swift +// CodeQL database schema for Unified // Automatically generated from the tree-sitter grammar; do not edit // To regenerate, run unified/scripts/create-extractor-pack.sh @@ -131,2391 +131,220 @@ overlayChangedFiles( string path: string ref ); -/*- Swift dbscheme -*/ -case @swift_additive_expression.op of - 0 = @swift_additive_expression_plus -| 1 = @swift_additive_expression_minus -; - - -swift_additive_expression_def( - unique int id: @swift_additive_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -#keyset[swift_array_literal, index] -swift_array_literal_element( - int swift_array_literal: @swift_array_literal ref, - int index: int ref, - unique int element: @swift_expression ref -); - -swift_array_literal_def( - unique int id: @swift_array_literal -); - -swift_array_type_def( - unique int id: @swift_array_type, - int element: @swift_type__ ref -); - -swift_as_expression_def( - unique int id: @swift_as_expression, - int expr: @swift_expression ref, - int operator: @swift_token_as_operator ref, - int type__: @swift_type__ ref -); - -case @swift_assignment.operator of - 0 = @swift_assignment_percentequal -| 1 = @swift_assignment_starequal -| 2 = @swift_assignment_plusequal -| 3 = @swift_assignment_minusequal -| 4 = @swift_assignment_slashequal -| 5 = @swift_assignment_equal -; - - -swift_assignment_def( - unique int id: @swift_assignment, - int operator: int ref, - int result: @swift_expression ref, - int target: @swift_directly_assignable_expression ref -); - -swift_associatedtype_declaration_default_value( - unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - unique int default_value: @swift_type__ ref -); - -swift_associatedtype_declaration_modifiers( - unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -swift_associatedtype_declaration_must_inherit( - unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - unique int must_inherit: @swift_type__ ref -); - -swift_associatedtype_declaration_type_constraints( - unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_associatedtype_declaration_def( - unique int id: @swift_associatedtype_declaration, - int name: @swift_token_type_identifier ref -); - -#keyset[swift_attribute, index] -swift_attribute_argument( - int swift_attribute: @swift_attribute ref, - int index: int ref, - unique int argument: @swift_expression ref -); - -#keyset[swift_attribute, index] -swift_attribute_argument_name( - int swift_attribute: @swift_attribute ref, - int index: int ref, - unique int argument_name: @swift_token_simple_identifier ref -); - -#keyset[swift_attribute, index] -swift_attribute_param_ref( - int swift_attribute: @swift_attribute ref, - int index: int ref, - unique int param_ref: @swift_token_simple_identifier ref -); - -#keyset[swift_attribute, index] -swift_attribute_platform( - int swift_attribute: @swift_attribute ref, - int index: int ref, - unique int platform: @swift_token_simple_identifier ref -); - -#keyset[swift_attribute, index] -swift_attribute_version( - int swift_attribute: @swift_attribute ref, - int index: int ref, - unique int version: @swift_token_integer_literal ref -); - -swift_attribute_def( - unique int id: @swift_attribute, - int name: @swift_user_type ref -); - -#keyset[swift_availability_condition, index] -swift_availability_condition_platform( - int swift_availability_condition: @swift_availability_condition ref, - int index: int ref, - unique int platform: @swift_identifier ref -); - -#keyset[swift_availability_condition, index] -swift_availability_condition_version( - int swift_availability_condition: @swift_availability_condition ref, - int index: int ref, - unique int version: @swift_token_integer_literal ref -); - -swift_availability_condition_def( - unique int id: @swift_availability_condition -); - -swift_await_expression_def( - unique int id: @swift_await_expression, - int expr: @swift_expression ref -); - -swift_binding_pattern_def( - unique int id: @swift_binding_pattern, - int binding: @swift_value_binding_pattern ref, - int pattern: @swift_pattern ref -); - -case @swift_bitwise_operation.op of - 0 = @swift_bitwise_operation_ampersand -| 1 = @swift_bitwise_operation_langlelangle -| 2 = @swift_bitwise_operation_ranglerangle -| 3 = @swift_bitwise_operation_caret -| 4 = @swift_bitwise_operation_pipe -; - - -swift_bitwise_operation_def( - unique int id: @swift_bitwise_operation, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -@swift_block_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_block, index] -swift_block_statement( - int swift_block: @swift_block ref, - int index: int ref, - unique int statement: @swift_block_statement_type ref -); - -swift_block_def( - unique int id: @swift_block -); - -swift_call_expression_def( - unique int id: @swift_call_expression, - int function: @swift_expression ref, - int suffix: @swift_call_suffix ref -); - -swift_call_suffix_arguments( - unique int swift_call_suffix: @swift_call_suffix ref, - unique int arguments: @swift_value_arguments ref -); - -#keyset[swift_call_suffix, index] -swift_call_suffix_lambda( - int swift_call_suffix: @swift_call_suffix ref, - int index: int ref, - unique int lambda: @swift_lambda_literal ref -); - -#keyset[swift_call_suffix, index] -swift_call_suffix_name( - int swift_call_suffix: @swift_call_suffix ref, - int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -swift_call_suffix_def( - unique int id: @swift_call_suffix -); - -#keyset[swift_capture_list, index] -swift_capture_list_item( - int swift_capture_list: @swift_capture_list ref, - int index: int ref, - unique int item: @swift_capture_list_item ref -); - -swift_capture_list_def( - unique int id: @swift_capture_list -); - -@swift_capture_list_item_name_type = @swift_token_self_expression | @swift_token_simple_identifier - -swift_capture_list_item_ownership( - unique int swift_capture_list_item: @swift_capture_list_item ref, - unique int ownership: @swift_token_ownership_modifier ref -); - -swift_capture_list_item_value( - unique int swift_capture_list_item: @swift_capture_list_item ref, - unique int value: @swift_expression ref -); - -swift_capture_list_item_def( - unique int id: @swift_capture_list_item, - int name: @swift_capture_list_item_name_type ref -); - -swift_case_pattern_arguments( - unique int swift_case_pattern: @swift_case_pattern ref, - unique int arguments: @swift_tuple_pattern ref -); - -swift_case_pattern_type( - unique int swift_case_pattern: @swift_case_pattern ref, - unique int type__: @swift_user_type ref -); - -swift_case_pattern_def( - unique int id: @swift_case_pattern, - int name: @swift_token_simple_identifier ref -); - -swift_catch_block_error( - unique int swift_catch_block: @swift_catch_block ref, - unique int error: @swift_pattern ref -); - -swift_catch_block_where( - unique int swift_catch_block: @swift_catch_block ref, - unique int where: @swift_where_clause ref -); - -swift_catch_block_def( - unique int id: @swift_catch_block, - int body: @swift_block ref, - int keyword: @swift_token_catch_keyword ref -); - -case @swift_check_expression.op of - 0 = @swift_check_expression_is -; - - -swift_check_expression_def( - unique int id: @swift_check_expression, - int op: int ref, - int target: @swift_expression ref, - int type__: @swift_type__ ref -); - -#keyset[swift_class_body, index] -swift_class_body_member( - int swift_class_body: @swift_class_body ref, - int index: int ref, - unique int member: @swift_type_level_declaration ref -); - -swift_class_body_def( - unique int id: @swift_class_body -); - -#keyset[swift_class_declaration, index] -swift_class_declaration_attribute( - int swift_class_declaration: @swift_class_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -@swift_class_declaration_body_type = @swift_class_body | @swift_enum_class_body - -case @swift_class_declaration.declaration_kind of - 0 = @swift_class_declaration_actor -| 1 = @swift_class_declaration_class -| 2 = @swift_class_declaration_enum -| 3 = @swift_class_declaration_extension -| 4 = @swift_class_declaration_struct -; - - -#keyset[swift_class_declaration, index] -swift_class_declaration_inherits( - int swift_class_declaration: @swift_class_declaration ref, - int index: int ref, - unique int inherits: @swift_inheritance_specifier ref -); - -@swift_class_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier - -#keyset[swift_class_declaration, index] -swift_class_declaration_modifiers( - int swift_class_declaration: @swift_class_declaration ref, - int index: int ref, - unique int modifiers: @swift_class_declaration_modifiers_type ref -); - -@swift_class_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type - -swift_class_declaration_type_constraints( - unique int swift_class_declaration: @swift_class_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_class_declaration_type_parameters( - unique int swift_class_declaration: @swift_class_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_class_declaration_def( - unique int id: @swift_class_declaration, - int body: @swift_class_declaration_body_type ref, - int declaration_kind: int ref, - int name: @swift_class_declaration_name_type ref -); - -case @swift_comparison_expression.op of - 0 = @swift_comparison_expression_langle -| 1 = @swift_comparison_expression_langleequal -| 2 = @swift_comparison_expression_rangle -| 3 = @swift_comparison_expression_rangleequal -; - - -swift_comparison_expression_def( - unique int id: @swift_comparison_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -swift_compilation_condition_inner( - unique int swift_compilation_condition: @swift_compilation_condition ref, - unique int inner: @swift_compilation_condition ref -); - -swift_compilation_condition_lhs( - unique int swift_compilation_condition: @swift_compilation_condition ref, - unique int lhs: @swift_compilation_condition ref -); - -#keyset[swift_compilation_condition, index] -swift_compilation_condition_name( - int swift_compilation_condition: @swift_compilation_condition ref, - int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -swift_compilation_condition_operand( - unique int swift_compilation_condition: @swift_compilation_condition ref, - unique int operand: @swift_compilation_condition ref -); - -swift_compilation_condition_rhs( - unique int swift_compilation_condition: @swift_compilation_condition ref, - unique int rhs: @swift_compilation_condition ref -); - -swift_compilation_condition_value( - unique int swift_compilation_condition: @swift_compilation_condition ref, - unique int value: @swift_token_boolean_literal ref -); - -#keyset[swift_compilation_condition, index] -swift_compilation_condition_version( - int swift_compilation_condition: @swift_compilation_condition ref, - int index: int ref, - unique int version: @swift_token_integer_literal ref -); - -swift_compilation_condition_def( - unique int id: @swift_compilation_condition -); - -#keyset[swift_computed_getter, index] -swift_computed_getter_attribute( - int swift_computed_getter: @swift_computed_getter ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -swift_computed_getter_body( - unique int swift_computed_getter: @swift_computed_getter ref, - unique int body: @swift_block ref -); - -swift_computed_getter_def( - unique int id: @swift_computed_getter, - int specifier: @swift_getter_specifier ref -); - -#keyset[swift_computed_modify, index] -swift_computed_modify_attribute( - int swift_computed_modify: @swift_computed_modify ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -swift_computed_modify_body( - unique int swift_computed_modify: @swift_computed_modify ref, - unique int body: @swift_block ref -); - -swift_computed_modify_def( - unique int id: @swift_computed_modify, - int specifier: @swift_modify_specifier ref -); - -@swift_computed_property_accessor_type = @swift_computed_getter | @swift_computed_modify | @swift_computed_setter - -#keyset[swift_computed_property, index] -swift_computed_property_accessor( - int swift_computed_property: @swift_computed_property ref, - int index: int ref, - unique int accessor: @swift_computed_property_accessor_type ref -); - -@swift_computed_property_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_computed_property, index] -swift_computed_property_statement( - int swift_computed_property: @swift_computed_property ref, - int index: int ref, - unique int statement: @swift_computed_property_statement_type ref -); - -swift_computed_property_def( - unique int id: @swift_computed_property -); - -#keyset[swift_computed_setter, index] -swift_computed_setter_attribute( - int swift_computed_setter: @swift_computed_setter ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -swift_computed_setter_body( - unique int swift_computed_setter: @swift_computed_setter ref, - unique int body: @swift_block ref -); - -swift_computed_setter_parameter( - unique int swift_computed_setter: @swift_computed_setter ref, - unique int parameter: @swift_token_simple_identifier ref -); - -swift_computed_setter_def( - unique int id: @swift_computed_setter, - int specifier: @swift_setter_specifier ref -); - -case @swift_conjunction_expression.op of - 0 = @swift_conjunction_expression_ampersandampersand -; - - -swift_conjunction_expression_def( - unique int id: @swift_conjunction_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -@swift_constructor_expression_constructed_type_type = @swift_array_type | @swift_dictionary_type | @swift_user_type - -swift_constructor_expression_def( - unique int id: @swift_constructor_expression, - int constructed_type: @swift_constructor_expression_constructed_type_type ref, - int suffix: @swift_constructor_suffix ref -); - -swift_constructor_suffix_arguments( - unique int swift_constructor_suffix: @swift_constructor_suffix ref, - unique int arguments: @swift_value_arguments ref -); - -#keyset[swift_constructor_suffix, index] -swift_constructor_suffix_lambda( - int swift_constructor_suffix: @swift_constructor_suffix ref, - int index: int ref, - unique int lambda: @swift_lambda_literal ref -); - -#keyset[swift_constructor_suffix, index] -swift_constructor_suffix_name( - int swift_constructor_suffix: @swift_constructor_suffix ref, - int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -swift_constructor_suffix_def( - unique int id: @swift_constructor_suffix -); - -@swift_control_transfer_statement_kind_type = @swift_reserved_word | @swift_token_throw_keyword - -swift_control_transfer_statement_result( - unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, - unique int result: @swift_expression ref -); - -swift_control_transfer_statement_def( - unique int id: @swift_control_transfer_statement, - int kind: @swift_control_transfer_statement_kind_type ref -); - -swift_deinit_declaration_modifiers( - unique int swift_deinit_declaration: @swift_deinit_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -swift_deinit_declaration_def( - unique int id: @swift_deinit_declaration, - int body: @swift_block ref -); - -@swift_deprecated_operator_declaration_body_entry_type = @swift_line_string_literal | @swift_multi_line_string_literal | @swift_raw_string_literal | @swift_reserved_word | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_simple_identifier - -#keyset[swift_deprecated_operator_declaration_body, index] -swift_deprecated_operator_declaration_body_entry( - int swift_deprecated_operator_declaration_body: @swift_deprecated_operator_declaration_body ref, - int index: int ref, - unique int entry: @swift_deprecated_operator_declaration_body_entry_type ref -); - -swift_deprecated_operator_declaration_body_def( - unique int id: @swift_deprecated_operator_declaration_body -); - -#keyset[swift_dictionary_literal, index] -swift_dictionary_literal_element( - int swift_dictionary_literal: @swift_dictionary_literal ref, - int index: int ref, - unique int element: @swift_dictionary_literal_item ref -); - -swift_dictionary_literal_def( - unique int id: @swift_dictionary_literal -); - -swift_dictionary_literal_item_def( - unique int id: @swift_dictionary_literal_item, - int key__: @swift_expression ref, - int value: @swift_expression ref -); - -swift_dictionary_type_def( - unique int id: @swift_dictionary_type, - int key__: @swift_type__ ref, - int value: @swift_type__ ref -); - -swift_didset_clause_modifiers( - unique int swift_didset_clause: @swift_didset_clause ref, - unique int modifiers: @swift_modifiers ref -); - -swift_didset_clause_parameter( - unique int swift_didset_clause: @swift_didset_clause ref, - unique int parameter: @swift_token_simple_identifier ref -); - -swift_didset_clause_def( - unique int id: @swift_didset_clause, - int body: @swift_block ref -); - -swift_directive_condition( - unique int swift_directive: @swift_directive ref, - unique int condition: @swift_compilation_condition ref -); - -swift_directive_def( - unique int id: @swift_directive -); - -swift_directly_assignable_expression_def( - unique int id: @swift_directly_assignable_expression, - int expr: @swift_expression ref -); - -case @swift_disjunction_expression.op of - 0 = @swift_disjunction_expression_pipepipe -; - - -swift_disjunction_expression_def( - unique int id: @swift_disjunction_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -#keyset[swift_do_statement, index] -swift_do_statement_catch( - int swift_do_statement: @swift_do_statement ref, - int index: int ref, - unique int catch: @swift_catch_block ref -); - -swift_do_statement_def( - unique int id: @swift_do_statement, - int body: @swift_block ref -); - -swift_enum_case_entry_data_contents( - unique int swift_enum_case_entry: @swift_enum_case_entry ref, - unique int data_contents: @swift_enum_type_parameters ref -); - -swift_enum_case_entry_raw_value( - unique int swift_enum_case_entry: @swift_enum_case_entry ref, - unique int raw_value: @swift_expression ref -); - -swift_enum_case_entry_def( - unique int id: @swift_enum_case_entry, - int name: @swift_token_simple_identifier ref -); - -@swift_enum_class_body_member_type = @swift_enum_entry | @swift_type_level_declaration - -#keyset[swift_enum_class_body, index] -swift_enum_class_body_member( - int swift_enum_class_body: @swift_enum_class_body ref, - int index: int ref, - unique int member: @swift_enum_class_body_member_type ref -); - -swift_enum_class_body_def( - unique int id: @swift_enum_class_body -); - -#keyset[swift_enum_entry, index] -swift_enum_entry_case( - int swift_enum_entry: @swift_enum_entry ref, - int index: int ref, - unique int case__: @swift_enum_case_entry ref -); - -swift_enum_entry_modifiers( - unique int swift_enum_entry: @swift_enum_entry ref, - unique int modifiers: @swift_modifiers ref -); - -swift_enum_entry_def( - unique int id: @swift_enum_entry -); - -swift_enum_type_parameter_default_value( - unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, - unique int default_value: @swift_expression ref -); - -swift_enum_type_parameter_external_name( - unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, - unique int external_name: @swift_token_wildcard_pattern ref -); - -swift_enum_type_parameter_name( - unique int swift_enum_type_parameter: @swift_enum_type_parameter ref, - unique int name: @swift_token_simple_identifier ref -); - -swift_enum_type_parameter_def( - unique int id: @swift_enum_type_parameter, - int type__: @swift_type__ ref -); - -#keyset[swift_enum_type_parameters, index] -swift_enum_type_parameters_parameter( - int swift_enum_type_parameters: @swift_enum_type_parameters ref, - int index: int ref, - unique int parameter: @swift_enum_type_parameter ref -); - -swift_enum_type_parameters_def( - unique int id: @swift_enum_type_parameters -); - -#keyset[swift_equality_constraint, index] -swift_equality_constraint_attribute( - int swift_equality_constraint: @swift_equality_constraint ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier - -swift_equality_constraint_def( - unique int id: @swift_equality_constraint, - int constrained_type: @swift_equality_constraint_constrained_type_type ref, - int must_equal: @swift_type__ ref -); - -case @swift_equality_expression.op of - 0 = @swift_equality_expression_bangequal -| 1 = @swift_equality_expression_bangequalequal -| 2 = @swift_equality_expression_equalequal -| 3 = @swift_equality_expression_equalequalequal -; - - -swift_equality_expression_def( - unique int id: @swift_equality_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -swift_existential_type_def( - unique int id: @swift_existential_type, - int name: @swift_unannotated_type ref -); - -@swift_expression = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_external_macro_definition_def( - unique int id: @swift_external_macro_definition, - int arguments: @swift_value_arguments ref -); - -swift_for_statement_try( - unique int swift_for_statement: @swift_for_statement ref, - unique int try: @swift_token_try_operator ref -); - -swift_for_statement_type( - unique int swift_for_statement: @swift_for_statement ref, - unique int type__: @swift_type_annotation ref -); - -swift_for_statement_where( - unique int swift_for_statement: @swift_for_statement ref, - unique int where: @swift_where_clause ref -); - -swift_for_statement_def( - unique int id: @swift_for_statement, - int body: @swift_block ref, - int collection: @swift_expression ref, - int item: @swift_pattern ref -); - -swift_function_declaration_async( - unique int swift_function_declaration: @swift_function_declaration ref, - unique int async: @swift_reserved_word ref -); - -@swift_function_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier - -#keyset[swift_function_declaration, index] -swift_function_declaration_modifiers( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int modifiers: @swift_function_declaration_modifiers_type ref -); - -@swift_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier - -#keyset[swift_function_declaration, index] -swift_function_declaration_parameter( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int parameter: @swift_function_parameter ref -); - -@swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_function_declaration_return_type( - unique int swift_function_declaration: @swift_function_declaration ref, - unique int return_type: @swift_function_declaration_return_type_type ref -); - -@swift_function_declaration_throws_type = @swift_throws_clause | @swift_token_throws - -swift_function_declaration_throws( - unique int swift_function_declaration: @swift_function_declaration ref, - unique int throws: @swift_function_declaration_throws_type ref -); - -swift_function_declaration_type_constraints( - unique int swift_function_declaration: @swift_function_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_function_declaration_type_parameters( - unique int swift_function_declaration: @swift_function_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_function_declaration_def( - unique int id: @swift_function_declaration, - int body: @swift_block ref, - int name: @swift_function_declaration_name_type ref -); - -swift_function_parameter_attribute( - unique int swift_function_parameter: @swift_function_parameter ref, - unique int attribute: @swift_attribute ref -); - -swift_function_parameter_default_value( - unique int swift_function_parameter: @swift_function_parameter ref, - unique int default_value: @swift_expression ref -); - -swift_function_parameter_def( - unique int id: @swift_function_parameter, - int parameter: @swift_parameter ref -); - -swift_function_type_async( - unique int swift_function_type: @swift_function_type ref, - unique int async: @swift_reserved_word ref -); - -@swift_function_type_throws_type = @swift_throws_clause | @swift_token_throws - -swift_function_type_throws( - unique int swift_function_type: @swift_function_type ref, - unique int throws: @swift_function_type_throws_type ref -); - -swift_function_type_def( - unique int id: @swift_function_type, - int params: @swift_unannotated_type ref, - int return_type: @swift_type__ ref -); - -@swift_getter_specifier_effect_type = @swift_throws_clause | @swift_token_async_keyword | @swift_token_throws - -#keyset[swift_getter_specifier, index] -swift_getter_specifier_effect( - int swift_getter_specifier: @swift_getter_specifier ref, - int index: int ref, - unique int effect: @swift_getter_specifier_effect_type ref -); - -swift_getter_specifier_mutation( - unique int swift_getter_specifier: @swift_getter_specifier ref, - unique int mutation: @swift_token_mutation_modifier ref -); - -swift_getter_specifier_def( - unique int id: @swift_getter_specifier -); - -@swift_global_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_typealias_declaration - -#keyset[swift_guard_statement, index] -swift_guard_statement_condition( - int swift_guard_statement: @swift_guard_statement ref, - int index: int ref, - unique int condition: @swift_if_condition ref -); - -swift_guard_statement_def( - unique int id: @swift_guard_statement, - int body: @swift_block ref -); - -#keyset[swift_identifier, index] -swift_identifier_part( - int swift_identifier: @swift_identifier ref, - int index: int ref, - unique int part: @swift_token_simple_identifier ref -); - -swift_identifier_def( - unique int id: @swift_identifier -); - -@swift_if_condition_kind_type = @swift_availability_condition | @swift_expression | @swift_if_let_binding - -swift_if_condition_def( - unique int id: @swift_if_condition, - int kind: @swift_if_condition_kind_type ref -); - -swift_if_let_binding_type( - unique int swift_if_let_binding: @swift_if_let_binding ref, - unique int type__: @swift_type_annotation ref -); - -swift_if_let_binding_value( - unique int swift_if_let_binding: @swift_if_let_binding ref, - unique int value: @swift_expression ref -); - -swift_if_let_binding_where( - unique int swift_if_let_binding: @swift_if_let_binding ref, - unique int where: @swift_where_clause ref -); - -swift_if_let_binding_def( - unique int id: @swift_if_let_binding, - int pattern: @swift_pattern ref -); - -#keyset[swift_if_statement, index] -swift_if_statement_condition( - int swift_if_statement: @swift_if_statement ref, - int index: int ref, - unique int condition: @swift_if_condition ref -); - -@swift_if_statement_else_branch_type = @swift_block | @swift_if_statement - -swift_if_statement_else_branch( - unique int swift_if_statement: @swift_if_statement ref, - unique int else_branch: @swift_if_statement_else_branch_type ref -); - -swift_if_statement_def( - unique int id: @swift_if_statement, - int body: @swift_block ref -); - -swift_implicitly_unwrapped_type_def( - unique int id: @swift_implicitly_unwrapped_type, - int name: @swift_type__ ref -); - -swift_import_declaration_modifiers( - unique int swift_import_declaration: @swift_import_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -swift_import_declaration_def( - unique int id: @swift_import_declaration, - int name: @swift_identifier ref -); - -swift_infix_expression_def( - unique int id: @swift_infix_expression, - int lhs: @swift_expression ref, - int op: @swift_token_custom_operator ref, - int rhs: @swift_expression ref -); - -#keyset[swift_inheritance_constraint, index] -swift_inheritance_constraint_attribute( - int swift_inheritance_constraint: @swift_inheritance_constraint ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier - -@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_inheritance_constraint_def( - unique int id: @swift_inheritance_constraint, - int constrained_type: @swift_inheritance_constraint_constrained_type_type ref, - int inherits_from: @swift_inheritance_constraint_inherits_from_type ref -); - -@swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type - -swift_inheritance_specifier_def( - unique int id: @swift_inheritance_specifier, - int inherits_from: @swift_inheritance_specifier_inherits_from_type ref -); - -swift_init_declaration_async( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int async: @swift_reserved_word ref -); - -swift_init_declaration_bang( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int bang: @swift_token_bang ref -); - -swift_init_declaration_body( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int body: @swift_block ref -); - -swift_init_declaration_modifiers( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -#keyset[swift_init_declaration, index] -swift_init_declaration_parameter( - int swift_init_declaration: @swift_init_declaration ref, - int index: int ref, - unique int parameter: @swift_function_parameter ref -); - -@swift_init_declaration_throws_type = @swift_throws_clause | @swift_token_throws - -swift_init_declaration_throws( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int throws: @swift_init_declaration_throws_type ref -); - -swift_init_declaration_type_constraints( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_init_declaration_type_parameters( - unique int swift_init_declaration: @swift_init_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_init_declaration_def( - unique int id: @swift_init_declaration -); - -swift_interpolated_expression_name( - unique int swift_interpolated_expression: @swift_interpolated_expression ref, - unique int name: @swift_value_argument_label ref -); - -#keyset[swift_interpolated_expression, index] -swift_interpolated_expression_reference_specifier( - int swift_interpolated_expression: @swift_interpolated_expression ref, - int index: int ref, - unique int reference_specifier: @swift_value_argument_label ref -); - -swift_interpolated_expression_type_modifiers( - unique int swift_interpolated_expression: @swift_interpolated_expression ref, - unique int type_modifiers: @swift_type_modifiers ref -); - -swift_interpolated_expression_value( - unique int swift_interpolated_expression: @swift_interpolated_expression ref, - unique int value: @swift_expression ref -); - -swift_interpolated_expression_def( - unique int id: @swift_interpolated_expression -); - -swift_key_path_component_name( - unique int swift_key_path_component: @swift_key_path_component ref, - unique int name: @swift_token_simple_identifier ref -); - -#keyset[swift_key_path_component, index] -swift_key_path_component_postfix( - int swift_key_path_component: @swift_key_path_component ref, - int index: int ref, - unique int postfix: @swift_key_path_postfix ref -); - -swift_key_path_component_def( - unique int id: @swift_key_path_component -); - -#keyset[swift_key_path_expression, index] -swift_key_path_expression_component( - int swift_key_path_expression: @swift_key_path_expression ref, - int index: int ref, - unique int component: @swift_key_path_component ref -); - -@swift_key_path_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_simple_user_type - -swift_key_path_expression_type( - unique int swift_key_path_expression: @swift_key_path_expression ref, - unique int type__: @swift_key_path_expression_type_type ref -); - -swift_key_path_expression_def( - unique int id: @swift_key_path_expression -); - -#keyset[swift_key_path_postfix, index] -swift_key_path_postfix_argument( - int swift_key_path_postfix: @swift_key_path_postfix ref, - int index: int ref, - unique int argument: @swift_value_argument ref -); - -swift_key_path_postfix_force_unwrap( - unique int swift_key_path_postfix: @swift_key_path_postfix ref, - unique int force_unwrap: @swift_token_bang ref -); - -swift_key_path_postfix_def( - unique int id: @swift_key_path_postfix -); - -swift_key_path_string_expression_def( - unique int id: @swift_key_path_string_expression, - int expr: @swift_expression ref -); - -swift_lambda_function_type_async( - unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int async: @swift_reserved_word ref -); - -swift_lambda_function_type_params( - unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int params: @swift_lambda_function_type_parameters ref -); - -@swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_lambda_function_type_return_type( - unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int return_type: @swift_lambda_function_type_return_type_type ref -); - -@swift_lambda_function_type_throws_type = @swift_throws_clause | @swift_token_throws - -swift_lambda_function_type_throws( - unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int throws: @swift_lambda_function_type_throws_type ref -); - -swift_lambda_function_type_def( - unique int id: @swift_lambda_function_type -); - -#keyset[swift_lambda_function_type_parameters, index] -swift_lambda_function_type_parameters_parameter( - int swift_lambda_function_type_parameters: @swift_lambda_function_type_parameters ref, - int index: int ref, - unique int parameter: @swift_lambda_parameter ref -); - -swift_lambda_function_type_parameters_def( - unique int id: @swift_lambda_function_type_parameters -); - -#keyset[swift_lambda_literal, index] -swift_lambda_literal_attribute( - int swift_lambda_literal: @swift_lambda_literal ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -swift_lambda_literal_captures( - unique int swift_lambda_literal: @swift_lambda_literal ref, - unique int captures: @swift_capture_list ref -); - -@swift_lambda_literal_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_lambda_literal, index] -swift_lambda_literal_statement( - int swift_lambda_literal: @swift_lambda_literal ref, - int index: int ref, - unique int statement: @swift_lambda_literal_statement_type ref -); - -swift_lambda_literal_type( - unique int swift_lambda_literal: @swift_lambda_literal ref, - unique int type__: @swift_lambda_function_type ref -); - -swift_lambda_literal_def( - unique int id: @swift_lambda_literal -); - -swift_lambda_parameter_external_name( - unique int swift_lambda_parameter: @swift_lambda_parameter ref, - unique int external_name: @swift_token_simple_identifier ref -); - -swift_lambda_parameter_modifiers( - unique int swift_lambda_parameter: @swift_lambda_parameter ref, - unique int modifiers: @swift_parameter_modifiers ref -); - -@swift_lambda_parameter_name_type = @swift_token_self_expression | @swift_token_simple_identifier - -@swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_lambda_parameter_type( - unique int swift_lambda_parameter: @swift_lambda_parameter ref, - unique int type__: @swift_lambda_parameter_type_type ref -); - -swift_lambda_parameter_def( - unique int id: @swift_lambda_parameter, - int name: @swift_lambda_parameter_name_type ref -); - -#keyset[swift_line_string_literal, index] -swift_line_string_literal_interpolation( - int swift_line_string_literal: @swift_line_string_literal ref, - int index: int ref, - unique int interpolation: @swift_interpolated_expression ref -); - -@swift_line_string_literal_text_type = @swift_token_line_str_text | @swift_token_str_escaped_char - -#keyset[swift_line_string_literal, index] -swift_line_string_literal_text( - int swift_line_string_literal: @swift_line_string_literal ref, - int index: int ref, - unique int text: @swift_line_string_literal_text_type ref -); - -swift_line_string_literal_def( - unique int id: @swift_line_string_literal -); - -@swift_local_declaration = @swift_class_declaration | @swift_function_declaration | @swift_property_declaration | @swift_typealias_declaration - -swift_macro_declaration_definition( - unique int swift_macro_declaration: @swift_macro_declaration ref, - unique int definition: @swift_macro_definition ref -); - -swift_macro_declaration_modifiers( - unique int swift_macro_declaration: @swift_macro_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -#keyset[swift_macro_declaration, index] -swift_macro_declaration_parameter( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int parameter: @swift_function_parameter ref -); - -swift_macro_declaration_return_type( - unique int swift_macro_declaration: @swift_macro_declaration ref, - unique int return_type: @swift_unannotated_type ref -); - -swift_macro_declaration_type_constraints( - unique int swift_macro_declaration: @swift_macro_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_macro_declaration_type_parameters( - unique int swift_macro_declaration: @swift_macro_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_macro_declaration_def( - unique int id: @swift_macro_declaration, - int name: @swift_token_simple_identifier ref -); - -@swift_macro_definition_body_type = @swift_expression | @swift_external_macro_definition - -swift_macro_definition_def( - unique int id: @swift_macro_definition, - int body: @swift_macro_definition_body_type ref -); - -swift_macro_invocation_type_parameters( - unique int swift_macro_invocation: @swift_macro_invocation ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_macro_invocation_def( - unique int id: @swift_macro_invocation, - int name: @swift_token_simple_identifier ref, - int suffix: @swift_call_suffix ref -); - -swift_metatype_def( - unique int id: @swift_metatype, - int name: @swift_unannotated_type ref -); - -@swift_modifiers_modifier_type = @swift_attribute | @swift_token_function_modifier | @swift_token_inheritance_modifier | @swift_token_member_modifier | @swift_token_mutation_modifier | @swift_token_ownership_modifier | @swift_token_parameter_modifier | @swift_token_property_behavior_modifier | @swift_token_property_modifier | @swift_token_visibility_modifier - -#keyset[swift_modifiers, index] -swift_modifiers_modifier( - int swift_modifiers: @swift_modifiers ref, - int index: int ref, - unique int modifier: @swift_modifiers_modifier_type ref -); - -swift_modifiers_def( - unique int id: @swift_modifiers -); - -swift_modify_specifier_mutation( - unique int swift_modify_specifier: @swift_modify_specifier ref, - unique int mutation: @swift_token_mutation_modifier ref -); - -swift_modify_specifier_def( - unique int id: @swift_modify_specifier -); - -#keyset[swift_multi_line_string_literal, index] -swift_multi_line_string_literal_interpolation( - int swift_multi_line_string_literal: @swift_multi_line_string_literal ref, - int index: int ref, - unique int interpolation: @swift_interpolated_expression ref -); - -@swift_multi_line_string_literal_text_type = @swift_reserved_word | @swift_token_multi_line_str_text | @swift_token_str_escaped_char - -#keyset[swift_multi_line_string_literal, index] -swift_multi_line_string_literal_text( - int swift_multi_line_string_literal: @swift_multi_line_string_literal ref, - int index: int ref, - unique int text: @swift_multi_line_string_literal_text_type ref -); - -swift_multi_line_string_literal_def( - unique int id: @swift_multi_line_string_literal -); - -case @swift_multiplicative_expression.op of - 0 = @swift_multiplicative_expression_percent -| 1 = @swift_multiplicative_expression_star -| 2 = @swift_multiplicative_expression_slash -; - - -swift_multiplicative_expression_def( - unique int id: @swift_multiplicative_expression, - int lhs: @swift_expression ref, - int op: int ref, - int rhs: @swift_expression ref -); - -@swift_navigation_expression_target_type = @swift_array_type | @swift_dictionary_type | @swift_expression | @swift_parenthesized_type | @swift_user_type - -swift_navigation_expression_def( - unique int id: @swift_navigation_expression, - int suffix: @swift_navigation_suffix ref, - int target: @swift_navigation_expression_target_type ref -); - -@swift_navigation_suffix_suffix_type = @swift_token_integer_literal | @swift_token_simple_identifier - -swift_navigation_suffix_def( - unique int id: @swift_navigation_suffix, - int suffix: @swift_navigation_suffix_suffix_type ref -); - -#keyset[swift_nested_type_identifier, index] -swift_nested_type_identifier_member( - int swift_nested_type_identifier: @swift_nested_type_identifier ref, - int index: int ref, - unique int member: @swift_token_simple_identifier ref -); - -swift_nested_type_identifier_def( - unique int id: @swift_nested_type_identifier, - int base: @swift_unannotated_type ref -); - -swift_nil_coalescing_expression_def( - unique int id: @swift_nil_coalescing_expression, - int if_nil: @swift_expression ref, - int value: @swift_expression ref -); - -swift_opaque_type_def( - unique int id: @swift_opaque_type, - int name: @swift_unannotated_type ref -); - -swift_open_end_range_expression_def( - unique int id: @swift_open_end_range_expression, - int start: @swift_expression ref -); - -swift_open_start_range_expression_def( - unique int id: @swift_open_start_range_expression, - int end: @swift_expression ref -); - -swift_operator_declaration_body( - unique int swift_operator_declaration: @swift_operator_declaration ref, - unique int body: @swift_deprecated_operator_declaration_body ref -); - -case @swift_operator_declaration.kind of - 0 = @swift_operator_declaration_infix -| 1 = @swift_operator_declaration_postfix -| 2 = @swift_operator_declaration_prefix -; - - -swift_operator_declaration_precedence_group( - unique int swift_operator_declaration: @swift_operator_declaration ref, - unique int precedence_group: @swift_token_simple_identifier ref -); - -swift_operator_declaration_def( - unique int id: @swift_operator_declaration, - int kind: int ref, - int name: @swift_referenceable_operator ref -); - -swift_optional_chain_marker_def( - unique int id: @swift_optional_chain_marker, - int expr: @swift_expression ref -); - -@swift_optional_type_wrapped_type = @swift_array_type | @swift_dictionary_type | @swift_tuple_type | @swift_user_type - -swift_optional_type_def( - unique int id: @swift_optional_type, - int wrapped: @swift_optional_type_wrapped_type ref -); - -swift_parameter_external_name( - unique int swift_parameter: @swift_parameter ref, - unique int external_name: @swift_token_simple_identifier ref -); - -swift_parameter_modifiers( - unique int swift_parameter: @swift_parameter ref, - unique int modifiers: @swift_parameter_modifiers ref -); - -@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_parameter_def( - unique int id: @swift_parameter, - int name: @swift_token_simple_identifier ref, - int type__: @swift_parameter_type_type ref -); - -#keyset[swift_parameter_modifiers, index] -swift_parameter_modifiers_modifier( - int swift_parameter_modifiers: @swift_parameter_modifiers ref, - int index: int ref, - unique int modifier: @swift_token_parameter_modifier ref -); - -swift_parameter_modifiers_def( - unique int id: @swift_parameter_modifiers -); - -@swift_parenthesized_type_type_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type - -swift_parenthesized_type_def( - unique int id: @swift_parenthesized_type, - int type__: @swift_parenthesized_type_type_type ref -); - -swift_pattern_binding( - unique int swift_pattern: @swift_pattern ref, - unique int binding: @swift_value_binding_pattern ref -); - -swift_pattern_bound_identifier( - unique int swift_pattern: @swift_pattern ref, - unique int bound_identifier: @swift_token_simple_identifier ref -); - -@swift_pattern_kind_type = @swift_binding_pattern | @swift_case_pattern | @swift_expression | @swift_token_wildcard_pattern | @swift_tuple_pattern | @swift_type_casting_pattern - -swift_pattern_def( - unique int id: @swift_pattern, - int kind: @swift_pattern_kind_type ref -); - -#keyset[swift_playground_literal, index] -swift_playground_literal_argument( - int swift_playground_literal: @swift_playground_literal ref, - int index: int ref, - unique int argument: @swift_playground_literal_argument ref -); - -case @swift_playground_literal.kind of - 0 = @swift_playground_literal_color_literal -| 1 = @swift_playground_literal_file_literal -| 2 = @swift_playground_literal_image_literal -; - - -swift_playground_literal_def( - unique int id: @swift_playground_literal, - int kind: int ref -); - -swift_playground_literal_argument_def( - unique int id: @swift_playground_literal_argument, - int name: @swift_token_simple_identifier ref, - int value: @swift_expression ref -); - -@swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang - -swift_postfix_expression_def( - unique int id: @swift_postfix_expression, - int operation: @swift_postfix_expression_operation_type ref, - int target: @swift_expression ref -); - -@swift_precedence_group_attribute_value_type = @swift_token_boolean_literal | @swift_token_simple_identifier - -swift_precedence_group_attribute_def( - unique int id: @swift_precedence_group_attribute, - int name: @swift_token_simple_identifier ref, - int value: @swift_precedence_group_attribute_value_type ref -); - -#keyset[swift_precedence_group_attributes, index] -swift_precedence_group_attributes_attribute( - int swift_precedence_group_attributes: @swift_precedence_group_attributes ref, - int index: int ref, - unique int attribute: @swift_precedence_group_attribute ref -); - -swift_precedence_group_attributes_def( - unique int id: @swift_precedence_group_attributes -); - -swift_precedence_group_declaration_attributes( - unique int swift_precedence_group_declaration: @swift_precedence_group_declaration ref, - unique int attributes: @swift_precedence_group_attributes ref -); - -swift_precedence_group_declaration_def( - unique int id: @swift_precedence_group_declaration, - int name: @swift_token_simple_identifier ref -); - -@swift_prefix_expression_operation_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator - -swift_prefix_expression_def( - unique int id: @swift_prefix_expression, - int operation: @swift_prefix_expression_operation_type ref, - int target: @swift_expression ref -); - -swift_property_binding_computed_value( - unique int swift_property_binding: @swift_property_binding ref, - unique int computed_value: @swift_computed_property ref -); - -swift_property_binding_observers( - unique int swift_property_binding: @swift_property_binding ref, - unique int observers: @swift_willset_didset_block ref -); - -swift_property_binding_type( - unique int swift_property_binding: @swift_property_binding ref, - unique int type__: @swift_type_annotation ref -); - -swift_property_binding_type_constraints( - unique int swift_property_binding: @swift_property_binding ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_property_binding_value( - unique int swift_property_binding: @swift_property_binding ref, - unique int value: @swift_expression ref -); - -swift_property_binding_def( - unique int id: @swift_property_binding, - int name: @swift_pattern ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_declarator( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int declarator: @swift_property_binding ref -); - -@swift_property_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier - -#keyset[swift_property_declaration, index] -swift_property_declaration_modifiers( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int modifiers: @swift_property_declaration_modifiers_type ref -); - -swift_property_declaration_def( - unique int id: @swift_property_declaration, - int binding: @swift_value_binding_pattern ref -); - -#keyset[swift_protocol_body, index] -swift_protocol_body_member( - int swift_protocol_body: @swift_protocol_body ref, - int index: int ref, - unique int member: @swift_protocol_member_declaration ref -); - -swift_protocol_body_def( - unique int id: @swift_protocol_body -); - -#keyset[swift_protocol_composition_type, index] -swift_protocol_composition_type_type( - int swift_protocol_composition_type: @swift_protocol_composition_type ref, - int index: int ref, - unique int type__: @swift_unannotated_type ref -); - -swift_protocol_composition_type_def( - unique int id: @swift_protocol_composition_type -); - -#keyset[swift_protocol_declaration, index] -swift_protocol_declaration_attribute( - int swift_protocol_declaration: @swift_protocol_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_protocol_declaration, index] -swift_protocol_declaration_inherits( - int swift_protocol_declaration: @swift_protocol_declaration ref, - int index: int ref, - unique int inherits: @swift_inheritance_specifier ref -); - -swift_protocol_declaration_modifiers( - unique int swift_protocol_declaration: @swift_protocol_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -swift_protocol_declaration_type_constraints( - unique int swift_protocol_declaration: @swift_protocol_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_protocol_declaration_type_parameters( - unique int swift_protocol_declaration: @swift_protocol_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_protocol_declaration_def( - unique int id: @swift_protocol_declaration, - int body: @swift_protocol_body ref, - int name: @swift_token_type_identifier ref -); - -swift_protocol_function_declaration_async( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int async: @swift_reserved_word ref -); - -swift_protocol_function_declaration_body( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int body: @swift_block ref -); - -swift_protocol_function_declaration_modifiers( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -@swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier - -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_parameter( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int parameter: @swift_function_parameter ref -); - -@swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_protocol_function_declaration_return_type( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int return_type: @swift_protocol_function_declaration_return_type_type ref -); - -@swift_protocol_function_declaration_throws_type = @swift_throws_clause | @swift_token_throws - -swift_protocol_function_declaration_throws( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int throws: @swift_protocol_function_declaration_throws_type ref -); - -swift_protocol_function_declaration_type_constraints( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_protocol_function_declaration_type_parameters( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_protocol_function_declaration_def( - unique int id: @swift_protocol_function_declaration, - int name: @swift_protocol_function_declaration_name_type ref -); - -@swift_protocol_member_declaration = @swift_associatedtype_declaration | @swift_deinit_declaration | @swift_init_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_subscript_declaration | @swift_typealias_declaration - -swift_protocol_property_declaration_modifiers( - unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -swift_protocol_property_declaration_type( - unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, - unique int type__: @swift_type_annotation ref -); - -swift_protocol_property_declaration_type_constraints( - unique int swift_protocol_property_declaration: @swift_protocol_property_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_protocol_property_declaration_def( - unique int id: @swift_protocol_property_declaration, - int name: @swift_pattern ref, - int requirements: @swift_protocol_property_requirements ref -); - -@swift_protocol_property_requirements_accessor_type = @swift_getter_specifier | @swift_setter_specifier - -#keyset[swift_protocol_property_requirements, index] -swift_protocol_property_requirements_accessor( - int swift_protocol_property_requirements: @swift_protocol_property_requirements ref, - int index: int ref, - unique int accessor: @swift_protocol_property_requirements_accessor_type ref -); - -swift_protocol_property_requirements_def( - unique int id: @swift_protocol_property_requirements -); - -case @swift_range_expression.op of - 0 = @swift_range_expression_dotdotdot -| 1 = @swift_range_expression_dotdotlangle -; - - -swift_range_expression_def( - unique int id: @swift_range_expression, - int end: @swift_expression ref, - int op: int ref, - int start: @swift_expression ref -); - -#keyset[swift_raw_str_interpolation, index] -swift_raw_str_interpolation_interpolation( - int swift_raw_str_interpolation: @swift_raw_str_interpolation ref, - int index: int ref, - unique int interpolation: @swift_interpolated_expression ref -); - -swift_raw_str_interpolation_def( - unique int id: @swift_raw_str_interpolation, - int start: @swift_token_raw_str_interpolation_start ref -); - -#keyset[swift_raw_string_literal, index] -swift_raw_string_literal_continuing( - int swift_raw_string_literal: @swift_raw_string_literal ref, - int index: int ref, - unique int continuing: @swift_token_raw_str_continuing_indicator ref -); - -#keyset[swift_raw_string_literal, index] -swift_raw_string_literal_interpolation( - int swift_raw_string_literal: @swift_raw_string_literal ref, - int index: int ref, - unique int interpolation: @swift_raw_str_interpolation ref -); - -@swift_raw_string_literal_text_type = @swift_token_raw_str_end_part | @swift_token_raw_str_part - -#keyset[swift_raw_string_literal, index] -swift_raw_string_literal_text( - int swift_raw_string_literal: @swift_raw_string_literal ref, - int index: int ref, - unique int text: @swift_raw_string_literal_text_type ref -); - -swift_raw_string_literal_def( - unique int id: @swift_raw_string_literal -); - -@swift_referenceable_operator_operator_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator - -swift_referenceable_operator_def( - unique int id: @swift_referenceable_operator, - int operator: @swift_referenceable_operator_operator_type ref -); - -#keyset[swift_repeat_while_statement, index] -swift_repeat_while_statement_condition( - int swift_repeat_while_statement: @swift_repeat_while_statement ref, - int index: int ref, - unique int condition: @swift_if_condition ref -); - -swift_repeat_while_statement_def( - unique int id: @swift_repeat_while_statement, - int body: @swift_block ref -); - -swift_selector_expression_def( - unique int id: @swift_selector_expression, - int expr: @swift_expression ref -); - -swift_setter_specifier_mutation( - unique int swift_setter_specifier: @swift_setter_specifier ref, - unique int mutation: @swift_token_mutation_modifier ref -); - -swift_setter_specifier_def( - unique int id: @swift_setter_specifier -); - -swift_simple_user_type_arguments( - unique int swift_simple_user_type: @swift_simple_user_type ref, - unique int arguments: @swift_type_arguments ref -); - -swift_simple_user_type_def( - unique int id: @swift_simple_user_type, - int name: @swift_token_type_identifier ref -); - -swift_source_file_shebang( - unique int swift_source_file: @swift_source_file ref, - unique int shebang: @swift_token_shebang_line ref -); - -@swift_source_file_statement_type = @swift_do_statement | @swift_expression | @swift_for_statement | @swift_global_declaration | @swift_guard_statement | @swift_repeat_while_statement | @swift_token_statement_label | @swift_token_throw_keyword | @swift_while_statement - -#keyset[swift_source_file, index] -swift_source_file_statement( - int swift_source_file: @swift_source_file ref, - int index: int ref, - unique int statement: @swift_source_file_statement_type ref -); - -swift_source_file_def( - unique int id: @swift_source_file -); - -swift_subscript_declaration_modifiers( - unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int modifiers: @swift_modifiers ref -); - -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_parameter( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int parameter: @swift_function_parameter ref -); - -@swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_subscript_declaration_return_type( - unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int return_type: @swift_subscript_declaration_return_type_type ref -); - -swift_subscript_declaration_type_constraints( - unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int type_constraints: @swift_type_constraints ref -); - -swift_subscript_declaration_type_parameters( - unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_subscript_declaration_def( - unique int id: @swift_subscript_declaration, - int body: @swift_computed_property ref -); - -swift_suppressed_constraint_def( - unique int id: @swift_suppressed_constraint, - int suppressed: @swift_token_type_identifier ref -); - -swift_switch_entry_default( - unique int swift_switch_entry: @swift_switch_entry ref, - unique int default: @swift_token_default_keyword ref -); - -swift_switch_entry_modifiers( - unique int swift_switch_entry: @swift_switch_entry ref, - unique int modifiers: @swift_modifiers ref -); - -#keyset[swift_switch_entry, index] -swift_switch_entry_pattern( - int swift_switch_entry: @swift_switch_entry ref, - int index: int ref, - unique int pattern: @swift_switch_pattern ref -); - -@swift_switch_entry_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_switch_entry, index] -swift_switch_entry_statement( - int swift_switch_entry: @swift_switch_entry ref, - int index: int ref, - unique int statement: @swift_switch_entry_statement_type ref -); - -swift_switch_entry_where( - unique int swift_switch_entry: @swift_switch_entry ref, - unique int where: @swift_where_clause ref -); - -swift_switch_entry_def( - unique int id: @swift_switch_entry -); - -swift_switch_pattern_def( - unique int id: @swift_switch_pattern, - int pattern: @swift_pattern ref -); - -#keyset[swift_switch_statement, index] -swift_switch_statement_entry( - int swift_switch_statement: @swift_switch_statement ref, - int index: int ref, - unique int entry: @swift_switch_entry ref -); - -swift_switch_statement_def( - unique int id: @swift_switch_statement, - int expr: @swift_expression ref -); - -swift_ternary_expression_def( - unique int id: @swift_ternary_expression, - int condition: @swift_expression ref, - int if_false: @swift_expression ref, - int if_true: @swift_expression ref -); - -swift_throws_clause_def( - unique int id: @swift_throws_clause, - int type__: @swift_unannotated_type ref -); - -swift_try_expression_def( - unique int id: @swift_try_expression, - int expr: @swift_expression ref, - int operator: @swift_token_try_operator ref -); - -#keyset[swift_tuple_expression, index] -swift_tuple_expression_element( - int swift_tuple_expression: @swift_tuple_expression ref, - int index: int ref, - unique int element: @swift_tuple_expression_item ref -); - -swift_tuple_expression_def( - unique int id: @swift_tuple_expression -); - -swift_tuple_expression_item_name( - unique int swift_tuple_expression_item: @swift_tuple_expression_item ref, - unique int name: @swift_token_simple_identifier ref -); - -swift_tuple_expression_item_def( - unique int id: @swift_tuple_expression_item, - int value: @swift_expression ref -); - -#keyset[swift_tuple_pattern, index] -swift_tuple_pattern_item( - int swift_tuple_pattern: @swift_tuple_pattern ref, +/*- Unified dbscheme -*/ +#keyset[unified_apply_pattern, index] +unified_apply_pattern_argument( + int unified_apply_pattern: @unified_apply_pattern ref, int index: int ref, - unique int item: @swift_tuple_pattern_item ref -); - -swift_tuple_pattern_def( - unique int id: @swift_tuple_pattern + unique int argument: @unified_pattern ref ); -swift_tuple_pattern_item_name( - unique int swift_tuple_pattern_item: @swift_tuple_pattern_item ref, - unique int name: @swift_token_simple_identifier ref +unified_apply_pattern_def( + unique int id: @unified_apply_pattern, + int constructor: @unified_expr ref ); -swift_tuple_pattern_item_def( - unique int id: @swift_tuple_pattern_item, - int pattern: @swift_pattern ref +unified_binary_expr_def( + unique int id: @unified_binary_expr, + int left: @unified_expr ref, + int operator: @unified_token_operator ref, + int right: @unified_expr ref ); -#keyset[swift_tuple_type, index] -swift_tuple_type_element( - int swift_tuple_type: @swift_tuple_type ref, +#keyset[unified_block_stmt, index] +unified_block_stmt_body( + int unified_block_stmt: @unified_block_stmt ref, int index: int ref, - unique int element: @swift_tuple_type_item ref -); - -swift_tuple_type_def( - unique int id: @swift_tuple_type -); - -swift_tuple_type_item_external_name( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int external_name: @swift_token_wildcard_pattern ref -); - -swift_tuple_type_item_modifiers( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int modifiers: @swift_parameter_modifiers ref -); - -swift_tuple_type_item_name( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int name: @swift_token_simple_identifier ref -); - -@swift_tuple_type_item_type_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_type__ - -swift_tuple_type_item_def( - unique int id: @swift_tuple_type_item, - int type__: @swift_tuple_type_item_type_type ref -); - -swift_type_modifiers( - unique int swift_type__: @swift_type__ ref, - unique int modifiers: @swift_type_modifiers ref + unique int body: @unified_stmt ref ); -swift_type_def( - unique int id: @swift_type__, - int name: @swift_unannotated_type ref +unified_block_stmt_def( + unique int id: @unified_block_stmt ); -@swift_type_annotation_type_type = @swift_implicitly_unwrapped_type | @swift_type__ - -swift_type_annotation_def( - unique int id: @swift_type_annotation, - int type__: @swift_type_annotation_type_type ref -); - -#keyset[swift_type_arguments, index] -swift_type_arguments_argument( - int swift_type_arguments: @swift_type_arguments ref, +#keyset[unified_call_expr, index] +unified_call_expr_argument( + int unified_call_expr: @unified_call_expr ref, int index: int ref, - unique int argument: @swift_type__ ref -); - -swift_type_arguments_def( - unique int id: @swift_type_arguments -); - -swift_type_casting_pattern_pattern( - unique int swift_type_casting_pattern: @swift_type_casting_pattern ref, - unique int pattern: @swift_pattern ref + unique int argument: @unified_expr ref ); -swift_type_casting_pattern_def( - unique int id: @swift_type_casting_pattern, - int type__: @swift_type__ ref +unified_call_expr_def( + unique int id: @unified_call_expr, + int function: @unified_expr ref ); -@swift_type_constraint_constraint_type = @swift_equality_constraint | @swift_inheritance_constraint - -swift_type_constraint_def( - unique int id: @swift_type_constraint, - int constraint: @swift_type_constraint_constraint_type ref -); +@unified_condition = @unified_expr_condition | @unified_let_pattern_condition | @unified_sequence_condition | @unified_token_unsupported_node -#keyset[swift_type_constraints, index] -swift_type_constraints_constraint( - int swift_type_constraints: @swift_type_constraints ref, - int index: int ref, - unique int constraint: @swift_type_constraint ref -); +@unified_expr = @unified_binary_expr | @unified_call_expr | @unified_lambda_expr | @unified_member_access_expr | @unified_name_expr | @unified_token_int_literal | @unified_token_string_literal | @unified_token_unsupported_node | @unified_unary_expr -swift_type_constraints_def( - unique int id: @swift_type_constraints, - int keyword: @swift_token_where_keyword ref +unified_expr_condition_def( + unique int id: @unified_expr_condition, + int expr: @unified_expr ref ); -@swift_type_level_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_typealias_declaration - -#keyset[swift_type_modifiers, index] -swift_type_modifiers_attribute( - int swift_type_modifiers: @swift_type_modifiers ref, - int index: int ref, - unique int attribute: @swift_attribute ref +unified_expr_stmt_def( + unique int id: @unified_expr_stmt, + int expr: @unified_expr ref ); -swift_type_modifiers_def( - unique int id: @swift_type_modifiers +unified_guard_if_stmt_def( + unique int id: @unified_guard_if_stmt, + int condition: @unified_condition ref, + int else: @unified_stmt ref ); -swift_type_pack_expansion_def( - unique int id: @swift_type_pack_expansion, - int name: @swift_unannotated_type ref +unified_if_stmt_else( + unique int unified_if_stmt: @unified_if_stmt ref, + unique int else: @unified_stmt ref ); -swift_type_parameter_modifiers( - unique int swift_type_parameter: @swift_type_parameter ref, - unique int modifiers: @swift_type_parameter_modifiers ref +unified_if_stmt_then( + unique int unified_if_stmt: @unified_if_stmt ref, + unique int then: @unified_stmt ref ); -@swift_type_parameter_name_type = @swift_token_type_identifier | @swift_type_parameter_pack - -swift_type_parameter_type( - unique int swift_type_parameter: @swift_type_parameter ref, - unique int type__: @swift_type__ ref +unified_if_stmt_def( + unique int id: @unified_if_stmt, + int condition: @unified_condition ref ); -swift_type_parameter_def( - unique int id: @swift_type_parameter, - int name: @swift_type_parameter_name_type ref -); +@unified_lambda_expr_body_type = @unified_expr | @unified_stmt -#keyset[swift_type_parameter_modifiers, index] -swift_type_parameter_modifiers_attribute( - int swift_type_parameter_modifiers: @swift_type_parameter_modifiers ref, +#keyset[unified_lambda_expr, index] +unified_lambda_expr_parameter( + int unified_lambda_expr: @unified_lambda_expr ref, int index: int ref, - unique int attribute: @swift_attribute ref + unique int parameter: @unified_parameter ref ); -swift_type_parameter_modifiers_def( - unique int id: @swift_type_parameter_modifiers +unified_lambda_expr_def( + unique int id: @unified_lambda_expr, + int body: @unified_lambda_expr_body_type ref ); -swift_type_parameter_pack_def( - unique int id: @swift_type_parameter_pack, - int name: @swift_unannotated_type ref +unified_let_pattern_condition_def( + unique int id: @unified_let_pattern_condition, + int pattern: @unified_pattern ref, + int value: @unified_expr ref ); -swift_type_parameters_constraints( - unique int swift_type_parameters: @swift_type_parameters ref, - unique int constraints: @swift_type_constraints ref +unified_member_access_expr_def( + unique int id: @unified_member_access_expr, + int member: @unified_token_identifier ref, + int target: @unified_expr ref ); -#keyset[swift_type_parameters, index] -swift_type_parameters_parameter( - int swift_type_parameters: @swift_type_parameters ref, - int index: int ref, - unique int parameter: @swift_type_parameter ref +unified_name_expr_def( + unique int id: @unified_name_expr, + int identifier: @unified_token_identifier ref ); -swift_type_parameters_def( - unique int id: @swift_type_parameters +unified_parameter_def( + unique int id: @unified_parameter, + int pattern: @unified_pattern ref ); -@swift_typealias_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier +@unified_pattern = @unified_apply_pattern | @unified_token_ignore_pattern | @unified_token_unsupported_node | @unified_tuple_pattern | @unified_var_pattern -#keyset[swift_typealias_declaration, index] -swift_typealias_declaration_modifiers( - int swift_typealias_declaration: @swift_typealias_declaration ref, +#keyset[unified_sequence_condition, index] +unified_sequence_condition_stmt( + int unified_sequence_condition: @unified_sequence_condition ref, int index: int ref, - unique int modifiers: @swift_typealias_declaration_modifiers_type ref -); - -swift_typealias_declaration_type_parameters( - unique int swift_typealias_declaration: @swift_typealias_declaration ref, - unique int type_parameters: @swift_type_parameters ref -); - -swift_typealias_declaration_def( - unique int id: @swift_typealias_declaration, - int name: @swift_token_type_identifier ref, - int value: @swift_type__ ref + unique int stmt: @unified_stmt ref ); -@swift_unannotated_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -#keyset[swift_user_type, index] -swift_user_type_part( - int swift_user_type: @swift_user_type ref, - int index: int ref, - unique int part: @swift_simple_user_type ref +unified_sequence_condition_def( + unique int id: @unified_sequence_condition, + int condition: @unified_condition ref ); -swift_user_type_def( - unique int id: @swift_user_type -); +@unified_stmt = @unified_block_stmt | @unified_expr_stmt | @unified_guard_if_stmt | @unified_if_stmt | @unified_token_empty_stmt | @unified_token_unsupported_node | @unified_variable_declaration_stmt -swift_value_argument_name( - unique int swift_value_argument: @swift_value_argument ref, - unique int name: @swift_value_argument_label ref -); +@unified_top_level_body_type = @unified_expr | @unified_stmt -#keyset[swift_value_argument, index] -swift_value_argument_reference_specifier( - int swift_value_argument: @swift_value_argument ref, +#keyset[unified_top_level, index] +unified_top_level_body( + int unified_top_level: @unified_top_level ref, int index: int ref, - unique int reference_specifier: @swift_value_argument_label ref -); - -swift_value_argument_type_modifiers( - unique int swift_value_argument: @swift_value_argument ref, - unique int type_modifiers: @swift_type_modifiers ref -); - -swift_value_argument_value( - unique int swift_value_argument: @swift_value_argument ref, - unique int value: @swift_expression ref + unique int body: @unified_top_level_body_type ref ); -swift_value_argument_def( - unique int id: @swift_value_argument +unified_top_level_def( + unique int id: @unified_top_level ); -swift_value_argument_label_def( - unique int id: @swift_value_argument_label, - int name: @swift_token_simple_identifier ref -); - -#keyset[swift_value_arguments, index] -swift_value_arguments_argument( - int swift_value_arguments: @swift_value_arguments ref, +#keyset[unified_tuple_pattern, index] +unified_tuple_pattern_element( + int unified_tuple_pattern: @unified_tuple_pattern ref, int index: int ref, - unique int argument: @swift_value_argument ref -); - -swift_value_arguments_def( - unique int id: @swift_value_arguments -); - -case @swift_value_binding_pattern.mutability of - 0 = @swift_value_binding_pattern_let -| 1 = @swift_value_binding_pattern_var -; - - -swift_value_binding_pattern_def( - unique int id: @swift_value_binding_pattern, - int mutability: int ref + unique int element: @unified_pattern ref ); -swift_value_pack_expansion_def( - unique int id: @swift_value_pack_expansion, - int expr: @swift_expression ref +unified_tuple_pattern_def( + unique int id: @unified_tuple_pattern ); -swift_value_parameter_pack_def( - unique int id: @swift_value_parameter_pack, - int expr: @swift_expression ref +unified_unary_expr_def( + unique int id: @unified_unary_expr, + int operand: @unified_expr ref, + int operator: @unified_token_operator ref ); -swift_where_clause_def( - unique int id: @swift_where_clause, - int expr: @swift_expression ref, - int keyword: @swift_token_where_keyword ref +unified_var_pattern_def( + unique int id: @unified_var_pattern, + int identifier: @unified_token_identifier ref ); -#keyset[swift_while_statement, index] -swift_while_statement_condition( - int swift_while_statement: @swift_while_statement ref, +#keyset[unified_variable_declaration_stmt, index] +unified_variable_declaration_stmt_variable_declarator( + int unified_variable_declaration_stmt: @unified_variable_declaration_stmt ref, int index: int ref, - unique int condition: @swift_if_condition ref -); - -swift_while_statement_def( - unique int id: @swift_while_statement, - int body: @swift_block ref -); - -swift_willset_clause_modifiers( - unique int swift_willset_clause: @swift_willset_clause ref, - unique int modifiers: @swift_modifiers ref -); - -swift_willset_clause_parameter( - unique int swift_willset_clause: @swift_willset_clause ref, - unique int parameter: @swift_token_simple_identifier ref -); - -swift_willset_clause_def( - unique int id: @swift_willset_clause, - int body: @swift_block ref + unique int variable_declarator: @unified_variable_declarator ref ); -swift_willset_didset_block_didset( - unique int swift_willset_didset_block: @swift_willset_didset_block ref, - unique int didset: @swift_didset_clause ref +unified_variable_declaration_stmt_def( + unique int id: @unified_variable_declaration_stmt ); -swift_willset_didset_block_willset( - unique int swift_willset_didset_block: @swift_willset_didset_block ref, - unique int willset: @swift_willset_clause ref +unified_variable_declarator_value( + unique int unified_variable_declarator: @unified_variable_declarator ref, + unique int value: @unified_expr ref ); -swift_willset_didset_block_def( - unique int id: @swift_willset_didset_block +unified_variable_declarator_def( + unique int id: @unified_variable_declarator, + int pattern: @unified_pattern ref ); -swift_tokeninfo( - unique int id: @swift_token, +unified_tokeninfo( + unique int id: @unified_token, int kind: int ref, string value: string ref ); -case @swift_token.kind of - 0 = @swift_reserved_word -| 1 = @swift_token_as_operator -| 2 = @swift_token_async_keyword -| 3 = @swift_token_bang -| 4 = @swift_token_bin_literal -| 5 = @swift_token_boolean_literal -| 6 = @swift_token_catch_keyword -| 7 = @swift_token_comment -| 8 = @swift_token_custom_operator -| 9 = @swift_token_default_keyword -| 10 = @swift_token_diagnostic -| 11 = @swift_token_fully_open_range -| 12 = @swift_token_function_modifier -| 13 = @swift_token_hex_literal -| 14 = @swift_token_inheritance_modifier -| 15 = @swift_token_integer_literal -| 16 = @swift_token_line_str_text -| 17 = @swift_token_member_modifier -| 18 = @swift_token_multi_line_str_text -| 19 = @swift_token_multiline_comment -| 20 = @swift_token_mutation_modifier -| 21 = @swift_token_oct_literal -| 22 = @swift_token_ownership_modifier -| 23 = @swift_token_parameter_modifier -| 24 = @swift_token_property_behavior_modifier -| 25 = @swift_token_property_modifier -| 26 = @swift_token_raw_str_continuing_indicator -| 27 = @swift_token_raw_str_end_part -| 28 = @swift_token_raw_str_interpolation_start -| 29 = @swift_token_raw_str_part -| 30 = @swift_token_real_literal -| 31 = @swift_token_regex_literal -| 32 = @swift_token_self_expression -| 33 = @swift_token_shebang_line -| 34 = @swift_token_simple_identifier -| 35 = @swift_token_special_literal -| 36 = @swift_token_statement_label -| 37 = @swift_token_str_escaped_char -| 38 = @swift_token_super_expression -| 39 = @swift_token_throw_keyword -| 40 = @swift_token_throws -| 41 = @swift_token_try_operator -| 42 = @swift_token_type_identifier -| 43 = @swift_token_visibility_modifier -| 44 = @swift_token_where_keyword -| 45 = @swift_token_wildcard_pattern +case @unified_token.kind of + 1 = @unified_token_empty_stmt +| 2 = @unified_token_identifier +| 3 = @unified_token_ignore_pattern +| 4 = @unified_token_int_literal +| 5 = @unified_token_operator +| 6 = @unified_token_string_literal +| 7 = @unified_token_unsupported_node ; -@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_block | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_literal_item | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_case_entry | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_declaration | @swift_function_parameter | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_playground_literal_argument | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_binding | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_expression_item | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block +@unified_ast_node = @unified_apply_pattern | @unified_binary_expr | @unified_block_stmt | @unified_call_expr | @unified_expr_condition | @unified_expr_stmt | @unified_guard_if_stmt | @unified_if_stmt | @unified_lambda_expr | @unified_let_pattern_condition | @unified_member_access_expr | @unified_name_expr | @unified_parameter | @unified_sequence_condition | @unified_token | @unified_top_level | @unified_tuple_pattern | @unified_unary_expr | @unified_var_pattern | @unified_variable_declaration_stmt | @unified_variable_declarator -swift_ast_node_location( - unique int node: @swift_ast_node ref, +unified_ast_node_location( + unique int node: @unified_ast_node ref, int loc: @location_default ref ); #keyset[parent, parent_index] -swift_ast_node_parent( - unique int node: @swift_ast_node ref, - int parent: @swift_ast_node ref, +unified_ast_node_parent( + unique int node: @unified_ast_node ref, + int parent: @unified_ast_node ref, int parent_index: int ref ); From 5f54a8691d3c1de741ecee37ebc9637e181c3467 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 27 May 2026 17:11:58 +0200 Subject: [PATCH 71/85] C++: Small cleanup. This has no effect on semantics. --- cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index fb2108c2ac5..5bab7dd00f2 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -276,6 +276,12 @@ private predicate isClassConstructedFrom(Class c, Class templateClass) { not c.isConstructedFrom(_) and c = templateClass } +/** Gets the fully templated version of `f`. */ +private Class getFullyTemplatedClass(Class c) { + not c.isFromUninstantiatedTemplate(_) and + isClassConstructedFrom(c, result) +} + /** * Holds if `f` is an instantiation of a function template `templateFunc`, or * holds with `f = templateFunc` if `f` is not an instantiation of any function @@ -312,7 +318,7 @@ private string withConst(string s, Type t) { if t.isConst() then result = "const " + s else result = s } -/** Prefixes `volatile` to `s` if `t` is const, or returns `s` otherwise. */ +/** Prefixes `volatile` to `s` if `t` is volatile, or returns `s` otherwise. */ bindingset[s, t] private string withVolatile(string s, Type t) { if t.isVolatile() then result = "volatile " + s else result = s @@ -490,7 +496,7 @@ pragma[nomagic] private string getTypeNameWithoutClassTemplates(Function f, int n, int remaining) { // If there is a declaring type then we start by expanding the function templates exists(Class template | - isClassConstructedFrom(f.getDeclaringType(), template) and + template = getFullyTemplatedClass(f.getDeclaringType()) and remaining = getNumberOfSupportedClassTemplateArguments(template) and result = getTypeNameWithoutFunctionTemplates(f, n, 0) ) @@ -502,7 +508,7 @@ private string getTypeNameWithoutClassTemplates(Function f, int n, int remaining or exists(string mid, TypeTemplateParameter tp, Class template | mid = getTypeNameWithoutClassTemplates(f, n, remaining + 1) and - isClassConstructedFrom(f.getDeclaringType(), template) and + template = getFullyTemplatedClass(f.getDeclaringType()) and tp = getSupportedClassTemplateArgument(template, remaining) | result = mid.replaceAll(tp.getName(), "class:" + remaining.toString()) From 35faec3db1e18b7aa9858779000b1e1c291bd138 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 27 May 2026 15:27:19 +0000 Subject: [PATCH 72/85] Python: Address review comments - Get rid of unnecessary parentheses - Use call syntax in the relevant test - Get rid of `dead(2)` annotation --- .../evaluation-order/BasicBlockOrdering.expected | 2 +- .../ControlFlow/evaluation-order/NoBackwardFlow.expected | 2 +- .../ControlFlow/evaluation-order/StrictForward.expected | 2 +- .../ControlFlow/evaluation-order/test_basic.py | 8 ++++---- .../ControlFlow/evaluation-order/test_boolean.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected index c5ef1ba9394..910fd3c8a80 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/BasicBlockOrdering.expected @@ -1,7 +1,7 @@ | test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:9:59:9:59 | IntegerLiteral | timestamp 2 | test_boolean.py:9:19:9:19 | IntegerLiteral | timestamp 0 | | test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:15:50:15:50 | IntegerLiteral | timestamp 1 | test_boolean.py:15:20:15:20 | IntegerLiteral | timestamp 0 | | test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:21:49:21:49 | IntegerLiteral | timestamp 1 | test_boolean.py:21:19:21:19 | IntegerLiteral | timestamp 0 | -| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:27:59:27:59 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:27:10:27:34 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:27:50:27:50 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | | test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:40:86:40:86 | IntegerLiteral | timestamp 3 | test_boolean.py:40:16:40:16 | IntegerLiteral | timestamp 0 | | test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:46:86:46:86 | IntegerLiteral | timestamp 3 | test_boolean.py:46:16:46:16 | IntegerLiteral | timestamp 0 | | test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Basic block ordering: $@ appears before $@ | test_boolean.py:52:120:52:120 | IntegerLiteral | timestamp 4 | test_boolean.py:52:20:52:20 | IntegerLiteral | timestamp 0 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected index 775cc7bdbbf..6e8ea12c9dd 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/NoBackwardFlow.expected @@ -1,7 +1,7 @@ | test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:9:59:9:59 | IntegerLiteral | 2 | test_boolean.py:9:10:9:13 | ControlFlowNode for True | True | test_boolean.py:9:19:9:19 | IntegerLiteral | 0 | | test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:15:50:15:50 | IntegerLiteral | 1 | test_boolean.py:15:10:15:14 | ControlFlowNode for False | False | test_boolean.py:15:20:15:20 | IntegerLiteral | 0 | | test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:21:49:21:49 | IntegerLiteral | 1 | test_boolean.py:21:10:21:13 | ControlFlowNode for True | True | test_boolean.py:21:19:21:19 | IntegerLiteral | 0 | -| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:27:59:27:59 | IntegerLiteral | 2 | test_boolean.py:27:10:27:14 | ControlFlowNode for False | False | test_boolean.py:27:20:27:20 | IntegerLiteral | 0 | +| test_boolean.py:27:10:27:34 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:27:50:27:50 | IntegerLiteral | 2 | test_boolean.py:27:10:27:14 | ControlFlowNode for False | False | test_boolean.py:27:20:27:20 | IntegerLiteral | 0 | | test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:40:86:40:86 | IntegerLiteral | 3 | test_boolean.py:40:10:40:10 | ControlFlowNode for IntegerLiteral | IntegerLiteral | test_boolean.py:40:16:40:16 | IntegerLiteral | 0 | | test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:46:86:46:86 | IntegerLiteral | 3 | test_boolean.py:46:10:46:10 | ControlFlowNode for IntegerLiteral | IntegerLiteral | test_boolean.py:46:16:46:16 | IntegerLiteral | 0 | | test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Backward flow: $@ flows to $@ (max timestamp $@) | test_boolean.py:52:120:52:120 | IntegerLiteral | 4 | test_boolean.py:52:11:52:47 | ControlFlowNode for BoolExpr | BoolExpr | test_boolean.py:52:63:52:63 | IntegerLiteral | 2 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected index 34e050b0f8a..6562ff9f7b2 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/StrictForward.expected @@ -1,7 +1,7 @@ | test_boolean.py:9:10:9:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:9:59:9:59 | IntegerLiteral | timestamp 2 | test_boolean.py:9:19:9:19 | IntegerLiteral | timestamp 0 | | test_boolean.py:15:10:15:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:15:50:15:50 | IntegerLiteral | timestamp 1 | test_boolean.py:15:20:15:20 | IntegerLiteral | timestamp 0 | | test_boolean.py:21:10:21:42 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:21:49:21:49 | IntegerLiteral | timestamp 1 | test_boolean.py:21:19:21:19 | IntegerLiteral | timestamp 0 | -| test_boolean.py:27:10:27:43 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:27:59:27:59 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | +| test_boolean.py:27:10:27:34 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:27:50:27:50 | IntegerLiteral | timestamp 2 | test_boolean.py:27:20:27:20 | IntegerLiteral | timestamp 0 | | test_boolean.py:40:10:40:61 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:40:86:40:86 | IntegerLiteral | timestamp 3 | test_boolean.py:40:16:40:16 | IntegerLiteral | timestamp 0 | | test_boolean.py:46:10:46:61 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:46:86:46:86 | IntegerLiteral | timestamp 3 | test_boolean.py:46:16:46:16 | IntegerLiteral | timestamp 0 | | test_boolean.py:52:10:52:95 | ControlFlowNode for BoolExpr | Strict forward violation: $@ flows to $@ | test_boolean.py:52:120:52:120 | IntegerLiteral | timestamp 4 | test_boolean.py:52:63:52:63 | IntegerLiteral | timestamp 2 | diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py index b98ebe7b95c..efea733b0d9 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_basic.py @@ -46,7 +46,7 @@ def test_nested_binary(t): @test def test_chained_add(t): """a + b + c is (a + b) + c: left to right.""" - x = ((1 @ t[0] + 2 @ t[1]) @ t[2] + 3 @ t[3]) @ t[4] + x = (1 @ t[0] + 2 @ t[1] + 3 @ t[2]) @ t[3] @test @@ -58,7 +58,7 @@ def test_mixed_precedence(t): @test def test_string_concat(t): """String concatenation operands: left to right.""" - x = (("hello" @ t[0] + " " @ t[1]) @ t[2] + "world" @ t[3]) @ t[4] + x = ("hello" @ t[0] + " " @ t[1] + "world" @ t[2]) @ t[3] @test @@ -142,8 +142,8 @@ def test_multiple_assignment(t): @test def test_callable_syntax(t): """t(value, n) is equivalent to value @ t[n].""" - x = (1 @ t[0] + 2 @ t[1]) @ t[2] - y = (x @ t[3] * 3 @ t[4]) @ t[5] + x = t(t(1, 0) + t(2, 1), 2) + y = t(t(x, 3) * t(3, 4), 5) @test diff --git a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py index a3b2268a831..a12975634f4 100644 --- a/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py +++ b/python/ql/test/library-tests/ControlFlow/evaluation-order/test_boolean.py @@ -24,7 +24,7 @@ def test_or_short_circuit(t): @test def test_or_both_sides(t): # False or X — both operands evaluated, result is X - x = (False @ t[0] or 42 @ t[1, dead(2)]) @ t[dead(1), 2] + x = (False @ t[0] or 42 @ t[1]) @ t[dead(1), 2] @test From 4fbea4ef95653911231071a846e41958a0d67579 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 27 May 2026 16:26:22 +0100 Subject: [PATCH 73/85] Swift: Autoformat. --- .../codeql/swift/security/WeakPasswordHashingExtensions.qll | 3 ++- .../swift/security/WeakSensitiveDataHashingExtensions.qll | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll index 8718e031e71..9442812ba2c 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll @@ -125,7 +125,8 @@ private class WeakPasswordHashingMetatypeSink extends WeakPasswordHashingSink { c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["SHA256", "SHA384", "SHA512"] and c.getQualifier().getType().getFullName() = algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] + c.getStaticTarget().getName() = + ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] ) } diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index dcb32995747..dbcd0beff7b 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -90,7 +90,8 @@ private class WeakSenitiveDataHashingMetatypeSink extends WeakSensitiveDataHashi c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["MD5", "SHA1"] and c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] + c.getStaticTarget().getName() = + ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] ) } From 5c2488e304766991c11044e4564d12413feb71db Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 27 May 2026 16:29:48 +0100 Subject: [PATCH 74/85] Swift: Fix typo. --- .../swift/security/WeakSensitiveDataHashingExtensions.qll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index dbcd0beff7b..58d9f466b78 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -71,10 +71,10 @@ private class WeakSensitiveDataHashingSinks extends SinkModelCsv { /** * A sink defined in a CSV model. */ -private class DefaultWeakSenitiveDataHashingSink extends WeakSensitiveDataHashingSink { +private class DefaultWeakSensitiveDataHashingSink extends WeakSensitiveDataHashingSink { string algorithm; - DefaultWeakSenitiveDataHashingSink() { sinkNode(this, "weak-hash-input-" + algorithm) } + DefaultWeakSensitiveDataHashingSink() { sinkNode(this, "weak-hash-input-" + algorithm) } override string getAlgorithm() { result = algorithm } } @@ -82,10 +82,10 @@ private class DefaultWeakSenitiveDataHashingSink extends WeakSensitiveDataHashin /** * A sink for weak sensitive data hashing through a call with a metatype qualifier. */ -private class WeakSenitiveDataHashingMetatypeSink extends WeakSensitiveDataHashingSink { +private class WeakSensitiveDataHashingMetatypeSink extends WeakSensitiveDataHashingSink { string algorithm; - WeakSenitiveDataHashingMetatypeSink() { + WeakSensitiveDataHashingMetatypeSink() { exists(CallExpr c | c.getAnArgument().getExpr() = this.asExpr() and algorithm = ["MD5", "SHA1"] and From ad56ebd3615131cb34643749e05651f2b6fd4da7 Mon Sep 17 00:00:00 2001 From: Asger F Date: Wed, 27 May 2026 21:25:32 +0200 Subject: [PATCH 75/85] Unified: update test output --- unified/ql/test/library-tests/BasicTest/test.expected | 9 --------- 1 file changed, 9 deletions(-) diff --git a/unified/ql/test/library-tests/BasicTest/test.expected b/unified/ql/test/library-tests/BasicTest/test.expected index 1d6bb8def2b..5298ec6f982 100644 --- a/unified/ql/test/library-tests/BasicTest/test.expected +++ b/unified/ql/test/library-tests/BasicTest/test.expected @@ -1,18 +1,9 @@ nameExpr -| name_expr.swift:1:9:1:9 | NameExpr | y | unsupported -| test.swift:1:1:1:17 | | | | test.swift:3:1:3:38 | | | -| test.swift:4:1:14:1 | | | | test.swift:16:1:16:32 | | | -| test.swift:17:1:21:1 | | | | test.swift:23:1:23:37 | | | -| test.swift:24:1:32:1 | | | | test.swift:34:1:34:49 | | | -| test.swift:35:1:55:1 | | | | test.swift:57:1:57:30 | | | -| test.swift:58:1:70:1 | | | | test.swift:72:1:72:37 | | | -| test.swift:73:1:82:1 | | | | test.swift:84:1:84:24 | | | -| test.swift:85:1:88:1 | | | From 313500e5812c00a6b7069f4eee07b1de70d401f8 Mon Sep 17 00:00:00 2001 From: Asger F Date: Wed, 27 May 2026 21:27:09 +0200 Subject: [PATCH 76/85] Unified: update test outputs --- .../extractor/tests/corpus/swift/closures.txt | 363 ++++----- .../tests/corpus/swift/collections.txt | 351 ++++----- .../tests/corpus/swift/control-flow.txt | 605 +++++++------- .../extractor/tests/corpus/swift/desugar.txt | 30 +- .../tests/corpus/swift/functions.txt | 423 +++++----- .../extractor/tests/corpus/swift/literals.txt | 46 +- .../extractor/tests/corpus/swift/loops.txt | 272 ++++--- .../tests/corpus/swift/operators.txt | 221 ++---- .../corpus/swift/optionals-and-errors.txt | 316 ++++---- .../extractor/tests/corpus/swift/types.txt | 741 ++++++++++-------- .../tests/corpus/swift/variables.txt | 236 +++--- 11 files changed, 1838 insertions(+), 1766 deletions(-) diff --git a/unified/extractor/tests/corpus/swift/closures.txt b/unified/extractor/tests/corpus/swift/closures.txt index 57dbfe79381..0afea480a19 100644 --- a/unified/extractor/tests/corpus/swift/closures.txt +++ b/unified/extractor/tests/corpus/swift/closures.txt @@ -7,54 +7,49 @@ let f = { (x: Int) -> Int in x * 2 } --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "f" - value: - lambda_literal - type: - lambda_function_type - return_type: - type - name: - user_type - type_identifier "Int" - lambda_function_type_parameters - lambda_parameter - name: simple_identifier "x" - type: - type - name: - user_type - type_identifier "Int" - statements - multiplicative_expression - lhs: simple_identifier "x" - op: * - rhs: integer_literal "2" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "f" + value: + lambda_literal + statement: + multiplicative_expression + lhs: simple_identifier "x" + op: * + rhs: integer_literal "2" + type: + lambda_function_type + params: + lambda_function_type_parameters + parameter: + lambda_parameter + name: simple_identifier "x" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + return_type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - lambda_expr - body: - binary_expr - operator: operator "*" - left: - name_expr - identifier: identifier "x" - right: int_literal "2" - pattern: - var_pattern - identifier: identifier "f" === Closure with shorthand parameters @@ -65,41 +60,28 @@ let f = { $0 + $1 } --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "f" - value: - lambda_literal - statements - additive_expression - lhs: simple_identifier "$0" - op: + - rhs: simple_identifier "$1" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "f" + value: + lambda_literal + statement: + additive_expression + lhs: simple_identifier "$0" + op: + + rhs: simple_identifier "$1" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - lambda_expr - body: - binary_expr - operator: operator "+" - left: - name_expr - identifier: identifier "$0" - right: - name_expr - identifier: identifier "$1" - pattern: - var_pattern - identifier: identifier "f" === Trailing closure @@ -110,40 +92,28 @@ xs.map { $0 * 2 } --- source_file - call_expression - navigation_expression + statement: + call_expression + function: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "map" + target: simple_identifier "xs" suffix: - navigation_suffix - suffix: simple_identifier "map" - target: simple_identifier "xs" - call_suffix - lambda_literal - statements - multiplicative_expression - lhs: simple_identifier "$0" - op: * - rhs: integer_literal "2" + call_suffix + lambda: + lambda_literal + statement: + multiplicative_expression + lhs: simple_identifier "$0" + op: * + rhs: integer_literal "2" --- top_level body: - call_expr - argument: - lambda_expr - body: - binary_expr - operator: operator "*" - left: - name_expr - identifier: identifier "$0" - right: int_literal "2" - function: - member_access_expr - target: - name_expr - identifier: identifier "xs" - member: identifier "map" === Closure with capture list @@ -154,50 +124,45 @@ let f = { [weak self] in self?.doThing() } --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "f" - value: - lambda_literal - captures: - capture_list - capture_list_item - name: simple_identifier "self" - ownership_modifier - statements - call_expression - navigation_expression - suffix: - navigation_suffix - suffix: simple_identifier "doThing" - target: - optional_chain_marker - self_expression - call_suffix - value_arguments - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "f" + value: + lambda_literal + captures: + capture_list + item: + capture_list_item + name: simple_identifier "self" + ownership: + ownership_modifier + statement: + call_expression + function: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "doThing" + target: + optional_chain_marker + expr: + self_expression + suffix: + call_suffix + arguments: + value_arguments --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - lambda_expr - body: - call_expr - argument: - function: - member_access_expr - target: unsupported_node "self?" - member: identifier "doThing" - pattern: - var_pattern - identifier: identifier "f" === Multi-statement closure @@ -211,71 +176,63 @@ let f = { (x: Int) -> Int in --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "f" - value: - lambda_literal - type: - lambda_function_type - return_type: - type - name: - user_type - type_identifier "Int" - lambda_function_type_parameters - lambda_parameter - name: simple_identifier "x" - type: - type - name: - user_type - type_identifier "Int" - statements - property_declaration - name: - pattern - bound_identifier: simple_identifier "y" - value: - additive_expression - lhs: simple_identifier "x" - op: + - rhs: integer_literal "1" - value_binding_pattern - mutability: let - control_transfer_statement - result: - multiplicative_expression - lhs: simple_identifier "y" - op: * - rhs: integer_literal "2" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "f" + value: + lambda_literal + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "y" + value: + additive_expression + lhs: simple_identifier "x" + op: + + rhs: integer_literal "1" + control_transfer_statement + kind: return + result: + multiplicative_expression + lhs: simple_identifier "y" + op: * + rhs: integer_literal "2" + type: + lambda_function_type + params: + lambda_function_type_parameters + parameter: + lambda_parameter + name: simple_identifier "x" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + return_type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - lambda_expr - body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - binary_expr - operator: operator "+" - left: - name_expr - identifier: identifier "x" - right: int_literal "1" - pattern: - var_pattern - identifier: identifier "y" - pattern: - var_pattern - identifier: identifier "f" diff --git a/unified/extractor/tests/corpus/swift/collections.txt b/unified/extractor/tests/corpus/swift/collections.txt index 9a1186ac77d..afafc1e69ef 100644 --- a/unified/extractor/tests/corpus/swift/collections.txt +++ b/unified/extractor/tests/corpus/swift/collections.txt @@ -7,30 +7,27 @@ let xs = [1, 2, 3] --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "xs" - value: - array_literal - element: - integer_literal "1" - integer_literal "2" - integer_literal "3" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "xs" + value: + array_literal + element: + integer_literal "1" + integer_literal "2" + integer_literal "3" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "[1, 2, 3]" - pattern: - var_pattern - identifier: identifier "xs" === Empty array literal with type @@ -41,36 +38,36 @@ let xs: [Int] = [] --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "xs" - value: - array_literal - value_binding_pattern - mutability: let - type_annotation - type: - type + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding name: - array_type - element: + pattern + bound_identifier: simple_identifier "xs" + type: + type_annotation + type: type name: - user_type - type_identifier "Int" + array_type + element: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + value: + array_literal --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "[]" - pattern: - var_pattern - identifier: identifier "xs" === Dictionary literal @@ -81,34 +78,34 @@ let d = ["a": 1, "b": 2] --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "d" - value: - dictionary_literal - key: - line_string_literal - text: line_str_text "a" - line_string_literal - text: line_str_text "b" - value: - integer_literal "1" - integer_literal "2" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "d" + value: + dictionary_literal + element: + dictionary_literal_item + key: + line_string_literal + text: line_str_text "a" + value: integer_literal "1" + dictionary_literal_item + key: + line_string_literal + text: line_str_text "b" + value: integer_literal "2" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "[\"a\": 1, \"b\": 2]" - pattern: - var_pattern - identifier: identifier "d" === Set literal @@ -119,41 +116,45 @@ let s: Set = [1, 2, 3] --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "s" - value: - array_literal - element: - integer_literal "1" - integer_literal "2" - integer_literal "3" - value_binding_pattern - mutability: let - type_annotation - type: - type + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding name: - user_type - type_identifier "Set" - type_arguments + pattern + bound_identifier: simple_identifier "s" + type: + type_annotation + type: type name: user_type - type_identifier "Int" + part: + simple_user_type + arguments: + type_arguments + argument: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + name: type_identifier "Set" + value: + array_literal + element: + integer_literal "1" + integer_literal "2" + integer_literal "3" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "[1, 2, 3]" - pattern: - var_pattern - identifier: identifier "s" === Tuple literal @@ -164,31 +165,32 @@ let t = (1, "two", 3.0) --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "t" - value: - tuple_expression - value: - integer_literal "1" - line_string_literal - text: line_str_text "two" - real_literal "3.0" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "t" + value: + tuple_expression + element: + tuple_expression_item + value: integer_literal "1" + tuple_expression_item + value: + line_string_literal + text: line_str_text "two" + tuple_expression_item + value: real_literal "3.0" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "(1, \"two\", 3.0)" - pattern: - var_pattern - identifier: identifier "t" === Subscript access @@ -202,22 +204,29 @@ let first = xs[0] --- source_file + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "first" + value: + call_expression + function: simple_identifier "xs" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "0" comment "// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape" comment "// as `xs(0)`), so the mapping currently produces a call_expr. Update the" comment "// parser / add a separate subscript_expr node and remap when fixed." - property_declaration - name: - pattern - bound_identifier: simple_identifier "first" - value: - call_expression - simple_identifier "xs" - call_suffix - value_arguments - value_argument - value: integer_literal "0" - value_binding_pattern - mutability: let --- @@ -226,18 +235,6 @@ top_level unsupported_node "// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape" unsupported_node "// as `xs(0)`), so the mapping currently produces a call_expr. Update the" unsupported_node "// parser / add a separate subscript_expr node and remap when fixed." - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - call_expr - argument: int_literal "0" - function: - name_expr - identifier: identifier "xs" - pattern: - var_pattern - identifier: identifier "first" === Dictionary subscript @@ -250,23 +247,30 @@ let v = d["key"] --- source_file + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "v" + value: + call_expression + function: simple_identifier "d" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + line_string_literal + text: line_str_text "key" comment "// TODO: same parser issue as the array subscript case above —" comment "// `d[\"key\"]` is parsed as `call_expression(d, (\"key\"))`." - property_declaration - name: - pattern - bound_identifier: simple_identifier "v" - value: - call_expression - simple_identifier "d" - call_suffix - value_arguments - value_argument - value: - line_string_literal - text: line_str_text "key" - value_binding_pattern - mutability: let --- @@ -274,18 +278,6 @@ top_level body: unsupported_node "// TODO: same parser issue as the array subscript case above —" unsupported_node "// `d[\"key\"]` is parsed as `call_expression(d, (\"key\"))`." - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - call_expr - argument: string_literal "\"key\"" - function: - name_expr - identifier: identifier "d" - pattern: - var_pattern - identifier: identifier "v" === Tuple member access @@ -296,27 +288,24 @@ let n = t.0 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "n" - value: - navigation_expression - suffix: - navigation_suffix - suffix: integer_literal "0" - target: simple_identifier "t" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "n" + value: + navigation_expression + suffix: + navigation_suffix + suffix: integer_literal "0" + target: simple_identifier "t" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "t.0" - pattern: - var_pattern - identifier: identifier "n" diff --git a/unified/extractor/tests/corpus/swift/control-flow.txt b/unified/extractor/tests/corpus/swift/control-flow.txt index f8526183d4d..600e1126cbf 100644 --- a/unified/extractor/tests/corpus/swift/control-flow.txt +++ b/unified/extractor/tests/corpus/swift/control-flow.txt @@ -9,41 +9,32 @@ if x > 0 { --- source_file - if_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "x" + statement: + if_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "x" + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" --- top_level body: - if_stmt - condition: - expr_condition - expr: unsupported_node "x > 0" - then: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: - name_expr - identifier: identifier "x" - function: - name_expr - identifier: identifier "print" === If-else @@ -58,67 +49,47 @@ if x > 0 { --- source_file - if_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "x" - else "else" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: - prefix_expression - operation: - - target: simple_identifier "x" + statement: + if_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "x" + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" + else_branch: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + prefix_expression + operation: - + target: simple_identifier "x" --- top_level body: - if_stmt - condition: - expr_condition - expr: unsupported_node "x > 0" - else: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: - unary_expr - operator: operator "-" - operand: - name_expr - identifier: identifier "x" - function: - name_expr - identifier: identifier "print" - then: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: - name_expr - identifier: identifier "x" - function: - name_expr - identifier: identifier "print" === If-else-if chain @@ -135,87 +106,65 @@ if x > 0 { --- source_file - if_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: integer_literal "1" - else "else" + statement: if_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "1" condition: if_condition - comparison_expression - lhs: simple_identifier "x" - op: < - rhs: integer_literal "0" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: integer_literal "2" - else "else" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: integer_literal "3" + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" + else_branch: + if_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "2" + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: < + rhs: integer_literal "0" + else_branch: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "3" --- top_level body: - if_stmt - condition: - expr_condition - expr: unsupported_node "x > 0" - else: - if_stmt - condition: - expr_condition - expr: unsupported_node "x < 0" - else: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: int_literal "3" - function: - name_expr - identifier: identifier "print" - then: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: int_literal "2" - function: - name_expr - identifier: identifier "print" - then: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: int_literal "1" - function: - name_expr - identifier: identifier "print" === If-let optional binding @@ -228,42 +177,36 @@ if let value = optional { --- source_file - if_statement - condition: - if_condition - if_let_binding - bound_identifier: simple_identifier "value" - value_binding_pattern - mutability: let - simple_identifier "optional" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "value" + statement: + if_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "value" + condition: + if_condition + kind: + if_let_binding + pattern: + pattern + binding: + value_binding_pattern + mutability: let + bound_identifier: simple_identifier "value" + value: simple_identifier "optional" --- top_level body: - if_stmt - condition: - expr_condition - expr: unsupported_node "let value = optional" - then: - block_stmt - body: - expr_stmt - expr: - call_expr - argument: - name_expr - identifier: identifier "value" - function: - name_expr - identifier: identifier "print" === Guard let @@ -274,22 +217,29 @@ guard let value = optional else { return } --- source_file - guard_statement - condition: - if_condition - if_let_binding - bound_identifier: simple_identifier "value" - value_binding_pattern - mutability: let - simple_identifier "optional" - else "else" - statements - control_transfer_statement + statement: + guard_statement + body: + block + statement: + control_transfer_statement + kind: return + condition: + if_condition + kind: + if_let_binding + pattern: + pattern + binding: + value_binding_pattern + mutability: let + bound_identifier: simple_identifier "value" + value: simple_identifier "optional" --- top_level - body: unsupported_node "guard let value = optional else { return }" + body: === Ternary expression @@ -300,36 +250,33 @@ let y = x > 0 ? 1 : -1 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "y" - value: - ternary_expression - condition: - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - if_false: - prefix_expression - operation: - - target: integer_literal "1" - if_true: integer_literal "1" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "y" + value: + ternary_expression + condition: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" + if_false: + prefix_expression + operation: - + target: integer_literal "1" + if_true: integer_literal "1" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "x > 0 ? 1 : -1" - pattern: - var_pattern - identifier: identifier "y" === Switch statement @@ -347,53 +294,69 @@ default: --- source_file - switch_statement - expr: simple_identifier "x" - switch_entry - switch_pattern - pattern - integer_literal "1" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: - line_string_literal - text: line_str_text "one" - switch_entry - switch_pattern - pattern - integer_literal "2" - switch_pattern - pattern - integer_literal "3" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: - line_string_literal - text: line_str_text "two or three" - switch_entry - default_keyword "default" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: - line_string_literal - text: line_str_text "other" + statement: + switch_statement + entry: + switch_entry + pattern: + switch_pattern + pattern: + pattern + kind: integer_literal "1" + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + line_string_literal + text: line_str_text "one" + switch_entry + pattern: + switch_pattern + pattern: + pattern + kind: integer_literal "2" + switch_pattern + pattern: + pattern + kind: integer_literal "3" + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + line_string_literal + text: line_str_text "two or three" + switch_entry + default: default_keyword "default" + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + line_string_literal + text: line_str_text "other" + expr: simple_identifier "x" --- top_level - body: unsupported_node "switch x {\ncase 1:\n print(\"one\")\ncase 2, 3:\n print(\"two or three\")\ndefault:\n print(\"other\")\n}" + body: === Switch with binding pattern @@ -409,40 +372,76 @@ case .square(let s): --- source_file - switch_statement - expr: simple_identifier "shape" - switch_entry - switch_pattern - pattern - simple_identifier "circle" - pattern - bound_identifier: simple_identifier "r" - value_binding_pattern - mutability: let - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "r" - switch_entry - switch_pattern - pattern - simple_identifier "square" - pattern - bound_identifier: simple_identifier "s" - value_binding_pattern - mutability: let - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "s" + statement: + switch_statement + entry: + switch_entry + pattern: + switch_pattern + pattern: + pattern + kind: + case_pattern + arguments: + tuple_pattern + item: + tuple_pattern_item + pattern: + pattern + kind: + binding_pattern + binding: + value_binding_pattern + mutability: let + pattern: + pattern + bound_identifier: simple_identifier "r" + name: simple_identifier "circle" + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "r" + switch_entry + pattern: + switch_pattern + pattern: + pattern + kind: + case_pattern + arguments: + tuple_pattern + item: + tuple_pattern_item + pattern: + pattern + kind: + binding_pattern + binding: + value_binding_pattern + mutability: let + pattern: + pattern + bound_identifier: simple_identifier "s" + name: simple_identifier "square" + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "s" + expr: simple_identifier "shape" --- top_level - body: unsupported_node "switch shape {\ncase .circle(let r):\n print(r)\ncase .square(let s):\n print(s)\n}" + body: diff --git a/unified/extractor/tests/corpus/swift/desugar.txt b/unified/extractor/tests/corpus/swift/desugar.txt index 4e0defef022..9f9ffeb070a 100644 --- a/unified/extractor/tests/corpus/swift/desugar.txt +++ b/unified/extractor/tests/corpus/swift/desugar.txt @@ -7,19 +7,16 @@ Additive expression is desugared --- source_file - additive_expression - lhs: integer_literal "1" - op: + - rhs: integer_literal "2" + statement: + additive_expression + lhs: integer_literal "1" + op: + + rhs: integer_literal "2" --- top_level body: - binary_expr - operator: operator "+" - left: int_literal "1" - right: int_literal "2" === Another additive expression is desugared @@ -30,20 +27,13 @@ foo + bar --- source_file - additive_expression - lhs: simple_identifier "foo" - op: + - rhs: simple_identifier "bar" + statement: + additive_expression + lhs: simple_identifier "foo" + op: + + rhs: simple_identifier "bar" --- top_level body: - binary_expr - operator: operator "+" - left: - name_expr - identifier: identifier "foo" - right: - name_expr - identifier: identifier "bar" diff --git a/unified/extractor/tests/corpus/swift/functions.txt b/unified/extractor/tests/corpus/swift/functions.txt index 3329a6255f3..0a8210a4cf7 100644 --- a/unified/extractor/tests/corpus/swift/functions.txt +++ b/unified/extractor/tests/corpus/swift/functions.txt @@ -9,24 +9,28 @@ func greet() { --- source_file - function_declaration - body: - function_body - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: - line_string_literal - text: line_str_text "hello" - name: simple_identifier "greet" + statement: + function_declaration + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: + line_string_literal + text: line_str_text "hello" + name: simple_identifier "greet" --- top_level - body: unsupported_node "func greet() {\n print(\"hello\")\n}" + body: === Function with parameters and return type @@ -39,43 +43,56 @@ func add(_ a: Int, _ b: Int) -> Int { --- source_file - function_declaration - body: - function_body - statements - control_transfer_statement - result: - additive_expression - lhs: simple_identifier "a" - op: + - rhs: simple_identifier "b" - name: simple_identifier "add" - return_type: - type - name: - user_type - type_identifier "Int" - parameter - external_name: simple_identifier "_" - name: simple_identifier "a" - type: + statement: + function_declaration + body: + block + statement: + control_transfer_statement + kind: return + result: + additive_expression + lhs: simple_identifier "a" + op: + + rhs: simple_identifier "b" + name: simple_identifier "add" + parameter: + function_parameter + parameter: + parameter + external_name: simple_identifier "_" + name: simple_identifier "a" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + function_parameter + parameter: + parameter + external_name: simple_identifier "_" + name: simple_identifier "b" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + return_type: type name: user_type - type_identifier "Int" - parameter - external_name: simple_identifier "_" - name: simple_identifier "b" - type: - type - name: - user_type - type_identifier "Int" + part: + simple_user_type + name: type_identifier "Int" --- top_level - body: unsupported_node "func add(_ a: Int, _ b: Int) -> Int {\n return a + b\n}" + body: === Function with named parameters @@ -88,30 +105,39 @@ func greet(person name: String) { --- source_file - function_declaration - body: - function_body - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "name" - name: simple_identifier "greet" - parameter - external_name: simple_identifier "person" - name: simple_identifier "name" - type: - type - name: - user_type - type_identifier "String" + statement: + function_declaration + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "name" + name: simple_identifier "greet" + parameter: + function_parameter + parameter: + parameter + external_name: simple_identifier "person" + name: simple_identifier "name" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "String" --- top_level - body: unsupported_node "func greet(person name: String) {\n print(name)\n}" + body: === Function with default parameter value @@ -124,32 +150,41 @@ func greet(name: String = "world") { --- source_file - function_declaration - body: - function_body - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "name" - default_value: - line_string_literal - text: line_str_text "world" - name: simple_identifier "greet" - parameter - name: simple_identifier "name" - type: - type - name: - user_type - type_identifier "String" + statement: + function_declaration + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "name" + name: simple_identifier "greet" + parameter: + function_parameter + default_value: + line_string_literal + text: line_str_text "world" + parameter: + parameter + name: simple_identifier "name" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "String" --- top_level - body: unsupported_node "func greet(name: String = \"world\") {\n print(name)\n}" + body: === Variadic function @@ -162,44 +197,58 @@ func sum(_ values: Int...) -> Int { --- source_file - function_declaration - body: - function_body - statements - control_transfer_statement - result: - call_expression - navigation_expression + statement: + function_declaration + body: + block + statement: + control_transfer_statement + kind: return + result: + call_expression + function: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "reduce" + target: simple_identifier "values" suffix: - navigation_suffix - suffix: simple_identifier "reduce" - target: simple_identifier "values" - call_suffix - value_arguments - value_argument - value: integer_literal "0" - value_argument - value: - referenceable_operator - name: simple_identifier "sum" - return_type: - type - name: - user_type - type_identifier "Int" - parameter - external_name: simple_identifier "_" - name: simple_identifier "values" - type: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "0" + value_argument + value: + referenceable_operator + operator: + + name: simple_identifier "sum" + parameter: + function_parameter + parameter: + parameter + external_name: simple_identifier "_" + name: simple_identifier "values" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + return_type: type name: user_type - type_identifier "Int" + part: + simple_user_type + name: type_identifier "Int" --- top_level - body: unsupported_node "func sum(_ values: Int...) -> Int {\n return values.reduce(0, +)\n}" + body: === Function call @@ -210,26 +259,23 @@ foo(1, 2) --- source_file - call_expression - simple_identifier "foo" - call_suffix - value_arguments - value_argument - value: integer_literal "1" - value_argument - value: integer_literal "2" + statement: + call_expression + function: simple_identifier "foo" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "1" + value_argument + value: integer_literal "2" --- top_level body: - call_expr - argument: - int_literal "1" - int_literal "2" - function: - name_expr - identifier: identifier "foo" === Function call with labelled arguments @@ -240,27 +286,26 @@ greet(person: "Bob") --- source_file - call_expression - simple_identifier "greet" - call_suffix - value_arguments - value_argument - name: - value_argument_label - simple_identifier "person" - value: - line_string_literal - text: line_str_text "Bob" + statement: + call_expression + function: simple_identifier "greet" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + name: + value_argument_label + name: simple_identifier "person" + value: + line_string_literal + text: line_str_text "Bob" --- top_level body: - call_expr - argument: string_literal "\"Bob\"" - function: - name_expr - identifier: identifier "greet" === Method call @@ -271,29 +316,26 @@ list.append(1) --- source_file - call_expression - navigation_expression + statement: + call_expression + function: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "append" + target: simple_identifier "list" suffix: - navigation_suffix - suffix: simple_identifier "append" - target: simple_identifier "list" - call_suffix - value_arguments - value_argument - value: integer_literal "1" + call_suffix + arguments: + value_arguments + argument: + value_argument + value: integer_literal "1" --- top_level body: - call_expr - argument: int_literal "1" - function: - member_access_expr - target: - name_expr - identifier: identifier "list" - member: identifier "append" === Generic function @@ -306,31 +348,42 @@ func identity(_ x: T) -> T { --- source_file - function_declaration - body: - function_body - statements - control_transfer_statement - result: simple_identifier "x" - name: simple_identifier "identity" - return_type: - type - name: - user_type - type_identifier "T" - type_parameters - type_parameter - type_identifier "T" - parameter - external_name: simple_identifier "_" - name: simple_identifier "x" - type: + statement: + function_declaration + body: + block + statement: + control_transfer_statement + kind: return + result: simple_identifier "x" + name: simple_identifier "identity" + parameter: + function_parameter + parameter: + parameter + external_name: simple_identifier "_" + name: simple_identifier "x" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "T" + return_type: type name: user_type - type_identifier "T" + part: + simple_user_type + name: type_identifier "T" + type_parameters: + type_parameters + parameter: + type_parameter + name: type_identifier "T" --- top_level - body: unsupported_node "func identity(_ x: T) -> T {\n return x\n}" + body: diff --git a/unified/extractor/tests/corpus/swift/literals.txt b/unified/extractor/tests/corpus/swift/literals.txt index 5f44733e136..5044831a869 100644 --- a/unified/extractor/tests/corpus/swift/literals.txt +++ b/unified/extractor/tests/corpus/swift/literals.txt @@ -7,12 +7,12 @@ Integer literal --- source_file - integer_literal "42" + statement: integer_literal "42" --- top_level - body: int_literal "42" + body: === Negative integer literal @@ -23,17 +23,15 @@ Negative integer literal --- source_file - prefix_expression - operation: - - target: integer_literal "7" + statement: + prefix_expression + operation: - + target: integer_literal "7" --- top_level body: - unary_expr - operator: operator "-" - operand: int_literal "7" === Floating-point literal @@ -44,12 +42,12 @@ Floating-point literal --- source_file - real_literal "3.14" + statement: real_literal "3.14" --- top_level - body: unsupported_node "3.14" + body: === Boolean literals @@ -61,15 +59,14 @@ false --- source_file - boolean_literal - boolean_literal + statement: + boolean_literal + boolean_literal --- top_level body: - unsupported_node "true" - unsupported_node "false" === Nil literal @@ -80,6 +77,7 @@ nil --- source_file + statement: nil --- @@ -95,13 +93,14 @@ String literal --- source_file - line_string_literal - text: line_str_text "hello" + statement: + line_string_literal + text: line_str_text "hello" --- top_level - body: string_literal "\"hello\"" + body: === String with interpolation @@ -112,13 +111,14 @@ String with interpolation --- source_file - line_string_literal - interpolation: - interpolated_expression - value: simple_identifier "name" - text: line_str_text "hello " + statement: + line_string_literal + interpolation: + interpolated_expression + value: simple_identifier "name" + text: line_str_text "hello " --- top_level - body: string_literal "\"hello \\(name)\"" + body: diff --git a/unified/extractor/tests/corpus/swift/loops.txt b/unified/extractor/tests/corpus/swift/loops.txt index 62d0d097bb0..8b9f3410d35 100644 --- a/unified/extractor/tests/corpus/swift/loops.txt +++ b/unified/extractor/tests/corpus/swift/loops.txt @@ -9,28 +9,34 @@ for x in [1, 2, 3] { --- source_file - for_statement - collection: - array_literal - element: - integer_literal "1" - integer_literal "2" - integer_literal "3" - item: - pattern - bound_identifier: simple_identifier "x" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "x" + statement: + for_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "x" + collection: + array_literal + element: + integer_literal "1" + integer_literal "2" + integer_literal "3" + item: + pattern + bound_identifier: simple_identifier "x" --- top_level - body: unsupported_node "for x in [1, 2, 3] {\n print(x)\n}" + body: === For-in over range @@ -43,27 +49,33 @@ for i in 0..<10 { --- source_file - for_statement - collection: - range_expression - end: integer_literal "10" - op: ..< - start: integer_literal "0" - item: - pattern - bound_identifier: simple_identifier "i" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "i" + statement: + for_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "i" + collection: + range_expression + end: integer_literal "10" + op: ..< + start: integer_literal "0" + item: + pattern + bound_identifier: simple_identifier "i" --- top_level - body: unsupported_node "for i in 0..<10 {\n print(i)\n}" + body: === For-in with where clause @@ -76,29 +88,37 @@ for x in xs where x > 0 { --- source_file - for_statement - collection: simple_identifier "xs" - item: - pattern - bound_identifier: simple_identifier "x" - where_clause - where_keyword "where" - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "x" + statement: + for_statement + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "x" + collection: simple_identifier "xs" + item: + pattern + bound_identifier: simple_identifier "x" + where: + where_clause + expr: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" + keyword: where_keyword "where" --- top_level - body: unsupported_node "for x in xs where x > 0 {\n print(x)\n}" + body: === While loop @@ -111,25 +131,29 @@ while x > 0 { --- source_file - while_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - assignment - operator: -= - result: integer_literal "1" - target: - directly_assignable_expression - simple_identifier "x" + statement: + while_statement + body: + block + statement: + assignment + operator: -= + result: integer_literal "1" + target: + directly_assignable_expression + expr: simple_identifier "x" + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" --- top_level - body: unsupported_node "while x > 0 {\n x -= 1\n}" + body: === Repeat-while loop @@ -142,25 +166,29 @@ repeat { --- source_file - repeat_while_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "0" - statements - assignment - operator: -= - result: integer_literal "1" - target: - directly_assignable_expression - simple_identifier "x" + statement: + repeat_while_statement + body: + block + statement: + assignment + operator: -= + result: integer_literal "1" + target: + directly_assignable_expression + expr: simple_identifier "x" + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "0" --- top_level - body: unsupported_node "repeat {\n x -= 1\n} while x > 0" + body: === Break and continue @@ -175,38 +203,52 @@ for x in xs { --- source_file - for_statement - collection: simple_identifier "xs" - item: - pattern - bound_identifier: simple_identifier "x" - statements - if_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: < - rhs: integer_literal "0" - statements - control_transfer_statement - if_statement - condition: - if_condition - comparison_expression - lhs: simple_identifier "x" - op: > - rhs: integer_literal "100" - statements - control_transfer_statement - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "x" + statement: + for_statement + body: + block + statement: + if_statement + body: + block + statement: + control_transfer_statement + kind: continue + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: < + rhs: integer_literal "0" + if_statement + body: + block + statement: + control_transfer_statement + kind: break + condition: + if_condition + kind: + comparison_expression + lhs: simple_identifier "x" + op: > + rhs: integer_literal "100" + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "x" + collection: simple_identifier "xs" + item: + pattern + bound_identifier: simple_identifier "x" --- top_level - body: unsupported_node "for x in xs {\n if x < 0 { continue }\n if x > 100 { break }\n print(x)\n}" + body: diff --git a/unified/extractor/tests/corpus/swift/operators.txt b/unified/extractor/tests/corpus/swift/operators.txt index 173f6e92976..f1a4a5fcdb2 100644 --- a/unified/extractor/tests/corpus/swift/operators.txt +++ b/unified/extractor/tests/corpus/swift/operators.txt @@ -7,23 +7,16 @@ a + b --- source_file - additive_expression - lhs: simple_identifier "a" - op: + - rhs: simple_identifier "b" + statement: + additive_expression + lhs: simple_identifier "a" + op: + + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "+" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Subtraction @@ -34,23 +27,16 @@ a - b --- source_file - additive_expression - lhs: simple_identifier "a" - op: - - rhs: simple_identifier "b" + statement: + additive_expression + lhs: simple_identifier "a" + op: - + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "-" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Multiplication @@ -61,23 +47,16 @@ a * b --- source_file - multiplicative_expression - lhs: simple_identifier "a" - op: * - rhs: simple_identifier "b" + statement: + multiplicative_expression + lhs: simple_identifier "a" + op: * + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "*" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Division @@ -88,23 +67,16 @@ a / b --- source_file - multiplicative_expression - lhs: simple_identifier "a" - op: / - rhs: simple_identifier "b" + statement: + multiplicative_expression + lhs: simple_identifier "a" + op: / + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "/" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Operator precedence: addition and multiplication @@ -115,33 +87,20 @@ a + b * c --- source_file - additive_expression - lhs: simple_identifier "a" - op: + - rhs: - multiplicative_expression - lhs: simple_identifier "b" - op: * - rhs: simple_identifier "c" + statement: + additive_expression + lhs: simple_identifier "a" + op: + + rhs: + multiplicative_expression + lhs: simple_identifier "b" + op: * + rhs: simple_identifier "c" --- top_level body: - binary_expr - operator: operator "+" - left: - name_expr - identifier: identifier "a" - right: - binary_expr - operator: operator "*" - left: - name_expr - identifier: identifier "b" - right: - name_expr - identifier: identifier "c" === Parenthesised expression @@ -152,27 +111,24 @@ Parenthesised expression --- source_file - multiplicative_expression - lhs: - tuple_expression - value: - additive_expression - lhs: simple_identifier "a" - op: + - rhs: simple_identifier "b" - op: * - rhs: simple_identifier "c" + statement: + multiplicative_expression + lhs: + tuple_expression + element: + tuple_expression_item + value: + additive_expression + lhs: simple_identifier "a" + op: + + rhs: simple_identifier "b" + op: * + rhs: simple_identifier "c" --- top_level body: - binary_expr - operator: operator "*" - left: unsupported_node "(a + b)" - right: - name_expr - identifier: identifier "c" === Comparison @@ -183,23 +139,16 @@ a < b --- source_file - comparison_expression - lhs: simple_identifier "a" - op: < - rhs: simple_identifier "b" + statement: + comparison_expression + lhs: simple_identifier "a" + op: < + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "<" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Equality @@ -210,23 +159,16 @@ a == b --- source_file - equality_expression - lhs: simple_identifier "a" - op: == - rhs: simple_identifier "b" + statement: + equality_expression + lhs: simple_identifier "a" + op: == + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "==" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Logical and @@ -237,23 +179,16 @@ a && b --- source_file - conjunction_expression - lhs: simple_identifier "a" - op: && - rhs: simple_identifier "b" + statement: + conjunction_expression + lhs: simple_identifier "a" + op: && + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "&&" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Logical or @@ -264,23 +199,16 @@ a || b --- source_file - disjunction_expression - lhs: simple_identifier "a" - op: || - rhs: simple_identifier "b" + statement: + disjunction_expression + lhs: simple_identifier "a" + op: || + rhs: simple_identifier "b" --- top_level body: - binary_expr - operator: operator "||" - left: - name_expr - identifier: identifier "a" - right: - name_expr - identifier: identifier "b" === Logical not @@ -291,19 +219,15 @@ Logical not --- source_file - prefix_expression - operation: bang "!" - target: simple_identifier "a" + statement: + prefix_expression + operation: bang "!" + target: simple_identifier "a" --- top_level body: - unary_expr - operator: operator "!" - operand: - name_expr - identifier: identifier "a" === Range operator @@ -314,16 +238,13 @@ Range operator --- source_file - range_expression - end: integer_literal "10" - op: ... - start: integer_literal "1" + statement: + range_expression + end: integer_literal "10" + op: ... + start: integer_literal "1" --- top_level body: - binary_expr - operator: operator "..." - left: int_literal "1" - right: int_literal "10" diff --git a/unified/extractor/tests/corpus/swift/optionals-and-errors.txt b/unified/extractor/tests/corpus/swift/optionals-and-errors.txt index c4f9118eedc..572e9181a68 100644 --- a/unified/extractor/tests/corpus/swift/optionals-and-errors.txt +++ b/unified/extractor/tests/corpus/swift/optionals-and-errors.txt @@ -7,32 +7,33 @@ let x: Int? = nil --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value: nil - value_binding_pattern - mutability: let - type_annotation - type: - type + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding name: - optional_type - wrapped: - user_type - type_identifier "Int" + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + optional_type + wrapped: + user_type + part: + simple_user_type + name: type_identifier "Int" + value: nil --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - pattern: - var_pattern - identifier: identifier "x" === Optional chaining @@ -43,41 +44,36 @@ let n = obj?.foo?.bar --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "n" - value: - navigation_expression - suffix: - navigation_suffix - suffix: simple_identifier "bar" - target: - optional_chain_marker + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "n" + value: navigation_expression suffix: navigation_suffix - suffix: simple_identifier "foo" + suffix: simple_identifier "bar" target: optional_chain_marker - simple_identifier "obj" - value_binding_pattern - mutability: let + expr: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "foo" + target: + optional_chain_marker + expr: simple_identifier "obj" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - member_access_expr - target: unsupported_node "obj?.foo?" - member: identifier "bar" - pattern: - var_pattern - identifier: identifier "n" === Force unwrap @@ -88,28 +84,25 @@ let n = opt! --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "n" - value: - postfix_expression - operation: bang "!" - target: simple_identifier "opt" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "n" + value: + postfix_expression + operation: bang "!" + target: simple_identifier "opt" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "opt!" - pattern: - var_pattern - identifier: identifier "n" === Nil-coalescing @@ -120,28 +113,25 @@ let n = opt ?? 0 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "n" - value: - nil_coalescing_expression - if_nil: integer_literal "0" - value: simple_identifier "opt" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "n" + value: + nil_coalescing_expression + if_nil: integer_literal "0" + value: simple_identifier "opt" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "opt ?? 0" - pattern: - var_pattern - identifier: identifier "n" === Throwing function @@ -154,25 +144,29 @@ func read() throws -> String { --- source_file - function_declaration - body: - function_body - statements - control_transfer_statement - result: - line_string_literal - name: simple_identifier "read" - return_type: - type - name: - user_type - type_identifier "String" - throws "throws" + statement: + function_declaration + body: + block + statement: + control_transfer_statement + kind: return + result: + line_string_literal + name: simple_identifier "read" + return_type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "String" + throws: throws "throws" --- top_level - body: unsupported_node "func read() throws -> String {\n return \"\"\n}" + body: === Do-catch @@ -187,29 +181,41 @@ do { --- source_file - do_statement - statements - try_expression - expr: - call_expression - simple_identifier "foo" - call_suffix - value_arguments - try_operator - catch_block - catch_keyword "catch" - statements - call_expression - simple_identifier "print" - call_suffix - value_arguments - value_argument - value: simple_identifier "error" + statement: + do_statement + body: + block + statement: + try_expression + expr: + call_expression + function: simple_identifier "foo" + suffix: + call_suffix + arguments: + value_arguments + operator: + try_operator + catch: + catch_block + body: + block + statement: + call_expression + function: simple_identifier "print" + suffix: + call_suffix + arguments: + value_arguments + argument: + value_argument + value: simple_identifier "error" + keyword: catch_keyword "catch" --- top_level - body: unsupported_node "do {\n try foo()\n} catch {\n print(error)\n}" + body: === Try? expression @@ -220,32 +226,32 @@ let result = try? foo() --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "result" - value: - try_expression - expr: - call_expression - simple_identifier "foo" - call_suffix - value_arguments - try_operator - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "result" + value: + try_expression + expr: + call_expression + function: simple_identifier "foo" + suffix: + call_suffix + arguments: + value_arguments + operator: + try_operator --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "try? foo()" - pattern: - var_pattern - identifier: identifier "result" === Try! expression @@ -256,29 +262,29 @@ let result = try! foo() --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "result" - value: - try_expression - expr: - call_expression - simple_identifier "foo" - call_suffix - value_arguments - try_operator - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "result" + value: + try_expression + expr: + call_expression + function: simple_identifier "foo" + suffix: + call_suffix + arguments: + value_arguments + operator: + try_operator --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: unsupported_node "try! foo()" - pattern: - var_pattern - identifier: identifier "result" diff --git a/unified/extractor/tests/corpus/swift/types.txt b/unified/extractor/tests/corpus/swift/types.txt index 873749aa6ce..0bebaa1238f 100644 --- a/unified/extractor/tests/corpus/swift/types.txt +++ b/unified/extractor/tests/corpus/swift/types.txt @@ -7,16 +7,17 @@ class Foo {} --- source_file - class_declaration - body: - class_body - declaration_kind: class - name: type_identifier "Foo" + statement: + class_declaration + body: + class_body + declaration_kind: class + name: type_identifier "Foo" --- top_level - body: unsupported_node "class Foo {}" + body: === Class with stored properties @@ -30,40 +31,54 @@ class Point { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Int" - property_declaration - name: - pattern - bound_identifier: simple_identifier "y" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Int" - declaration_kind: class - name: type_identifier "Point" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "y" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + declaration_kind: class + name: type_identifier "Point" --- top_level - body: unsupported_node "class Point {\n var x: Int\n var y: Int\n}" + body: === Class with initializer @@ -79,51 +94,64 @@ class Point { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Int" - init_declaration - body: - function_body - statements - assignment - operator: = - result: simple_identifier "x" - target: - directly_assignable_expression - navigation_expression - suffix: - navigation_suffix - suffix: simple_identifier "x" - target: - self_expression - name: init - parameter - name: simple_identifier "x" - type: - type - name: - user_type - type_identifier "Int" - declaration_kind: class - name: type_identifier "Point" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + init_declaration + body: + block + statement: + assignment + operator: = + result: simple_identifier "x" + target: + directly_assignable_expression + expr: + navigation_expression + suffix: + navigation_suffix + suffix: simple_identifier "x" + target: + self_expression + parameter: + function_parameter + parameter: + parameter + name: simple_identifier "x" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + declaration_kind: class + name: type_identifier "Point" --- top_level - body: unsupported_node "class Point {\n var x: Int\n init(x: Int) {\n self.x = x\n }\n}" + body: === Class with method @@ -139,34 +167,39 @@ class Counter { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "n" - value: integer_literal "0" - value_binding_pattern - mutability: var - function_declaration - body: - function_body - statements - assignment - operator: += - result: integer_literal "1" - target: - directly_assignable_expression - simple_identifier "n" - name: simple_identifier "bump" - declaration_kind: class - name: type_identifier "Counter" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "n" + value: integer_literal "0" + function_declaration + body: + block + statement: + assignment + operator: += + result: integer_literal "1" + target: + directly_assignable_expression + expr: simple_identifier "n" + name: simple_identifier "bump" + declaration_kind: class + name: type_identifier "Counter" --- top_level - body: unsupported_node "class Counter {\n var n = 0\n func bump() {\n n += 1\n }\n}" + body: === Class inheritance @@ -177,20 +210,24 @@ class Dog: Animal {} --- source_file - class_declaration - body: - class_body - declaration_kind: class - name: type_identifier "Dog" - inheritance_specifier - inherits_from: - user_type - type_identifier "Animal" + statement: + class_declaration + body: + class_body + declaration_kind: class + inherits: + inheritance_specifier + inherits_from: + user_type + part: + simple_user_type + name: type_identifier "Animal" + name: type_identifier "Dog" --- top_level - body: unsupported_node "class Dog: Animal {}" + body: === Struct @@ -204,40 +241,54 @@ struct Point { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value_binding_pattern - mutability: let - type_annotation - type: - type - name: - user_type - type_identifier "Int" - property_declaration - name: - pattern - bound_identifier: simple_identifier "y" - value_binding_pattern - mutability: let - type_annotation - type: - type - name: - user_type - type_identifier "Int" - declaration_kind: struct - name: type_identifier "Point" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "y" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + declaration_kind: struct + name: type_identifier "Point" --- top_level - body: unsupported_node "struct Point {\n let x: Int\n let y: Int\n}" + body: === Enum with cases @@ -253,24 +304,34 @@ enum Direction { --- source_file - class_declaration - body: - enum_class_body - enum_entry - name: simple_identifier "north" - enum_entry - name: simple_identifier "south" - enum_entry - name: simple_identifier "east" - enum_entry - name: simple_identifier "west" - declaration_kind: enum - name: type_identifier "Direction" + statement: + class_declaration + body: + enum_class_body + member: + enum_entry + case: + enum_case_entry + name: simple_identifier "north" + enum_entry + case: + enum_case_entry + name: simple_identifier "south" + enum_entry + case: + enum_case_entry + name: simple_identifier "east" + enum_entry + case: + enum_case_entry + name: simple_identifier "west" + declaration_kind: enum + name: type_identifier "Direction" --- top_level - body: unsupported_node "enum Direction {\n case north\n case south\n case east\n case west\n}" + body: === Enum with associated values @@ -284,34 +345,50 @@ enum Shape { --- source_file - class_declaration - body: - enum_class_body - enum_entry - data_contents: - enum_type_parameters - simple_identifier "radius" - type - name: - user_type - type_identifier "Double" - name: simple_identifier "circle" - enum_entry - data_contents: - enum_type_parameters - simple_identifier "side" - type - name: - user_type - type_identifier "Double" - name: simple_identifier "square" - declaration_kind: enum - name: type_identifier "Shape" + statement: + class_declaration + body: + enum_class_body + member: + enum_entry + case: + enum_case_entry + data_contents: + enum_type_parameters + parameter: + enum_type_parameter + name: simple_identifier "radius" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Double" + name: simple_identifier "circle" + enum_entry + case: + enum_case_entry + data_contents: + enum_type_parameters + parameter: + enum_type_parameter + name: simple_identifier "side" + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Double" + name: simple_identifier "square" + declaration_kind: enum + name: type_identifier "Shape" --- top_level - body: unsupported_node "enum Shape {\n case circle(radius: Double)\n case square(side: Double)\n}" + body: === Protocol declaration @@ -324,18 +401,19 @@ protocol Drawable { --- source_file - protocol_declaration - body: - protocol_body - protocol_function_declaration - name: simple_identifier "draw" - declaration_kind: protocol - name: type_identifier "Drawable" + statement: + protocol_declaration + body: + protocol_body + member: + protocol_function_declaration + name: simple_identifier "draw" + name: type_identifier "Drawable" --- top_level - body: unsupported_node "protocol Drawable {\n func draw()\n}" + body: === Extension @@ -348,36 +426,43 @@ extension Int { --- source_file - class_declaration - body: - class_body - function_declaration - body: - function_body - statements - control_transfer_statement - result: - multiplicative_expression - lhs: - self_expression - op: * - rhs: - self_expression - name: simple_identifier "squared" - return_type: - type - name: - user_type - type_identifier "Int" - declaration_kind: extension - name: - user_type - type_identifier "Int" + statement: + class_declaration + body: + class_body + member: + function_declaration + body: + block + statement: + control_transfer_statement + kind: return + result: + multiplicative_expression + lhs: + self_expression + op: * + rhs: + self_expression + name: simple_identifier "squared" + return_type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + declaration_kind: extension + name: + user_type + part: + simple_user_type + name: type_identifier "Int" --- top_level - body: unsupported_node "extension Int {\n func squared() -> Int { return self * self }\n}" + body: === Computed property @@ -394,61 +479,82 @@ class Rect { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "w" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Double" - property_declaration - name: - pattern - bound_identifier: simple_identifier "h" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Double" - property_declaration - computed_value: - computed_property - statements - control_transfer_statement - result: - multiplicative_expression - lhs: simple_identifier "w" - op: * - rhs: simple_identifier "h" - name: - pattern - bound_identifier: simple_identifier "area" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Double" - declaration_kind: class - name: type_identifier "Rect" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "w" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Double" + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "h" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Double" + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + computed_value: + computed_property + statement: + control_transfer_statement + kind: return + result: + multiplicative_expression + lhs: simple_identifier "w" + op: * + rhs: simple_identifier "h" + name: + pattern + bound_identifier: simple_identifier "area" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Double" + declaration_kind: class + name: type_identifier "Rect" --- top_level - body: unsupported_node "class Rect {\n var w: Double\n var h: Double\n var area: Double {\n return w * h\n }\n}" + body: === Property with getter and setter @@ -465,50 +571,71 @@ class Box { --- source_file - class_declaration - body: - class_body - property_declaration - name: - pattern - bound_identifier: simple_identifier "_v" - value: integer_literal "0" - modifiers - visibility_modifier - value_binding_pattern - mutability: var - property_declaration - computed_value: - computed_property - computed_getter - getter_specifier - statements - control_transfer_statement - result: simple_identifier "_v" - computed_setter - setter_specifier - statements - assignment - operator: = - result: simple_identifier "newValue" - target: - directly_assignable_expression - simple_identifier "_v" - name: - pattern - bound_identifier: simple_identifier "v" - value_binding_pattern - mutability: var - type_annotation - type: - type - name: - user_type - type_identifier "Int" - declaration_kind: class - name: type_identifier "Box" + statement: + class_declaration + body: + class_body + member: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "_v" + value: integer_literal "0" + modifiers: + modifiers + modifier: + visibility_modifier + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + computed_value: + computed_property + accessor: + computed_getter + body: + block + statement: + control_transfer_statement + kind: return + result: simple_identifier "_v" + specifier: + getter_specifier + computed_setter + body: + block + statement: + assignment + operator: = + result: simple_identifier "newValue" + target: + directly_assignable_expression + expr: simple_identifier "_v" + specifier: + setter_specifier + name: + pattern + bound_identifier: simple_identifier "v" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + declaration_kind: class + name: type_identifier "Box" --- top_level - body: unsupported_node "class Box {\n private var _v = 0\n var v: Int {\n get { return _v }\n set { _v = newValue }\n }\n}" + body: diff --git a/unified/extractor/tests/corpus/swift/variables.txt b/unified/extractor/tests/corpus/swift/variables.txt index 3fe7686a8c3..1911ddd02b1 100644 --- a/unified/extractor/tests/corpus/swift/variables.txt +++ b/unified/extractor/tests/corpus/swift/variables.txt @@ -7,25 +7,22 @@ let x = 1 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value: integer_literal "1" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + value: integer_literal "1" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: int_literal "1" - pattern: - var_pattern - identifier: identifier "x" === Var binding @@ -36,25 +33,22 @@ var x = 1 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value: integer_literal "1" - value_binding_pattern - mutability: var + statement: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + value: integer_literal "1" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: int_literal "1" - pattern: - var_pattern - identifier: identifier "x" === Let with type annotation @@ -65,31 +59,31 @@ let x: Int = 1 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value: integer_literal "1" - value_binding_pattern - mutability: let - type_annotation - type: - type + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding name: - user_type - type_identifier "Int" + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" + value: integer_literal "1" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: int_literal "1" - pattern: - var_pattern - identifier: identifier "x" === Var without initialiser @@ -100,29 +94,30 @@ var x: Int --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - value_binding_pattern - mutability: var - type_annotation - type: - type + statement: + property_declaration + binding: + value_binding_pattern + mutability: var + declarator: + property_binding name: - user_type - type_identifier "Int" + pattern + bound_identifier: simple_identifier "x" + type: + type_annotation + type: + type + name: + user_type + part: + simple_user_type + name: type_identifier "Int" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - pattern: - var_pattern - identifier: identifier "x" === Tuple destructuring binding @@ -133,34 +128,32 @@ let (a, b) = pair --- source_file - property_declaration - name: - pattern - pattern - simple_identifier "a" - pattern - simple_identifier "b" - value: simple_identifier "pair" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + kind: + tuple_pattern + item: + tuple_pattern_item + pattern: + pattern + kind: simple_identifier "a" + tuple_pattern_item + pattern: + pattern + kind: simple_identifier "b" + value: simple_identifier "pair" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: - name_expr - identifier: identifier "pair" - pattern: - tuple_pattern - element: - var_pattern - identifier: identifier "a" - var_pattern - identifier: identifier "b" === Multiple bindings on one line @@ -171,34 +164,27 @@ let x = 1, y = 2 --- source_file - property_declaration - name: - pattern - bound_identifier: simple_identifier "x" - pattern - bound_identifier: simple_identifier "y" - value: - integer_literal "1" - integer_literal "2" - value_binding_pattern - mutability: let + statement: + property_declaration + binding: + value_binding_pattern + mutability: let + declarator: + property_binding + name: + pattern + bound_identifier: simple_identifier "x" + value: integer_literal "1" + property_binding + name: + pattern + bound_identifier: simple_identifier "y" + value: integer_literal "2" --- top_level body: - variable_declaration_stmt - variable_declarator: - variable_declarator - value: int_literal "1" - pattern: - var_pattern - identifier: identifier "x" - variable_declarator - value: int_literal "2" - pattern: - var_pattern - identifier: identifier "y" === Assignment @@ -209,17 +195,18 @@ x = 1 --- source_file - assignment - operator: = - result: integer_literal "1" - target: - directly_assignable_expression - simple_identifier "x" + statement: + assignment + operator: = + result: integer_literal "1" + target: + directly_assignable_expression + expr: simple_identifier "x" --- top_level - body: unsupported_node "x = 1" + body: === Compound assignment @@ -230,14 +217,15 @@ x += 1 --- source_file - assignment - operator: += - result: integer_literal "1" - target: - directly_assignable_expression - simple_identifier "x" + statement: + assignment + operator: += + result: integer_literal "1" + target: + directly_assignable_expression + expr: simple_identifier "x" --- top_level - body: unsupported_node "x += 1" + body: From f8ab76e1baff6b8b300bf96c6717c5674f0aba60 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 28 May 2026 12:14:10 +0100 Subject: [PATCH 77/85] Swift: Update the new metatype sinks to not rely on name matching '.Type'. --- .../WeakPasswordHashingExtensions.qll | 21 ++++++++++++++----- .../WeakSensitiveDataHashingExtensions.qll | 21 ++++++++++++++----- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll index 9442812ba2c..1700c5dc60e 100644 --- a/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll @@ -121,12 +121,23 @@ private class WeakPasswordHashingMetatypeSink extends WeakPasswordHashingSink { string algorithm; WeakPasswordHashingMetatypeSink() { - exists(CallExpr c | - c.getAnArgument().getExpr() = this.asExpr() and + exists(CallExpr ce, Type t | + // call target + ce.getStaticTarget().getName() = + ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] and + // argument + ce.getAnArgument().getExpr() = this.asExpr() and + // qualifier + t = ce.getQualifier().getType() and algorithm = ["SHA256", "SHA384", "SHA512"] and - c.getQualifier().getType().getFullName() = algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = - ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] + ( + t.getFullName() = algorithm + or + exists(TypeDecl td | + td.getInterfaceType() = t and + td.getFullName() = algorithm + ) + ) ) } diff --git a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll index 58d9f466b78..02cb82a22c8 100755 --- a/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll +++ b/swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingExtensions.qll @@ -86,12 +86,23 @@ private class WeakSensitiveDataHashingMetatypeSink extends WeakSensitiveDataHash string algorithm; WeakSensitiveDataHashingMetatypeSink() { - exists(CallExpr c | - c.getAnArgument().getExpr() = this.asExpr() and + exists(CallExpr ce, Type t | + // call target + ce.getStaticTarget().getName() = + ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] and + // argument + ce.getAnArgument().getExpr() = this.asExpr() and + // qualifier + t = ce.getQualifier().getType() and algorithm = ["MD5", "SHA1"] and - c.getQualifier().getType().getFullName() = "Insecure." + algorithm + ["", ".Type"] and - c.getStaticTarget().getName() = - ["hash(data:)", "hash(bufferPointer:)", "update(data:)", "update(bufferPointer:)"] + ( + t.getFullName() = "Insecure." + algorithm + or + exists(TypeDecl td | + td.getInterfaceType() = t and + td.getFullName() = "Insecure." + algorithm + ) + ) ) } From 8393b40b59083b4feff88d086105b6954020aa03 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 27 May 2026 17:13:48 +0200 Subject: [PATCH 78/85] C++: Use the new extensionals to map template functions and classes to their fully templated versions. --- .../semmle/code/cpp/dataflow/ExternalFlow.qll | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index 5bab7dd00f2..4ec2f2f3997 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -277,11 +277,44 @@ private predicate isClassConstructedFrom(Class c, Class templateClass) { } /** Gets the fully templated version of `f`. */ -private Class getFullyTemplatedClass(Class c) { +private Class getFullyTemplatedClassOld(Class c) { not c.isFromUninstantiatedTemplate(_) and isClassConstructedFrom(c, result) } +private TemplateClass getOriginalClassTemplate(TemplateClass tc) { + result = tc.getOriginalTemplate() + or + not exists(tc.getOriginalTemplate()) and + result = tc +} + +/** Gets the fully templated version of `f`. */ +private Class getFullyTemplatedClassNew(Class c) { + not c.isFromUninstantiatedTemplate(_) and + exists(Class mid | + c.isConstructedFrom(mid) + or + not c.isConstructedFrom(_) and c = mid + | + result = getOriginalClassTemplate(mid) + or + not mid instanceof TemplateClass and mid = result + ) +} + +/** Gets the fully templated version of `c`. */ +private Class getFullyTemplatedClass(Class c) { + // The `Class::getOriginalTemplate` predicate was introduced in CodeQL + // version 2.25.6 and the upgrade script leaves the + // `class_template_generated_from` extensionals empty if the database + // was generated with an older extractor. So we use the old implementation + // if the `class_template_generated_from` extensional is empty. + if class_template_generated_from(_, _) + then result = getFullyTemplatedClassNew(c) + else result = getFullyTemplatedClassOld(c) +} + /** * Holds if `f` is an instantiation of a function template `templateFunc`, or * holds with `f = templateFunc` if `f` is not an instantiation of any function @@ -298,7 +331,7 @@ private predicate isFunctionConstructedFrom(Function f, Function templateFunc) { } /** Gets the fully templated version of `f`. */ -Function getFullyTemplatedFunction(Function f) { +private Function getFullyTemplatedFunctionOld(Function f) { not f.isFromUninstantiatedTemplate(_) and ( exists(Class c, Class templateClass, int i | @@ -312,6 +345,39 @@ Function getFullyTemplatedFunction(Function f) { ) } +private TemplateFunction getOriginalFunctionTemplate(TemplateFunction tf) { + result = tf.getOriginalTemplate() + or + not exists(tf.getOriginalTemplate()) and + result = tf +} + +/** Gets the fully templated version of `f`. */ +private Function getFullyTemplatedFunctionNew(Function f) { + not f.isFromUninstantiatedTemplate(_) and + exists(Function mid | + f.isConstructedFrom(mid) + or + not f.isConstructedFrom(_) and f = mid + | + result = getOriginalFunctionTemplate(mid) + or + not mid instanceof TemplateFunction and mid = result + ) +} + +/** Gets the fully templated version of `f`. */ +Function getFullyTemplatedFunction(Function f) { + // The `Function::getOriginalTemplate` predicate was introduced in CodeQL + // version 2.25.6 and the upgrade script leaves the + // `function_template_generated_from` extensionals empty if the database + // was generated with an older extractor. So we use the old implementation + // if the `function_template_generated_from` extensional is empty. + if function_template_generated_from(_, _) + then result = getFullyTemplatedFunctionNew(f) + else result = getFullyTemplatedFunctionOld(f) +} + /** Prefixes `const` to `s` if `t` is const, or returns `s` otherwise. */ bindingset[s, t] private string withConst(string s, Type t) { From 9f211cebd5f415ec3f67f8c329826c189ba53dde Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 27 May 2026 17:13:55 +0200 Subject: [PATCH 79/85] C++: Accept test changes. --- .../taint-tests/test_mad-signatures.expected | 79 ++++++++++--------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected index 5ad32759da5..d494c09e71d 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected @@ -27383,54 +27383,55 @@ getParameterTypeName | stl.h:91:24:91:33 | operator++ | 0 | int | | stl.h:95:44:95:44 | back_inserter | 0 | func:0 & | | stl.h:95:44:95:44 | back_inserter | 0 | func:0 & | -| stl.h:148:3:148:14 | basic_string | 0 | const class:2 & | -| stl.h:149:33:149:44 | basic_string | 0 | const class:0 * | -| stl.h:149:33:149:44 | basic_string | 1 | const class:2 & | -| stl.h:151:16:151:20 | c_str | 0 | func:0 | -| stl.h:151:16:151:20 | c_str | 1 | func:0 | -| stl.h:151:16:151:20 | c_str | 2 | const class:2 & | +| stl.h:147:12:147:23 | basic_string | 0 | const class:2 & | +| stl.h:148:3:148:14 | basic_string | 0 | const class:0 * | +| stl.h:148:3:148:14 | basic_string | 1 | const class:2 & | +| stl.h:149:33:149:44 | basic_string | 0 | func:0 | +| stl.h:149:33:149:44 | basic_string | 1 | func:0 | +| stl.h:149:33:149:44 | basic_string | 2 | const class:2 & | +| stl.h:165:8:165:16 | push_back | 0 | class:0 | | stl.h:173:13:173:22 | operator[] | 0 | size_type | | stl.h:175:13:175:14 | at | 0 | size_type | -| stl.h:176:35:176:44 | operator+= | 0 | size_type | -| stl.h:176:35:176:44 | operator+= | 0 | size_type | -| stl.h:177:17:177:26 | operator+= | 0 | const func:0 & | -| stl.h:178:17:178:22 | append | 0 | const class:0 * | -| stl.h:179:17:179:22 | append | 0 | const basic_string & | -| stl.h:180:17:180:22 | append | 0 | const class:0 * | -| stl.h:181:47:181:52 | append | 0 | size_type | -| stl.h:181:47:181:52 | append | 1 | class:0 | -| stl.h:182:17:182:22 | assign | 0 | func:0 | -| stl.h:182:17:182:22 | assign | 1 | func:0 | -| stl.h:183:17:183:22 | assign | 0 | const basic_string & | -| stl.h:184:47:184:52 | assign | 0 | size_type | -| stl.h:184:47:184:52 | assign | 1 | class:0 | -| stl.h:185:17:185:22 | insert | 0 | func:0 | -| stl.h:185:17:185:22 | insert | 1 | func:0 | +| stl.h:176:35:176:44 | operator+= | 0 | const func:0 & | +| stl.h:176:35:176:44 | operator+= | 0 | const func:0 & | +| stl.h:177:17:177:26 | operator+= | 0 | const class:0 * | +| stl.h:178:17:178:22 | append | 0 | const basic_string & | +| stl.h:179:17:179:22 | append | 0 | const class:0 * | +| stl.h:180:17:180:22 | append | 0 | size_type | +| stl.h:180:17:180:22 | append | 1 | class:0 | +| stl.h:181:47:181:52 | append | 0 | func:0 | +| stl.h:181:47:181:52 | append | 1 | func:0 | +| stl.h:182:17:182:22 | assign | 0 | const basic_string & | +| stl.h:183:17:183:22 | assign | 0 | size_type | +| stl.h:183:17:183:22 | assign | 1 | class:0 | +| stl.h:184:47:184:52 | assign | 0 | func:0 | +| stl.h:184:47:184:52 | assign | 1 | func:0 | +| stl.h:185:17:185:22 | insert | 0 | size_type | +| stl.h:185:17:185:22 | insert | 1 | const basic_string & | | stl.h:186:17:186:22 | insert | 0 | size_type | -| stl.h:186:17:186:22 | insert | 1 | const basic_string & | +| stl.h:186:17:186:22 | insert | 1 | size_type | +| stl.h:186:17:186:22 | insert | 2 | class:0 | | stl.h:187:17:187:22 | insert | 0 | size_type | -| stl.h:187:17:187:22 | insert | 1 | size_type | -| stl.h:187:17:187:22 | insert | 2 | class:0 | -| stl.h:188:12:188:17 | insert | 0 | size_type | -| stl.h:188:12:188:17 | insert | 1 | const class:0 * | +| stl.h:187:17:187:22 | insert | 1 | const class:0 * | +| stl.h:188:12:188:17 | insert | 0 | const_iterator | +| stl.h:188:12:188:17 | insert | 1 | size_type | +| stl.h:188:12:188:17 | insert | 2 | class:0 | | stl.h:189:42:189:47 | insert | 0 | const_iterator | -| stl.h:189:42:189:47 | insert | 1 | size_type | -| stl.h:189:42:189:47 | insert | 2 | class:0 | -| stl.h:190:17:190:23 | replace | 0 | const_iterator | -| stl.h:190:17:190:23 | replace | 1 | func:0 | -| stl.h:190:17:190:23 | replace | 2 | func:0 | +| stl.h:189:42:189:47 | insert | 1 | func:0 | +| stl.h:189:42:189:47 | insert | 2 | func:0 | +| stl.h:190:17:190:23 | replace | 0 | size_type | +| stl.h:190:17:190:23 | replace | 1 | size_type | +| stl.h:190:17:190:23 | replace | 2 | const basic_string & | | stl.h:191:17:191:23 | replace | 0 | size_type | | stl.h:191:17:191:23 | replace | 1 | size_type | -| stl.h:191:17:191:23 | replace | 2 | const basic_string & | -| stl.h:192:13:192:16 | copy | 0 | size_type | +| stl.h:191:17:191:23 | replace | 2 | size_type | +| stl.h:191:17:191:23 | replace | 3 | class:0 | +| stl.h:192:13:192:16 | copy | 0 | class:0 * | | stl.h:192:13:192:16 | copy | 1 | size_type | | stl.h:192:13:192:16 | copy | 2 | size_type | -| stl.h:192:13:192:16 | copy | 3 | class:0 | -| stl.h:193:8:193:12 | clear | 0 | class:0 * | -| stl.h:193:8:193:12 | clear | 1 | size_type | -| stl.h:193:8:193:12 | clear | 2 | size_type | -| stl.h:195:8:195:11 | swap | 0 | size_type | -| stl.h:195:8:195:11 | swap | 1 | size_type | +| stl.h:194:16:194:21 | substr | 0 | size_type | +| stl.h:194:16:194:21 | substr | 1 | size_type | +| stl.h:195:8:195:11 | swap | 0 | basic_string & | | stl.h:198:94:198:102 | operator+ | 0 | const basic_string & | | stl.h:198:94:198:102 | operator+ | 1 | const basic_string & | | stl.h:199:94:199:102 | operator+ | 0 | const basic_string & | From 2d581504f7b8dfd4b5aaa4ed72af023f20600f2e Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Thu, 28 May 2026 12:07:50 +0200 Subject: [PATCH 80/85] C++: Fix Copilot comments. --- cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index 4ec2f2f3997..4a89e91c74e 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -276,7 +276,7 @@ private predicate isClassConstructedFrom(Class c, Class templateClass) { not c.isConstructedFrom(_) and c = templateClass } -/** Gets the fully templated version of `f`. */ +/** Gets the fully templated version of `c`. */ private Class getFullyTemplatedClassOld(Class c) { not c.isFromUninstantiatedTemplate(_) and isClassConstructedFrom(c, result) @@ -289,7 +289,7 @@ private TemplateClass getOriginalClassTemplate(TemplateClass tc) { result = tc } -/** Gets the fully templated version of `f`. */ +/** Gets the fully templated version of `c`. */ private Class getFullyTemplatedClassNew(Class c) { not c.isFromUninstantiatedTemplate(_) and exists(Class mid | From 9bc0c1b1ab2cf222b8117c834875d5b1d236cc44 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 May 2026 12:13:50 +0100 Subject: [PATCH 81/85] Revert "Release preparation for version 2.25.6" --- actions/ql/lib/CHANGELOG.md | 6 ------ ...2026-05-12-improved-alphanumeric-regex.md} | 9 ++++----- actions/ql/lib/codeql-pack.release.yml | 2 +- actions/ql/lib/qlpack.yml | 2 +- actions/ql/src/CHANGELOG.md | 19 ------------------- .../2026-05-05-untrusted-checkout-high.md | 4 ++++ .../2026-05-12-sha256-pinned-actions.md | 4 ++++ ...n-untrusted-checkout-improvements-alert.md | 4 ++++ ...ntrusted-checkout-improvements-helpfile.md | 4 ++++ ...ntrusted-checkout-improvements-metadata.md | 4 ++++ .../ql/src/change-notes/released/0.6.29.md | 18 ------------------ actions/ql/src/codeql-pack.release.yml | 2 +- actions/ql/src/qlpack.yml | 2 +- cpp/ql/lib/CHANGELOG.md | 16 ---------------- .../change-notes/2026-05-15-secure-scanf.md | 5 +++++ .../change-notes/2026-05-16-alias-template.md | 4 ++++ .../lib/change-notes/2026-05-18-alias-type.md | 4 ++++ .../change-notes/2026-05-21-generated-from.md | 4 ++++ cpp/ql/lib/change-notes/released/10.2.0.md | 15 --------------- cpp/ql/lib/codeql-pack.release.yml | 2 +- cpp/ql/lib/qlpack.yml | 2 +- cpp/ql/src/CHANGELOG.md | 4 ---- cpp/ql/src/change-notes/released/1.6.4.md | 3 --- cpp/ql/src/codeql-pack.release.yml | 2 +- cpp/ql/src/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/lib/CHANGELOG.md | 4 ---- .../lib/change-notes/released/1.7.68.md | 3 --- .../Solorigate/lib/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/lib/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/src/CHANGELOG.md | 4 ---- .../src/change-notes/released/1.7.68.md | 3 --- .../Solorigate/src/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/src/qlpack.yml | 2 +- csharp/ql/lib/CHANGELOG.md | 7 ------- .../2026-05-12-user-increment-decrement.md | 4 ++++ ...0.2.md => 2026-05-20-csharp14-dotnet10.md} | 8 +++----- csharp/ql/lib/codeql-pack.release.yml | 2 +- csharp/ql/lib/qlpack.yml | 2 +- csharp/ql/src/CHANGELOG.md | 4 ---- csharp/ql/src/change-notes/released/1.7.4.md | 3 --- csharp/ql/src/codeql-pack.release.yml | 2 +- csharp/ql/src/qlpack.yml | 2 +- go/ql/consistency-queries/CHANGELOG.md | 4 ---- .../change-notes/released/1.0.51.md | 3 --- .../codeql-pack.release.yml | 2 +- go/ql/consistency-queries/qlpack.yml | 2 +- go/ql/lib/CHANGELOG.md | 4 ---- go/ql/lib/change-notes/released/7.1.2.md | 3 --- go/ql/lib/codeql-pack.release.yml | 2 +- go/ql/lib/qlpack.yml | 2 +- go/ql/src/CHANGELOG.md | 4 ---- go/ql/src/change-notes/released/1.6.4.md | 3 --- go/ql/src/codeql-pack.release.yml | 2 +- go/ql/src/qlpack.yml | 2 +- java/ql/lib/CHANGELOG.md | 6 ------ .../9.1.2.md => 2026-05-19-avro-mads.md} | 7 +++---- java/ql/lib/codeql-pack.release.yml | 2 +- java/ql/lib/qlpack.yml | 2 +- java/ql/src/CHANGELOG.md | 4 ---- java/ql/src/change-notes/released/1.11.4.md | 3 --- java/ql/src/codeql-pack.release.yml | 2 +- java/ql/src/qlpack.yml | 2 +- javascript/ql/lib/CHANGELOG.md | 6 ------ .../2.7.2.md => 2026-05-14-sensitive-data.md} | 7 +++---- javascript/ql/lib/codeql-pack.release.yml | 2 +- javascript/ql/lib/qlpack.yml | 2 +- javascript/ql/src/CHANGELOG.md | 4 ---- .../ql/src/change-notes/released/2.3.11.md | 3 --- javascript/ql/src/codeql-pack.release.yml | 2 +- javascript/ql/src/qlpack.yml | 2 +- misc/suite-helpers/CHANGELOG.md | 4 ---- .../change-notes/released/1.0.51.md | 3 --- misc/suite-helpers/codeql-pack.release.yml | 2 +- misc/suite-helpers/qlpack.yml | 2 +- python/ql/lib/CHANGELOG.md | 6 ------ .../7.1.2.md => 2026-05-14-sensitive-data.md} | 7 +++---- python/ql/lib/codeql-pack.release.yml | 2 +- python/ql/lib/qlpack.yml | 2 +- python/ql/src/CHANGELOG.md | 4 ---- python/ql/src/change-notes/released/1.8.4.md | 3 --- python/ql/src/codeql-pack.release.yml | 2 +- python/ql/src/qlpack.yml | 2 +- ruby/ql/lib/CHANGELOG.md | 4 ---- ruby/ql/lib/change-notes/released/5.2.2.md | 3 --- ruby/ql/lib/codeql-pack.release.yml | 2 +- ruby/ql/lib/qlpack.yml | 2 +- ruby/ql/src/CHANGELOG.md | 4 ---- ruby/ql/src/change-notes/released/1.6.4.md | 3 --- ruby/ql/src/codeql-pack.release.yml | 2 +- ruby/ql/src/qlpack.yml | 2 +- rust/ql/lib/CHANGELOG.md | 6 ------ ...0.2.15.md => 2026-05-14-sensitive-data.md} | 7 +++---- rust/ql/lib/codeql-pack.release.yml | 2 +- rust/ql/lib/qlpack.yml | 2 +- rust/ql/src/CHANGELOG.md | 4 ---- rust/ql/src/change-notes/released/0.1.36.md | 3 --- rust/ql/src/codeql-pack.release.yml | 2 +- rust/ql/src/qlpack.yml | 2 +- shared/concepts/CHANGELOG.md | 4 ---- .../concepts/change-notes/released/0.0.25.md | 3 --- shared/concepts/codeql-pack.release.yml | 2 +- shared/concepts/qlpack.yml | 2 +- shared/controlflow/CHANGELOG.md | 4 ---- .../change-notes/released/2.0.35.md | 3 --- shared/controlflow/codeql-pack.release.yml | 2 +- shared/controlflow/qlpack.yml | 2 +- shared/dataflow/CHANGELOG.md | 4 ---- .../dataflow/change-notes/released/2.1.7.md | 3 --- shared/dataflow/codeql-pack.release.yml | 2 +- shared/dataflow/qlpack.yml | 2 +- shared/mad/CHANGELOG.md | 4 ---- shared/mad/change-notes/released/1.0.51.md | 3 --- shared/mad/codeql-pack.release.yml | 2 +- shared/mad/qlpack.yml | 2 +- shared/quantum/CHANGELOG.md | 4 ---- .../quantum/change-notes/released/0.0.29.md | 3 --- shared/quantum/codeql-pack.release.yml | 2 +- shared/quantum/qlpack.yml | 2 +- shared/rangeanalysis/CHANGELOG.md | 4 ---- .../change-notes/released/1.0.51.md | 3 --- shared/rangeanalysis/codeql-pack.release.yml | 2 +- shared/rangeanalysis/qlpack.yml | 2 +- shared/regex/CHANGELOG.md | 4 ---- shared/regex/change-notes/released/1.0.51.md | 3 --- shared/regex/codeql-pack.release.yml | 2 +- shared/regex/qlpack.yml | 2 +- shared/ssa/CHANGELOG.md | 4 ---- shared/ssa/change-notes/released/2.0.27.md | 3 --- shared/ssa/codeql-pack.release.yml | 2 +- shared/ssa/qlpack.yml | 2 +- shared/threat-models/CHANGELOG.md | 4 ---- .../change-notes/released/1.0.51.md | 3 --- shared/threat-models/codeql-pack.release.yml | 2 +- shared/threat-models/qlpack.yml | 2 +- shared/tutorial/CHANGELOG.md | 4 ---- .../tutorial/change-notes/released/1.0.51.md | 3 --- shared/tutorial/codeql-pack.release.yml | 2 +- shared/tutorial/qlpack.yml | 2 +- shared/typeflow/CHANGELOG.md | 4 ---- .../typeflow/change-notes/released/1.0.51.md | 3 --- shared/typeflow/codeql-pack.release.yml | 2 +- shared/typeflow/qlpack.yml | 2 +- shared/typeinference/CHANGELOG.md | 4 ---- .../change-notes/released/0.0.32.md | 3 --- shared/typeinference/codeql-pack.release.yml | 2 +- shared/typeinference/qlpack.yml | 2 +- shared/typetracking/CHANGELOG.md | 4 ---- .../change-notes/released/2.0.35.md | 3 --- shared/typetracking/codeql-pack.release.yml | 2 +- shared/typetracking/qlpack.yml | 2 +- shared/typos/CHANGELOG.md | 4 ---- shared/typos/change-notes/released/1.0.51.md | 3 --- shared/typos/codeql-pack.release.yml | 2 +- shared/typos/qlpack.yml | 2 +- shared/util/CHANGELOG.md | 4 ---- shared/util/change-notes/released/2.0.38.md | 3 --- shared/util/codeql-pack.release.yml | 2 +- shared/util/qlpack.yml | 2 +- shared/xml/CHANGELOG.md | 4 ---- shared/xml/change-notes/released/1.0.51.md | 3 --- shared/xml/codeql-pack.release.yml | 2 +- shared/xml/qlpack.yml | 2 +- shared/yaml/CHANGELOG.md | 4 ---- shared/yaml/change-notes/released/1.0.51.md | 3 --- shared/yaml/codeql-pack.release.yml | 2 +- shared/yaml/qlpack.yml | 2 +- swift/ql/lib/CHANGELOG.md | 10 ---------- .../6.7.0.md => 2026-05-14-sensitive-data.md} | 11 +++-------- .../change-notes/2026-05-19-swift-6.3.2.md | 4 ++++ swift/ql/lib/codeql-pack.release.yml | 2 +- swift/ql/lib/qlpack.yml | 2 +- swift/ql/src/CHANGELOG.md | 4 ---- swift/ql/src/change-notes/released/1.3.4.md | 3 --- swift/ql/src/codeql-pack.release.yml | 2 +- swift/ql/src/qlpack.yml | 2 +- 175 files changed, 149 insertions(+), 455 deletions(-) rename actions/ql/lib/change-notes/{released/0.4.37.md => 2026-05-12-improved-alphanumeric-regex.md} (80%) create mode 100644 actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md create mode 100644 actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md create mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md create mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md create mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md delete mode 100644 actions/ql/src/change-notes/released/0.6.29.md create mode 100644 cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md create mode 100644 cpp/ql/lib/change-notes/2026-05-16-alias-template.md create mode 100644 cpp/ql/lib/change-notes/2026-05-18-alias-type.md create mode 100644 cpp/ql/lib/change-notes/2026-05-21-generated-from.md delete mode 100644 cpp/ql/lib/change-notes/released/10.2.0.md delete mode 100644 cpp/ql/src/change-notes/released/1.6.4.md delete mode 100644 csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md delete mode 100644 csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md create mode 100644 csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md rename csharp/ql/lib/change-notes/{released/6.0.2.md => 2026-05-20-csharp14-dotnet10.md} (67%) delete mode 100644 csharp/ql/src/change-notes/released/1.7.4.md delete mode 100644 go/ql/consistency-queries/change-notes/released/1.0.51.md delete mode 100644 go/ql/lib/change-notes/released/7.1.2.md delete mode 100644 go/ql/src/change-notes/released/1.6.4.md rename java/ql/lib/change-notes/{released/9.1.2.md => 2026-05-19-avro-mads.md} (61%) delete mode 100644 java/ql/src/change-notes/released/1.11.4.md rename javascript/ql/lib/change-notes/{released/2.7.2.md => 2026-05-14-sensitive-data.md} (89%) delete mode 100644 javascript/ql/src/change-notes/released/2.3.11.md delete mode 100644 misc/suite-helpers/change-notes/released/1.0.51.md rename python/ql/lib/change-notes/{released/7.1.2.md => 2026-05-14-sensitive-data.md} (90%) delete mode 100644 python/ql/src/change-notes/released/1.8.4.md delete mode 100644 ruby/ql/lib/change-notes/released/5.2.2.md delete mode 100644 ruby/ql/src/change-notes/released/1.6.4.md rename rust/ql/lib/change-notes/{released/0.2.15.md => 2026-05-14-sensitive-data.md} (89%) delete mode 100644 rust/ql/src/change-notes/released/0.1.36.md delete mode 100644 shared/concepts/change-notes/released/0.0.25.md delete mode 100644 shared/controlflow/change-notes/released/2.0.35.md delete mode 100644 shared/dataflow/change-notes/released/2.1.7.md delete mode 100644 shared/mad/change-notes/released/1.0.51.md delete mode 100644 shared/quantum/change-notes/released/0.0.29.md delete mode 100644 shared/rangeanalysis/change-notes/released/1.0.51.md delete mode 100644 shared/regex/change-notes/released/1.0.51.md delete mode 100644 shared/ssa/change-notes/released/2.0.27.md delete mode 100644 shared/threat-models/change-notes/released/1.0.51.md delete mode 100644 shared/tutorial/change-notes/released/1.0.51.md delete mode 100644 shared/typeflow/change-notes/released/1.0.51.md delete mode 100644 shared/typeinference/change-notes/released/0.0.32.md delete mode 100644 shared/typetracking/change-notes/released/2.0.35.md delete mode 100644 shared/typos/change-notes/released/1.0.51.md delete mode 100644 shared/util/change-notes/released/2.0.38.md delete mode 100644 shared/xml/change-notes/released/1.0.51.md delete mode 100644 shared/yaml/change-notes/released/1.0.51.md rename swift/ql/lib/change-notes/{released/6.7.0.md => 2026-05-14-sensitive-data.md} (76%) create mode 100644 swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md delete mode 100644 swift/ql/src/change-notes/released/1.3.4.md diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index 7a61a60c379..ddd0b0f1aec 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,9 +1,3 @@ -## 0.4.37 - -### Minor Analysis Improvements - -* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. - ## 0.4.36 ### Minor Analysis Improvements diff --git a/actions/ql/lib/change-notes/released/0.4.37.md b/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md similarity index 80% rename from actions/ql/lib/change-notes/released/0.4.37.md rename to actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md index 4809796b3ab..df3aaf3613f 100644 --- a/actions/ql/lib/change-notes/released/0.4.37.md +++ b/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md @@ -1,5 +1,4 @@ -## 0.4.37 - -### Minor Analysis Improvements - -* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. +--- +category: minorAnalysis +--- +* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. \ No newline at end of file diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index df274514780..45433e3ec03 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.37 +lastReleaseVersion: 0.4.36 diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index 71c9cadbf28..ae4a57aa944 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.37 +version: 0.4.37-dev library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index c37cd20761b..1670f0af5be 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,22 +1,3 @@ -## 0.6.29 - -### Query Metadata Changes - -* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. - -### Major Analysis Improvements - -* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. - -### Minor Analysis Improvements - -* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. -* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. - -### Bug Fixes - -* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. - ## 0.6.28 ### Query Metadata Changes diff --git a/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md b/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md new file mode 100644 index 00000000000..098c60a3753 --- /dev/null +++ b/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md b/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md new file mode 100644 index 00000000000..521a5878c37 --- /dev/null +++ b/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md new file mode 100644 index 00000000000..f5ad3271a62 --- /dev/null +++ b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md new file mode 100644 index 00000000000..83e6528c86b --- /dev/null +++ b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md new file mode 100644 index 00000000000..5df1f3347ea --- /dev/null +++ b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md @@ -0,0 +1,4 @@ +--- +category: queryMetadata +--- +* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/released/0.6.29.md b/actions/ql/src/change-notes/released/0.6.29.md deleted file mode 100644 index 82ca8174954..00000000000 --- a/actions/ql/src/change-notes/released/0.6.29.md +++ /dev/null @@ -1,18 +0,0 @@ -## 0.6.29 - -### Query Metadata Changes - -* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. - -### Major Analysis Improvements - -* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. - -### Minor Analysis Improvements - -* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. -* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. - -### Bug Fixes - -* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index e785984cacc..90f3f09295a 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.29 +lastReleaseVersion: 0.6.28 diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 3615c08b583..33ab175fb18 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.29 +version: 0.6.29-dev library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 0b3413f9d3c..3b95c10fbb5 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,19 +1,3 @@ -## 10.2.0 - -### Deprecated APIs - -* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. - -### New Features - -* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. -* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. - -### Minor Analysis Improvements - -* Added flow source models for `scanf_s` and related functions. -* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. - ## 10.1.1 ### Minor Analysis Improvements diff --git a/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md b/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md new file mode 100644 index 00000000000..0b8d5a79a72 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md @@ -0,0 +1,5 @@ +--- +category: minorAnalysis +--- +* Added flow source models for `scanf_s` and related functions. +* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/2026-05-16-alias-template.md b/cpp/ql/lib/change-notes/2026-05-16-alias-template.md new file mode 100644 index 00000000000..2777da94abf --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-05-16-alias-template.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. diff --git a/cpp/ql/lib/change-notes/2026-05-18-alias-type.md b/cpp/ql/lib/change-notes/2026-05-18-alias-type.md new file mode 100644 index 00000000000..b744dd2fa95 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-05-18-alias-type.md @@ -0,0 +1,4 @@ +--- +category: deprecated +--- +* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. diff --git a/cpp/ql/lib/change-notes/2026-05-21-generated-from.md b/cpp/ql/lib/change-notes/2026-05-21-generated-from.md new file mode 100644 index 00000000000..bf3ddcb1070 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-05-21-generated-from.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. diff --git a/cpp/ql/lib/change-notes/released/10.2.0.md b/cpp/ql/lib/change-notes/released/10.2.0.md deleted file mode 100644 index cb514b82cbb..00000000000 --- a/cpp/ql/lib/change-notes/released/10.2.0.md +++ /dev/null @@ -1,15 +0,0 @@ -## 10.2.0 - -### Deprecated APIs - -* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. - -### New Features - -* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. -* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. - -### Minor Analysis Improvements - -* Added flow source models for `scanf_s` and related functions. -* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index a230efed2a4..940a668bbf3 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 10.2.0 +lastReleaseVersion: 10.1.1 diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index 04ee2d76ae9..bca102a1048 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 10.2.0 +version: 10.1.2-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index e8a2af1383c..901d2092283 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.6.4 - -No user-facing changes. - ## 1.6.3 ### Minor Analysis Improvements diff --git a/cpp/ql/src/change-notes/released/1.6.4.md b/cpp/ql/src/change-notes/released/1.6.4.md deleted file mode 100644 index 5c811dc4638..00000000000 --- a/cpp/ql/src/change-notes/released/1.6.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.6.4 - -No user-facing changes. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index 1910e09d6a6..00b51441d88 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.4 +lastReleaseVersion: 1.6.3 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 4915f969278..74055b4cf11 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.6.4 +version: 1.6.4-dev groups: - cpp - queries diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index 3ceb4374a77..eefb35f174a 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.7.68 - -No user-facing changes. - ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md deleted file mode 100644 index 774ffcebdfe..00000000000 --- a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.7.68 - -No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index f737dfa0972..0293fdade8f 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.68 +lastReleaseVersion: 1.7.67 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 1de44f9e1d8..659dd5b0038 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.68 +version: 1.7.68-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index 3ceb4374a77..eefb35f174a 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.7.68 - -No user-facing changes. - ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md deleted file mode 100644 index 774ffcebdfe..00000000000 --- a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.7.68 - -No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index f737dfa0972..0293fdade8f 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.68 +lastReleaseVersion: 1.7.67 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index e99c5a26b32..c7f243d86f0 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.68 +version: 1.7.68-dev groups: - csharp - solorigate diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index a45a993832e..17fd83bcda7 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,10 +1,3 @@ -## 6.0.2 - -### Minor Analysis Improvements - -* Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. -* C# 14: Added support for user-defined instance increment/decrement operators. - ## 6.0.1 No user-facing changes. diff --git a/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md b/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md new file mode 100644 index 00000000000..a840fdf4fe3 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/change-notes/released/6.0.2.md b/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md similarity index 67% rename from csharp/ql/lib/change-notes/released/6.0.2.md rename to csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md index ea98fb2257e..84e3833860a 100644 --- a/csharp/ql/lib/change-notes/released/6.0.2.md +++ b/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md @@ -1,6 +1,4 @@ -## 6.0.2 - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. -* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index 70437ec53b8..d1f3c68c812 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.0.2 +lastReleaseVersion: 6.0.1 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 0745dfdd527..b3a0dab7303 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 6.0.2 +version: 6.0.2-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index 5c196df3614..8c4388fe2bb 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.7.4 - -No user-facing changes. - ## 1.7.3 No user-facing changes. diff --git a/csharp/ql/src/change-notes/released/1.7.4.md b/csharp/ql/src/change-notes/released/1.7.4.md deleted file mode 100644 index 801ed5f5e71..00000000000 --- a/csharp/ql/src/change-notes/released/1.7.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.7.4 - -No user-facing changes. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index f4f3a4d5120..9f9661b1e77 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.4 +lastReleaseVersion: 1.7.3 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index d9269a9fd1b..bfb1852bacb 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.7.4 +version: 1.7.4-dev groups: - csharp - queries diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index 14258018aea..512a5732ccd 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.51.md b/go/ql/consistency-queries/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/go/ql/consistency-queries/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index c07260f76da..4c65036e5cf 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.51 +version: 1.0.51-dev groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 0d5738ad029..54afc3a977b 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,7 +1,3 @@ -## 7.1.2 - -No user-facing changes. - ## 7.1.1 No user-facing changes. diff --git a/go/ql/lib/change-notes/released/7.1.2.md b/go/ql/lib/change-notes/released/7.1.2.md deleted file mode 100644 index d55cf91e249..00000000000 --- a/go/ql/lib/change-notes/released/7.1.2.md +++ /dev/null @@ -1,3 +0,0 @@ -## 7.1.2 - -No user-facing changes. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 547681cc440..8e970df6cae 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.2 +lastReleaseVersion: 7.1.1 diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index 8a9a9624de5..f12cd33e5e0 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 7.1.2 +version: 7.1.2-dev groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index c58883ee3c2..84d9ae7de59 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.6.4 - -No user-facing changes. - ## 1.6.3 No user-facing changes. diff --git a/go/ql/src/change-notes/released/1.6.4.md b/go/ql/src/change-notes/released/1.6.4.md deleted file mode 100644 index 5c811dc4638..00000000000 --- a/go/ql/src/change-notes/released/1.6.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.6.4 - -No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index 1910e09d6a6..00b51441d88 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.4 +lastReleaseVersion: 1.6.3 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 601e81ea035..40ad8f32001 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.6.4 +version: 1.6.4-dev groups: - go - queries diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index 2e702064d7f..a6c0cfc278a 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,9 +1,3 @@ -## 9.1.2 - -### Minor Analysis Improvements - -* Added LLM-generated source and sink models for `org.apache.avro`. - ## 9.1.1 ### Minor Analysis Improvements diff --git a/java/ql/lib/change-notes/released/9.1.2.md b/java/ql/lib/change-notes/2026-05-19-avro-mads.md similarity index 61% rename from java/ql/lib/change-notes/released/9.1.2.md rename to java/ql/lib/change-notes/2026-05-19-avro-mads.md index c10b69f0fe9..43368b098b1 100644 --- a/java/ql/lib/change-notes/released/9.1.2.md +++ b/java/ql/lib/change-notes/2026-05-19-avro-mads.md @@ -1,5 +1,4 @@ -## 9.1.2 - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * Added LLM-generated source and sink models for `org.apache.avro`. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 1fd7d868f4e..02e630d3384 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 9.1.2 +lastReleaseVersion: 9.1.1 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index 561ef7db55c..aa9a2957362 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 9.1.2 +version: 9.1.2-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index e013e79ce9e..fbbc339797b 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.11.4 - -No user-facing changes. - ## 1.11.3 ### Minor Analysis Improvements diff --git a/java/ql/src/change-notes/released/1.11.4.md b/java/ql/src/change-notes/released/1.11.4.md deleted file mode 100644 index 3ebd37b0be7..00000000000 --- a/java/ql/src/change-notes/released/1.11.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.11.4 - -No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 813a925461f..220561dc648 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.11.4 +lastReleaseVersion: 1.11.3 diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index cfd8dbc56c8..2005542ba0d 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.11.4 +version: 1.11.4-dev groups: - java - queries diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index 6471aa3fe68..c201b3a4b13 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,9 +1,3 @@ -## 2.7.2 - -### Minor Analysis Improvements - -* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. - ## 2.7.1 No user-facing changes. diff --git a/javascript/ql/lib/change-notes/released/2.7.2.md b/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md similarity index 89% rename from javascript/ql/lib/change-notes/released/2.7.2.md rename to javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md index 9d0eca2cb4e..f6e6caed325 100644 --- a/javascript/ql/lib/change-notes/released/2.7.2.md +++ b/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md @@ -1,5 +1,4 @@ -## 2.7.2 - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index 5160df7b1b7..820fb65a5c7 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.7.2 +lastReleaseVersion: 2.7.1 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index 6caebf91399..6e8e84b394d 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.7.2 +version: 2.7.2-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index b3a62befc5e..1a69291d145 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.3.11 - -No user-facing changes. - ## 2.3.10 No user-facing changes. diff --git a/javascript/ql/src/change-notes/released/2.3.11.md b/javascript/ql/src/change-notes/released/2.3.11.md deleted file mode 100644 index 31b11998b74..00000000000 --- a/javascript/ql/src/change-notes/released/2.3.11.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.3.11 - -No user-facing changes. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index 5ac091006e8..a4a2f98d509 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.3.11 +lastReleaseVersion: 2.3.10 diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 03a7153c05a..e58cb3d2d94 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 2.3.11 +version: 2.3.11-dev groups: - javascript - queries diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index 8f96c9ba8dd..8e20945c6bf 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.51.md b/misc/suite-helpers/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/misc/suite-helpers/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index a6aeeb719fa..fd00605cfd1 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.51 +version: 1.0.51-dev groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 3efb4e57482..3d09821803b 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,9 +1,3 @@ -## 7.1.2 - -### Minor Analysis Improvements - -* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. - ## 7.1.1 No user-facing changes. diff --git a/python/ql/lib/change-notes/released/7.1.2.md b/python/ql/lib/change-notes/2026-05-14-sensitive-data.md similarity index 90% rename from python/ql/lib/change-notes/released/7.1.2.md rename to python/ql/lib/change-notes/2026-05-14-sensitive-data.md index 523a14edfbe..49754de35ce 100644 --- a/python/ql/lib/change-notes/released/7.1.2.md +++ b/python/ql/lib/change-notes/2026-05-14-sensitive-data.md @@ -1,5 +1,4 @@ -## 7.1.2 - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 547681cc440..8e970df6cae 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.2 +lastReleaseVersion: 7.1.1 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index a53a716fbf0..981ab78ff33 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 7.1.2 +version: 7.1.2-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 27698f1d3df..544b9778d4d 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.8.4 - -No user-facing changes. - ## 1.8.3 No user-facing changes. diff --git a/python/ql/src/change-notes/released/1.8.4.md b/python/ql/src/change-notes/released/1.8.4.md deleted file mode 100644 index 9aef6d10d1c..00000000000 --- a/python/ql/src/change-notes/released/1.8.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.8.4 - -No user-facing changes. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index f2a60cd1327..8071ef421ab 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.8.4 +lastReleaseVersion: 1.8.3 diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index afa318334b6..2fc026ff480 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.8.4 +version: 1.8.4-dev groups: - python - queries diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index d26bfa6f205..07859d0f0e6 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,7 +1,3 @@ -## 5.2.2 - -No user-facing changes. - ## 5.2.1 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/5.2.2.md b/ruby/ql/lib/change-notes/released/5.2.2.md deleted file mode 100644 index 22402d6e8fa..00000000000 --- a/ruby/ql/lib/change-notes/released/5.2.2.md +++ /dev/null @@ -1,3 +0,0 @@ -## 5.2.2 - -No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index e3b1b0c079d..1684d0e72a2 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.2.2 +lastReleaseVersion: 5.2.1 diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index b36aada4770..df8efbe68de 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 5.2.2 +version: 5.2.2-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index 384ca633202..c874059c151 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.6.4 - -No user-facing changes. - ## 1.6.3 No user-facing changes. diff --git a/ruby/ql/src/change-notes/released/1.6.4.md b/ruby/ql/src/change-notes/released/1.6.4.md deleted file mode 100644 index 5c811dc4638..00000000000 --- a/ruby/ql/src/change-notes/released/1.6.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.6.4 - -No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 1910e09d6a6..00b51441d88 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.4 +lastReleaseVersion: 1.6.3 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index e0c8c6b4c0c..b68d13e5908 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.6.4 +version: 1.6.4-dev groups: - ruby - queries diff --git a/rust/ql/lib/CHANGELOG.md b/rust/ql/lib/CHANGELOG.md index 3651026d737..d85d27d88d6 100644 --- a/rust/ql/lib/CHANGELOG.md +++ b/rust/ql/lib/CHANGELOG.md @@ -1,9 +1,3 @@ -## 0.2.15 - -### Minor Analysis Improvements - -* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. - ## 0.2.14 No user-facing changes. diff --git a/rust/ql/lib/change-notes/released/0.2.15.md b/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md similarity index 89% rename from rust/ql/lib/change-notes/released/0.2.15.md rename to rust/ql/lib/change-notes/2026-05-14-sensitive-data.md index 3644126ec1f..5aa6febd49b 100644 --- a/rust/ql/lib/change-notes/released/0.2.15.md +++ b/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md @@ -1,5 +1,4 @@ -## 0.2.15 - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/rust/ql/lib/codeql-pack.release.yml b/rust/ql/lib/codeql-pack.release.yml index 0f574e080e4..c53820a76d5 100644 --- a/rust/ql/lib/codeql-pack.release.yml +++ b/rust/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.15 +lastReleaseVersion: 0.2.14 diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index 49c4dddd4c6..062c2f4e635 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.2.15 +version: 0.2.15-dev groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/src/CHANGELOG.md b/rust/ql/src/CHANGELOG.md index 4f4807ff82e..ad1e8ef3bfe 100644 --- a/rust/ql/src/CHANGELOG.md +++ b/rust/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.1.36 - -No user-facing changes. - ## 0.1.35 No user-facing changes. diff --git a/rust/ql/src/change-notes/released/0.1.36.md b/rust/ql/src/change-notes/released/0.1.36.md deleted file mode 100644 index 8685189c564..00000000000 --- a/rust/ql/src/change-notes/released/0.1.36.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.1.36 - -No user-facing changes. diff --git a/rust/ql/src/codeql-pack.release.yml b/rust/ql/src/codeql-pack.release.yml index 270bd27a7aa..6a5806eec2b 100644 --- a/rust/ql/src/codeql-pack.release.yml +++ b/rust/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.36 +lastReleaseVersion: 0.1.35 diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 853aefb020d..67966540de6 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.36 +version: 0.1.36-dev groups: - rust - queries diff --git a/shared/concepts/CHANGELOG.md b/shared/concepts/CHANGELOG.md index 787779674f0..e2de2975455 100644 --- a/shared/concepts/CHANGELOG.md +++ b/shared/concepts/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.0.25 - -No user-facing changes. - ## 0.0.24 No user-facing changes. diff --git a/shared/concepts/change-notes/released/0.0.25.md b/shared/concepts/change-notes/released/0.0.25.md deleted file mode 100644 index e41a9acfa06..00000000000 --- a/shared/concepts/change-notes/released/0.0.25.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.25 - -No user-facing changes. diff --git a/shared/concepts/codeql-pack.release.yml b/shared/concepts/codeql-pack.release.yml index 6d0e80a50c3..b956773a07f 100644 --- a/shared/concepts/codeql-pack.release.yml +++ b/shared/concepts/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.25 +lastReleaseVersion: 0.0.24 diff --git a/shared/concepts/qlpack.yml b/shared/concepts/qlpack.yml index 98ae75ca6ca..c51537b2228 100644 --- a/shared/concepts/qlpack.yml +++ b/shared/concepts/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/concepts -version: 0.0.25 +version: 0.0.25-dev groups: shared library: true dependencies: diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index 8ac7faf2554..dc02f115c99 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.0.35 - -No user-facing changes. - ## 2.0.34 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.35.md b/shared/controlflow/change-notes/released/2.0.35.md deleted file mode 100644 index 526e1fc9f4c..00000000000 --- a/shared/controlflow/change-notes/released/2.0.35.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.0.35 - -No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 27eb8ef8ece..339a3ce7c57 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.35 +lastReleaseVersion: 2.0.34 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index a28d74ae749..e33617ca4f0 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.35 +version: 2.0.35-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index b2cf75110ac..7ecbeda3b21 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.1.7 - -No user-facing changes. - ## 2.1.6 No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.1.7.md b/shared/dataflow/change-notes/released/2.1.7.md deleted file mode 100644 index af7772169fe..00000000000 --- a/shared/dataflow/change-notes/released/2.1.7.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.1.7 - -No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index cfa57a47251..1c810b60c4a 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.1.7 +lastReleaseVersion: 2.1.6 diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 6564305a246..2058b35be64 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.1.7 +version: 2.1.7-dev groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index 6619a18079c..964c1bb1d98 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.51.md b/shared/mad/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/mad/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index c8d8eb47b4a..fb135546a90 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true dependencies: diff --git a/shared/quantum/CHANGELOG.md b/shared/quantum/CHANGELOG.md index c8b656e4f35..7153b9314b1 100644 --- a/shared/quantum/CHANGELOG.md +++ b/shared/quantum/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.0.29 - -No user-facing changes. - ## 0.0.28 No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.29.md b/shared/quantum/change-notes/released/0.0.29.md deleted file mode 100644 index 4428927c79d..00000000000 --- a/shared/quantum/change-notes/released/0.0.29.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.29 - -No user-facing changes. diff --git a/shared/quantum/codeql-pack.release.yml b/shared/quantum/codeql-pack.release.yml index c81f1813120..3462db7d348 100644 --- a/shared/quantum/codeql-pack.release.yml +++ b/shared/quantum/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.29 +lastReleaseVersion: 0.0.28 diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index a8d3a71823b..951cce392ae 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.29 +version: 0.0.29-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index a400a91f8c9..e2a893046c9 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.51.md b/shared/rangeanalysis/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/rangeanalysis/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 5ea1c83b182..41f319731b0 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index c4b7fc6e87f..bb83dfc0a1f 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.51.md b/shared/regex/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/regex/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 3c01106e9b8..198bf43da04 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index 9cfe68398b2..f9145f2c88b 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.0.27 - -No user-facing changes. - ## 2.0.26 No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.27.md b/shared/ssa/change-notes/released/2.0.27.md deleted file mode 100644 index 639cf77090e..00000000000 --- a/shared/ssa/change-notes/released/2.0.27.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.0.27 - -No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index a047558f018..63d57bef481 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.27 +lastReleaseVersion: 2.0.26 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index c10e0892660..5f8de945745 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.27 +version: 2.0.27-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index 14258018aea..512a5732ccd 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.51.md b/shared/threat-models/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/threat-models/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index 855242656c8..c3ac3656b3a 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.51 +version: 1.0.51-dev library: true groups: shared dataExtensions: diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index 9e78286a1a4..c98a035d149 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.51.md b/shared/tutorial/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/tutorial/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index 39bfd9cc21d..e68fe7948ff 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index e9334c9da8d..de43834a84e 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.51.md b/shared/typeflow/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/typeflow/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index f06ea443f79..482138349ac 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true dependencies: diff --git a/shared/typeinference/CHANGELOG.md b/shared/typeinference/CHANGELOG.md index 24dc81f3aa2..3bbb96e59a9 100644 --- a/shared/typeinference/CHANGELOG.md +++ b/shared/typeinference/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.0.32 - -No user-facing changes. - ## 0.0.31 No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.32.md b/shared/typeinference/change-notes/released/0.0.32.md deleted file mode 100644 index c390443f09a..00000000000 --- a/shared/typeinference/change-notes/released/0.0.32.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.32 - -No user-facing changes. diff --git a/shared/typeinference/codeql-pack.release.yml b/shared/typeinference/codeql-pack.release.yml index 714fcfc1828..54b504d06ec 100644 --- a/shared/typeinference/codeql-pack.release.yml +++ b/shared/typeinference/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.32 +lastReleaseVersion: 0.0.31 diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index ece5dd3b6e8..d7dbeae2e09 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.32 +version: 0.0.32-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index e9b5492b0d8..313862d5bc7 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.0.35 - -No user-facing changes. - ## 2.0.34 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.35.md b/shared/typetracking/change-notes/released/2.0.35.md deleted file mode 100644 index 526e1fc9f4c..00000000000 --- a/shared/typetracking/change-notes/released/2.0.35.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.0.35 - -No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 27eb8ef8ece..339a3ce7c57 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.35 +lastReleaseVersion: 2.0.34 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index bd874407aff..891f8d0b1b1 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.35 +version: 2.0.35-dev groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index dbafbea9b98..5838cd3c535 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.51.md b/shared/typos/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/typos/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index 9a2ed996444..b4705122b0a 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index df741ed9d73..24a4f7d09a2 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.0.38 - -No user-facing changes. - ## 2.0.37 No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.38.md b/shared/util/change-notes/released/2.0.38.md deleted file mode 100644 index 0fab2ede165..00000000000 --- a/shared/util/change-notes/released/2.0.38.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2.0.38 - -No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 4ec9eb0980c..108259a7400 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.38 +lastReleaseVersion: 2.0.37 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index dc654fca261..6190a3b4275 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.38 +version: 2.0.38-dev groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 685a8032d64..96dfbcadf56 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.51.md b/shared/xml/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/xml/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index 40cf2695728..c8e51461dae 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index 4f57ee07cfa..e006acbeb21 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.0.51 - -No user-facing changes. - ## 1.0.50 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.51.md b/shared/yaml/change-notes/released/1.0.51.md deleted file mode 100644 index b96d48b8822..00000000000 --- a/shared/yaml/change-notes/released/1.0.51.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.51 - -No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 232dbe38ec8..856137cc5db 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.51 +lastReleaseVersion: 1.0.50 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index 0b4fd245f3b..c499501ab26 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.51 +version: 1.0.51-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index 1eb5afb48e7..01461fd5bfe 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,13 +1,3 @@ -## 6.7.0 - -### Major Analysis Improvements - -* Upgraded to allow analysis of Swift 6.3.2. - -### Minor Analysis Improvements - -* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. - ## 6.6.0 ### New Features diff --git a/swift/ql/lib/change-notes/released/6.7.0.md b/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md similarity index 76% rename from swift/ql/lib/change-notes/released/6.7.0.md rename to swift/ql/lib/change-notes/2026-05-14-sensitive-data.md index 8d7bf41cc1d..70e96a3469c 100644 --- a/swift/ql/lib/change-notes/released/6.7.0.md +++ b/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md @@ -1,9 +1,4 @@ -## 6.7.0 - -### Major Analysis Improvements - -* Upgraded to allow analysis of Swift 6.3.2. - -### Minor Analysis Improvements - +--- +category: minorAnalysis +--- * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md b/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md new file mode 100644 index 00000000000..530b7187e7a --- /dev/null +++ b/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Upgraded to allow analysis of Swift 6.3.2. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 55a13d309e5..4d7f31f2d8e 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.7.0 +lastReleaseVersion: 6.6.0 diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index f62f77afa0e..5e2f7c2942d 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 6.7.0 +version: 6.6.1-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index 4e3b53c37b3..4bd8088718a 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,7 +1,3 @@ -## 1.3.4 - -No user-facing changes. - ## 1.3.3 No user-facing changes. diff --git a/swift/ql/src/change-notes/released/1.3.4.md b/swift/ql/src/change-notes/released/1.3.4.md deleted file mode 100644 index 5073aca7222..00000000000 --- a/swift/ql/src/change-notes/released/1.3.4.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.3.4 - -No user-facing changes. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index 8263ddf2c8b..eb1f7dabc84 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.3.4 +lastReleaseVersion: 1.3.3 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index 05710b29874..da4df6ae6d9 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.3.4 +version: 1.3.4-dev groups: - swift - queries From 8b6f969cdb9b1a09ce4379ccadad1e2c9ca46677 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 May 2026 11:27:54 +0000 Subject: [PATCH 82/85] Release preparation for version 2.25.6 --- actions/ql/lib/CHANGELOG.md | 6 ++++++ .../0.4.37.md} | 9 +++++---- actions/ql/lib/codeql-pack.release.yml | 2 +- actions/ql/lib/qlpack.yml | 2 +- actions/ql/src/CHANGELOG.md | 19 +++++++++++++++++++ .../2026-05-05-untrusted-checkout-high.md | 4 ---- .../2026-05-12-sha256-pinned-actions.md | 4 ---- ...n-untrusted-checkout-improvements-alert.md | 4 ---- ...ntrusted-checkout-improvements-helpfile.md | 4 ---- ...ntrusted-checkout-improvements-metadata.md | 4 ---- .../ql/src/change-notes/released/0.6.29.md | 18 ++++++++++++++++++ actions/ql/src/codeql-pack.release.yml | 2 +- actions/ql/src/qlpack.yml | 2 +- cpp/ql/lib/CHANGELOG.md | 16 ++++++++++++++++ .../change-notes/2026-05-15-secure-scanf.md | 5 ----- .../change-notes/2026-05-16-alias-template.md | 4 ---- .../lib/change-notes/2026-05-18-alias-type.md | 4 ---- .../change-notes/2026-05-21-generated-from.md | 4 ---- cpp/ql/lib/change-notes/released/10.2.0.md | 15 +++++++++++++++ cpp/ql/lib/codeql-pack.release.yml | 2 +- cpp/ql/lib/qlpack.yml | 2 +- cpp/ql/src/CHANGELOG.md | 4 ++++ cpp/ql/src/change-notes/released/1.6.4.md | 3 +++ cpp/ql/src/codeql-pack.release.yml | 2 +- cpp/ql/src/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/lib/CHANGELOG.md | 4 ++++ .../lib/change-notes/released/1.7.68.md | 3 +++ .../Solorigate/lib/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/lib/qlpack.yml | 2 +- .../ql/campaigns/Solorigate/src/CHANGELOG.md | 4 ++++ .../src/change-notes/released/1.7.68.md | 3 +++ .../Solorigate/src/codeql-pack.release.yml | 2 +- csharp/ql/campaigns/Solorigate/src/qlpack.yml | 2 +- csharp/ql/lib/CHANGELOG.md | 7 +++++++ .../2026-05-12-user-increment-decrement.md | 4 ---- .../6.0.2.md} | 8 +++++--- csharp/ql/lib/codeql-pack.release.yml | 2 +- csharp/ql/lib/qlpack.yml | 2 +- csharp/ql/src/CHANGELOG.md | 4 ++++ csharp/ql/src/change-notes/released/1.7.4.md | 3 +++ csharp/ql/src/codeql-pack.release.yml | 2 +- csharp/ql/src/qlpack.yml | 2 +- go/ql/consistency-queries/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ .../codeql-pack.release.yml | 2 +- go/ql/consistency-queries/qlpack.yml | 2 +- go/ql/lib/CHANGELOG.md | 4 ++++ go/ql/lib/change-notes/released/7.1.2.md | 3 +++ go/ql/lib/codeql-pack.release.yml | 2 +- go/ql/lib/qlpack.yml | 2 +- go/ql/src/CHANGELOG.md | 4 ++++ go/ql/src/change-notes/released/1.6.4.md | 3 +++ go/ql/src/codeql-pack.release.yml | 2 +- go/ql/src/qlpack.yml | 2 +- java/ql/lib/CHANGELOG.md | 6 ++++++ .../9.1.2.md} | 7 ++++--- java/ql/lib/codeql-pack.release.yml | 2 +- java/ql/lib/qlpack.yml | 2 +- java/ql/src/CHANGELOG.md | 4 ++++ java/ql/src/change-notes/released/1.11.4.md | 3 +++ java/ql/src/codeql-pack.release.yml | 2 +- java/ql/src/qlpack.yml | 2 +- javascript/ql/lib/CHANGELOG.md | 6 ++++++ .../2.7.2.md} | 7 ++++--- javascript/ql/lib/codeql-pack.release.yml | 2 +- javascript/ql/lib/qlpack.yml | 2 +- javascript/ql/src/CHANGELOG.md | 4 ++++ .../ql/src/change-notes/released/2.3.11.md | 3 +++ javascript/ql/src/codeql-pack.release.yml | 2 +- javascript/ql/src/qlpack.yml | 2 +- misc/suite-helpers/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ misc/suite-helpers/codeql-pack.release.yml | 2 +- misc/suite-helpers/qlpack.yml | 2 +- python/ql/lib/CHANGELOG.md | 6 ++++++ .../7.1.2.md} | 7 ++++--- python/ql/lib/codeql-pack.release.yml | 2 +- python/ql/lib/qlpack.yml | 2 +- python/ql/src/CHANGELOG.md | 4 ++++ python/ql/src/change-notes/released/1.8.4.md | 3 +++ python/ql/src/codeql-pack.release.yml | 2 +- python/ql/src/qlpack.yml | 2 +- ruby/ql/lib/CHANGELOG.md | 4 ++++ ruby/ql/lib/change-notes/released/5.2.2.md | 3 +++ ruby/ql/lib/codeql-pack.release.yml | 2 +- ruby/ql/lib/qlpack.yml | 2 +- ruby/ql/src/CHANGELOG.md | 4 ++++ ruby/ql/src/change-notes/released/1.6.4.md | 3 +++ ruby/ql/src/codeql-pack.release.yml | 2 +- ruby/ql/src/qlpack.yml | 2 +- rust/ql/lib/CHANGELOG.md | 6 ++++++ .../0.2.15.md} | 7 ++++--- rust/ql/lib/codeql-pack.release.yml | 2 +- rust/ql/lib/qlpack.yml | 2 +- rust/ql/src/CHANGELOG.md | 4 ++++ rust/ql/src/change-notes/released/0.1.36.md | 3 +++ rust/ql/src/codeql-pack.release.yml | 2 +- rust/ql/src/qlpack.yml | 2 +- shared/concepts/CHANGELOG.md | 4 ++++ .../concepts/change-notes/released/0.0.25.md | 3 +++ shared/concepts/codeql-pack.release.yml | 2 +- shared/concepts/qlpack.yml | 2 +- shared/controlflow/CHANGELOG.md | 4 ++++ .../change-notes/released/2.0.35.md | 3 +++ shared/controlflow/codeql-pack.release.yml | 2 +- shared/controlflow/qlpack.yml | 2 +- shared/dataflow/CHANGELOG.md | 4 ++++ .../dataflow/change-notes/released/2.1.7.md | 3 +++ shared/dataflow/codeql-pack.release.yml | 2 +- shared/dataflow/qlpack.yml | 2 +- shared/mad/CHANGELOG.md | 4 ++++ shared/mad/change-notes/released/1.0.51.md | 3 +++ shared/mad/codeql-pack.release.yml | 2 +- shared/mad/qlpack.yml | 2 +- shared/quantum/CHANGELOG.md | 4 ++++ .../quantum/change-notes/released/0.0.29.md | 3 +++ shared/quantum/codeql-pack.release.yml | 2 +- shared/quantum/qlpack.yml | 2 +- shared/rangeanalysis/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ shared/rangeanalysis/codeql-pack.release.yml | 2 +- shared/rangeanalysis/qlpack.yml | 2 +- shared/regex/CHANGELOG.md | 4 ++++ shared/regex/change-notes/released/1.0.51.md | 3 +++ shared/regex/codeql-pack.release.yml | 2 +- shared/regex/qlpack.yml | 2 +- shared/ssa/CHANGELOG.md | 4 ++++ shared/ssa/change-notes/released/2.0.27.md | 3 +++ shared/ssa/codeql-pack.release.yml | 2 +- shared/ssa/qlpack.yml | 2 +- shared/threat-models/CHANGELOG.md | 4 ++++ .../change-notes/released/1.0.51.md | 3 +++ shared/threat-models/codeql-pack.release.yml | 2 +- shared/threat-models/qlpack.yml | 2 +- shared/tutorial/CHANGELOG.md | 4 ++++ .../tutorial/change-notes/released/1.0.51.md | 3 +++ shared/tutorial/codeql-pack.release.yml | 2 +- shared/tutorial/qlpack.yml | 2 +- shared/typeflow/CHANGELOG.md | 4 ++++ .../typeflow/change-notes/released/1.0.51.md | 3 +++ shared/typeflow/codeql-pack.release.yml | 2 +- shared/typeflow/qlpack.yml | 2 +- shared/typeinference/CHANGELOG.md | 4 ++++ .../change-notes/released/0.0.32.md | 3 +++ shared/typeinference/codeql-pack.release.yml | 2 +- shared/typeinference/qlpack.yml | 2 +- shared/typetracking/CHANGELOG.md | 4 ++++ .../change-notes/released/2.0.35.md | 3 +++ shared/typetracking/codeql-pack.release.yml | 2 +- shared/typetracking/qlpack.yml | 2 +- shared/typos/CHANGELOG.md | 4 ++++ shared/typos/change-notes/released/1.0.51.md | 3 +++ shared/typos/codeql-pack.release.yml | 2 +- shared/typos/qlpack.yml | 2 +- shared/util/CHANGELOG.md | 4 ++++ shared/util/change-notes/released/2.0.38.md | 3 +++ shared/util/codeql-pack.release.yml | 2 +- shared/util/qlpack.yml | 2 +- shared/xml/CHANGELOG.md | 4 ++++ shared/xml/change-notes/released/1.0.51.md | 3 +++ shared/xml/codeql-pack.release.yml | 2 +- shared/xml/qlpack.yml | 2 +- shared/yaml/CHANGELOG.md | 4 ++++ shared/yaml/change-notes/released/1.0.51.md | 3 +++ shared/yaml/codeql-pack.release.yml | 2 +- shared/yaml/qlpack.yml | 2 +- swift/ql/lib/CHANGELOG.md | 10 ++++++++++ .../change-notes/2026-05-19-swift-6.3.2.md | 4 ---- .../6.7.0.md} | 11 ++++++++--- swift/ql/lib/codeql-pack.release.yml | 2 +- swift/ql/lib/qlpack.yml | 2 +- swift/ql/src/CHANGELOG.md | 4 ++++ swift/ql/src/change-notes/released/1.3.4.md | 3 +++ swift/ql/src/codeql-pack.release.yml | 2 +- swift/ql/src/qlpack.yml | 2 +- 175 files changed, 455 insertions(+), 149 deletions(-) rename actions/ql/lib/change-notes/{2026-05-12-improved-alphanumeric-regex.md => released/0.4.37.md} (80%) delete mode 100644 actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md delete mode 100644 actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md delete mode 100644 actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md create mode 100644 actions/ql/src/change-notes/released/0.6.29.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-16-alias-template.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-18-alias-type.md delete mode 100644 cpp/ql/lib/change-notes/2026-05-21-generated-from.md create mode 100644 cpp/ql/lib/change-notes/released/10.2.0.md create mode 100644 cpp/ql/src/change-notes/released/1.6.4.md create mode 100644 csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md create mode 100644 csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md delete mode 100644 csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md rename csharp/ql/lib/change-notes/{2026-05-20-csharp14-dotnet10.md => released/6.0.2.md} (67%) create mode 100644 csharp/ql/src/change-notes/released/1.7.4.md create mode 100644 go/ql/consistency-queries/change-notes/released/1.0.51.md create mode 100644 go/ql/lib/change-notes/released/7.1.2.md create mode 100644 go/ql/src/change-notes/released/1.6.4.md rename java/ql/lib/change-notes/{2026-05-19-avro-mads.md => released/9.1.2.md} (61%) create mode 100644 java/ql/src/change-notes/released/1.11.4.md rename javascript/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/2.7.2.md} (89%) create mode 100644 javascript/ql/src/change-notes/released/2.3.11.md create mode 100644 misc/suite-helpers/change-notes/released/1.0.51.md rename python/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/7.1.2.md} (90%) create mode 100644 python/ql/src/change-notes/released/1.8.4.md create mode 100644 ruby/ql/lib/change-notes/released/5.2.2.md create mode 100644 ruby/ql/src/change-notes/released/1.6.4.md rename rust/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/0.2.15.md} (89%) create mode 100644 rust/ql/src/change-notes/released/0.1.36.md create mode 100644 shared/concepts/change-notes/released/0.0.25.md create mode 100644 shared/controlflow/change-notes/released/2.0.35.md create mode 100644 shared/dataflow/change-notes/released/2.1.7.md create mode 100644 shared/mad/change-notes/released/1.0.51.md create mode 100644 shared/quantum/change-notes/released/0.0.29.md create mode 100644 shared/rangeanalysis/change-notes/released/1.0.51.md create mode 100644 shared/regex/change-notes/released/1.0.51.md create mode 100644 shared/ssa/change-notes/released/2.0.27.md create mode 100644 shared/threat-models/change-notes/released/1.0.51.md create mode 100644 shared/tutorial/change-notes/released/1.0.51.md create mode 100644 shared/typeflow/change-notes/released/1.0.51.md create mode 100644 shared/typeinference/change-notes/released/0.0.32.md create mode 100644 shared/typetracking/change-notes/released/2.0.35.md create mode 100644 shared/typos/change-notes/released/1.0.51.md create mode 100644 shared/util/change-notes/released/2.0.38.md create mode 100644 shared/xml/change-notes/released/1.0.51.md create mode 100644 shared/yaml/change-notes/released/1.0.51.md delete mode 100644 swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md rename swift/ql/lib/change-notes/{2026-05-14-sensitive-data.md => released/6.7.0.md} (76%) create mode 100644 swift/ql/src/change-notes/released/1.3.4.md diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index ddd0b0f1aec..7a61a60c379 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.4.37 + +### Minor Analysis Improvements + +* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. + ## 0.4.36 ### Minor Analysis Improvements diff --git a/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md b/actions/ql/lib/change-notes/released/0.4.37.md similarity index 80% rename from actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md rename to actions/ql/lib/change-notes/released/0.4.37.md index df3aaf3613f..4809796b3ab 100644 --- a/actions/ql/lib/change-notes/2026-05-12-improved-alphanumeric-regex.md +++ b/actions/ql/lib/change-notes/released/0.4.37.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- -* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. \ No newline at end of file +## 0.4.37 + +### Minor Analysis Improvements + +* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used. diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index 45433e3ec03..df274514780 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.36 +lastReleaseVersion: 0.4.37 diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index ae4a57aa944..71c9cadbf28 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.37-dev +version: 0.4.37 library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index 1670f0af5be..c37cd20761b 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,3 +1,22 @@ +## 0.6.29 + +### Query Metadata Changes + +* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. + +### Major Analysis Improvements + +* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. + +### Minor Analysis Improvements + +* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. +* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. + +### Bug Fixes + +* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. + ## 0.6.28 ### Query Metadata Changes diff --git a/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md b/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md deleted file mode 100644 index 098c60a3753..00000000000 --- a/actions/ql/src/change-notes/2026-05-05-untrusted-checkout-high.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: majorAnalysis ---- -* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md b/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md deleted file mode 100644 index 521a5878c37..00000000000 --- a/actions/ql/src/change-notes/2026-05-12-sha256-pinned-actions.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md deleted file mode 100644 index f5ad3271a62..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md deleted file mode 100644 index 83e6528c86b..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. \ No newline at end of file diff --git a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md b/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md deleted file mode 100644 index 5df1f3347ea..00000000000 --- a/actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. \ No newline at end of file diff --git a/actions/ql/src/change-notes/released/0.6.29.md b/actions/ql/src/change-notes/released/0.6.29.md new file mode 100644 index 00000000000..82ca8174954 --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.29.md @@ -0,0 +1,18 @@ +## 0.6.29 + +### Query Metadata Changes + +* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but kept the portion of the previous change for the word "trusted" to "privileged". Added a missing "a" to phrasing in `actions/untrusted-checkout/high` and `actions/untrusted-checkout/medium`. + +### Major Analysis Improvements + +* Adjusted `actions/untrusted-checkout/critical` to align more with other untrusted resource queries, where the alert location is the location where the artifact is obtained from (the checkout point). This aligns with the other 2 related queries. This will cause the same alerts to re-open for closed alerts of this query. + +### Minor Analysis Improvements + +* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. +* The `actions/unpinned-tag` query now recognizes 64-character SHA-256 commit hashes as properly pinned references, in addition to 40-character SHA-1 hashes. + +### Bug Fixes + +* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index 90f3f09295a..e785984cacc 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.28 +lastReleaseVersion: 0.6.29 diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 33ab175fb18..3615c08b583 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.29-dev +version: 0.6.29 library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 3b95c10fbb5..0b3413f9d3c 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,19 @@ +## 10.2.0 + +### Deprecated APIs + +* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. + +### New Features + +* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. +* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. + +### Minor Analysis Improvements + +* Added flow source models for `scanf_s` and related functions. +* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. + ## 10.1.1 ### Minor Analysis Improvements diff --git a/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md b/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md deleted file mode 100644 index 0b8d5a79a72..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-15-secure-scanf.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -category: minorAnalysis ---- -* Added flow source models for `scanf_s` and related functions. -* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/2026-05-16-alias-template.md b/cpp/ql/lib/change-notes/2026-05-16-alias-template.md deleted file mode 100644 index 2777da94abf..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-16-alias-template.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. diff --git a/cpp/ql/lib/change-notes/2026-05-18-alias-type.md b/cpp/ql/lib/change-notes/2026-05-18-alias-type.md deleted file mode 100644 index b744dd2fa95..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-18-alias-type.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: deprecated ---- -* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. diff --git a/cpp/ql/lib/change-notes/2026-05-21-generated-from.md b/cpp/ql/lib/change-notes/2026-05-21-generated-from.md deleted file mode 100644 index bf3ddcb1070..00000000000 --- a/cpp/ql/lib/change-notes/2026-05-21-generated-from.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. diff --git a/cpp/ql/lib/change-notes/released/10.2.0.md b/cpp/ql/lib/change-notes/released/10.2.0.md new file mode 100644 index 00000000000..cb514b82cbb --- /dev/null +++ b/cpp/ql/lib/change-notes/released/10.2.0.md @@ -0,0 +1,15 @@ +## 10.2.0 + +### Deprecated APIs + +* The `UsingAliasTypedefType` class has been deprecated. Use `TypeAliasType` instead. + +### New Features + +* Added a `getOriginalTemplate` predicate to `TemplateClass`, `TemplateFunction`, `TemplateVariable`, and `AliasTemplateType`, which yields the class member template the template was generated from. The predicates only have results for templates that are members of class template instantiations. +* Added `AliasTemplateType` and `AliasTemplateInstantiationType` classes, representing C++ alias templates and their instantiations. + +### Minor Analysis Improvements + +* Added flow source models for `scanf_s` and related functions. +* Added a `Call` column to `LocalFlowSourceFunction::hasLocalFlowSource` and `RemoteFlowSourceFunction::hasRemoteFlowSource`. The old predicates without a `Call` column continue to be supported. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index 940a668bbf3..a230efed2a4 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 10.1.1 +lastReleaseVersion: 10.2.0 diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index bca102a1048..04ee2d76ae9 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 10.1.2-dev +version: 10.2.0 groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 901d2092283..e8a2af1383c 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 ### Minor Analysis Improvements diff --git a/cpp/ql/src/change-notes/released/1.6.4.md b/cpp/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/cpp/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 74055b4cf11..4915f969278 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.6.4-dev +version: 1.6.4 groups: - cpp - queries diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index eefb35f174a..3ceb4374a77 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.68 + +No user-facing changes. + ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md new file mode 100644 index 00000000000..774ffcebdfe --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.68.md @@ -0,0 +1,3 @@ +## 1.7.68 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 0293fdade8f..f737dfa0972 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.67 +lastReleaseVersion: 1.7.68 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 659dd5b0038..1de44f9e1d8 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.68-dev +version: 1.7.68 groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index eefb35f174a..3ceb4374a77 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.68 + +No user-facing changes. + ## 1.7.67 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md new file mode 100644 index 00000000000..774ffcebdfe --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.68.md @@ -0,0 +1,3 @@ +## 1.7.68 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 0293fdade8f..f737dfa0972 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.67 +lastReleaseVersion: 1.7.68 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index c7f243d86f0..e99c5a26b32 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.68-dev +version: 1.7.68 groups: - csharp - solorigate diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index 17fd83bcda7..a45a993832e 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,10 @@ +## 6.0.2 + +### Minor Analysis Improvements + +* Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. +* C# 14: Added support for user-defined instance increment/decrement operators. + ## 6.0.1 No user-facing changes. diff --git a/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md b/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md deleted file mode 100644 index a840fdf4fe3..00000000000 --- a/csharp/ql/lib/change-notes/2026-05-12-user-increment-decrement.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md b/csharp/ql/lib/change-notes/released/6.0.2.md similarity index 67% rename from csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md rename to csharp/ql/lib/change-notes/released/6.0.2.md index 84e3833860a..ea98fb2257e 100644 --- a/csharp/ql/lib/change-notes/2026-05-20-csharp14-dotnet10.md +++ b/csharp/ql/lib/change-notes/released/6.0.2.md @@ -1,4 +1,6 @@ ---- -category: minorAnalysis ---- +## 6.0.2 + +### Minor Analysis Improvements + * Full support for C# 14 / .NET 10. All new language features are now supported by the extractor. The QL library and data flow analysis now support the new C# 14 language constructs and include generated Models as Data (MaD) models for the .NET 10 runtime. +* C# 14: Added support for user-defined instance increment/decrement operators. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index d1f3c68c812..70437ec53b8 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.0.1 +lastReleaseVersion: 6.0.2 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index b3a0dab7303..0745dfdd527 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 6.0.2-dev +version: 6.0.2 groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index 8c4388fe2bb..5c196df3614 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.4 + +No user-facing changes. + ## 1.7.3 No user-facing changes. diff --git a/csharp/ql/src/change-notes/released/1.7.4.md b/csharp/ql/src/change-notes/released/1.7.4.md new file mode 100644 index 00000000000..801ed5f5e71 --- /dev/null +++ b/csharp/ql/src/change-notes/released/1.7.4.md @@ -0,0 +1,3 @@ +## 1.7.4 + +No user-facing changes. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index 9f9661b1e77..f4f3a4d5120 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.3 +lastReleaseVersion: 1.7.4 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index bfb1852bacb..d9269a9fd1b 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.7.4-dev +version: 1.7.4 groups: - csharp - queries diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index 512a5732ccd..14258018aea 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.51.md b/go/ql/consistency-queries/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index 4c65036e5cf..c07260f76da 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.51-dev +version: 1.0.51 groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 54afc3a977b..0d5738ad029 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.1.2 + +No user-facing changes. + ## 7.1.1 No user-facing changes. diff --git a/go/ql/lib/change-notes/released/7.1.2.md b/go/ql/lib/change-notes/released/7.1.2.md new file mode 100644 index 00000000000..d55cf91e249 --- /dev/null +++ b/go/ql/lib/change-notes/released/7.1.2.md @@ -0,0 +1,3 @@ +## 7.1.2 + +No user-facing changes. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 8e970df6cae..547681cc440 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.1 +lastReleaseVersion: 7.1.2 diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index f12cd33e5e0..8a9a9624de5 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 7.1.2-dev +version: 7.1.2 groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 84d9ae7de59..c58883ee3c2 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 No user-facing changes. diff --git a/go/ql/src/change-notes/released/1.6.4.md b/go/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/go/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 40ad8f32001..601e81ea035 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.6.4-dev +version: 1.6.4 groups: - go - queries diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index a6c0cfc278a..2e702064d7f 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 9.1.2 + +### Minor Analysis Improvements + +* Added LLM-generated source and sink models for `org.apache.avro`. + ## 9.1.1 ### Minor Analysis Improvements diff --git a/java/ql/lib/change-notes/2026-05-19-avro-mads.md b/java/ql/lib/change-notes/released/9.1.2.md similarity index 61% rename from java/ql/lib/change-notes/2026-05-19-avro-mads.md rename to java/ql/lib/change-notes/released/9.1.2.md index 43368b098b1..c10b69f0fe9 100644 --- a/java/ql/lib/change-notes/2026-05-19-avro-mads.md +++ b/java/ql/lib/change-notes/released/9.1.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 9.1.2 + +### Minor Analysis Improvements + * Added LLM-generated source and sink models for `org.apache.avro`. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 02e630d3384..1fd7d868f4e 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 9.1.1 +lastReleaseVersion: 9.1.2 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index aa9a2957362..561ef7db55c 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 9.1.2-dev +version: 9.1.2 groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index fbbc339797b..e013e79ce9e 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.11.4 + +No user-facing changes. + ## 1.11.3 ### Minor Analysis Improvements diff --git a/java/ql/src/change-notes/released/1.11.4.md b/java/ql/src/change-notes/released/1.11.4.md new file mode 100644 index 00000000000..3ebd37b0be7 --- /dev/null +++ b/java/ql/src/change-notes/released/1.11.4.md @@ -0,0 +1,3 @@ +## 1.11.4 + +No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 220561dc648..813a925461f 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.11.3 +lastReleaseVersion: 1.11.4 diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index 2005542ba0d..cfd8dbc56c8 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.11.4-dev +version: 1.11.4 groups: - java - queries diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index c201b3a4b13..6471aa3fe68 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.7.2 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. + ## 2.7.1 No user-facing changes. diff --git a/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md b/javascript/ql/lib/change-notes/released/2.7.2.md similarity index 89% rename from javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to javascript/ql/lib/change-notes/released/2.7.2.md index f6e6caed325..9d0eca2cb4e 100644 --- a/javascript/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/javascript/ql/lib/change-notes/released/2.7.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 2.7.2 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `js/clear-text-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index 820fb65a5c7..5160df7b1b7 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.7.1 +lastReleaseVersion: 2.7.2 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index 6e8e84b394d..6caebf91399 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.7.2-dev +version: 2.7.2 groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index 1a69291d145..b3a62befc5e 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.11 + +No user-facing changes. + ## 2.3.10 No user-facing changes. diff --git a/javascript/ql/src/change-notes/released/2.3.11.md b/javascript/ql/src/change-notes/released/2.3.11.md new file mode 100644 index 00000000000..31b11998b74 --- /dev/null +++ b/javascript/ql/src/change-notes/released/2.3.11.md @@ -0,0 +1,3 @@ +## 2.3.11 + +No user-facing changes. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index a4a2f98d509..5ac091006e8 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.3.10 +lastReleaseVersion: 2.3.11 diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index e58cb3d2d94..03a7153c05a 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 2.3.11-dev +version: 2.3.11 groups: - javascript - queries diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index 8e20945c6bf..8f96c9ba8dd 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.51.md b/misc/suite-helpers/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index fd00605cfd1..a6aeeb719fa 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.51-dev +version: 1.0.51 groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 3d09821803b..3efb4e57482 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.1.2 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. + ## 7.1.1 No user-facing changes. diff --git a/python/ql/lib/change-notes/2026-05-14-sensitive-data.md b/python/ql/lib/change-notes/released/7.1.2.md similarity index 90% rename from python/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to python/ql/lib/change-notes/released/7.1.2.md index 49754de35ce..523a14edfbe 100644 --- a/python/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/python/ql/lib/change-notes/released/7.1.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 7.1.2 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 8e970df6cae..547681cc440 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.1 +lastReleaseVersion: 7.1.2 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 981ab78ff33..a53a716fbf0 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 7.1.2-dev +version: 7.1.2 groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 544b9778d4d..27698f1d3df 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.4 + +No user-facing changes. + ## 1.8.3 No user-facing changes. diff --git a/python/ql/src/change-notes/released/1.8.4.md b/python/ql/src/change-notes/released/1.8.4.md new file mode 100644 index 00000000000..9aef6d10d1c --- /dev/null +++ b/python/ql/src/change-notes/released/1.8.4.md @@ -0,0 +1,3 @@ +## 1.8.4 + +No user-facing changes. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index 8071ef421ab..f2a60cd1327 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.8.3 +lastReleaseVersion: 1.8.4 diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index 2fc026ff480..afa318334b6 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.8.4-dev +version: 1.8.4 groups: - python - queries diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index 07859d0f0e6..d26bfa6f205 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.2.2 + +No user-facing changes. + ## 5.2.1 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/5.2.2.md b/ruby/ql/lib/change-notes/released/5.2.2.md new file mode 100644 index 00000000000..22402d6e8fa --- /dev/null +++ b/ruby/ql/lib/change-notes/released/5.2.2.md @@ -0,0 +1,3 @@ +## 5.2.2 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 1684d0e72a2..e3b1b0c079d 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.2.1 +lastReleaseVersion: 5.2.2 diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index df8efbe68de..b36aada4770 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 5.2.2-dev +version: 5.2.2 groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index c874059c151..384ca633202 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.4 + +No user-facing changes. + ## 1.6.3 No user-facing changes. diff --git a/ruby/ql/src/change-notes/released/1.6.4.md b/ruby/ql/src/change-notes/released/1.6.4.md new file mode 100644 index 00000000000..5c811dc4638 --- /dev/null +++ b/ruby/ql/src/change-notes/released/1.6.4.md @@ -0,0 +1,3 @@ +## 1.6.4 + +No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 00b51441d88..1910e09d6a6 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.3 +lastReleaseVersion: 1.6.4 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index b68d13e5908..e0c8c6b4c0c 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.6.4-dev +version: 1.6.4 groups: - ruby - queries diff --git a/rust/ql/lib/CHANGELOG.md b/rust/ql/lib/CHANGELOG.md index d85d27d88d6..3651026d737 100644 --- a/rust/ql/lib/CHANGELOG.md +++ b/rust/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.2.15 + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. + ## 0.2.14 No user-facing changes. diff --git a/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md b/rust/ql/lib/change-notes/released/0.2.15.md similarity index 89% rename from rust/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to rust/ql/lib/change-notes/released/0.2.15.md index 5aa6febd49b..3644126ec1f 100644 --- a/rust/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/rust/ql/lib/change-notes/released/0.2.15.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 0.2.15 + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `rust/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/rust/ql/lib/codeql-pack.release.yml b/rust/ql/lib/codeql-pack.release.yml index c53820a76d5..0f574e080e4 100644 --- a/rust/ql/lib/codeql-pack.release.yml +++ b/rust/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.2.14 +lastReleaseVersion: 0.2.15 diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index 062c2f4e635..49c4dddd4c6 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.2.15-dev +version: 0.2.15 groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/src/CHANGELOG.md b/rust/ql/src/CHANGELOG.md index ad1e8ef3bfe..4f4807ff82e 100644 --- a/rust/ql/src/CHANGELOG.md +++ b/rust/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.36 + +No user-facing changes. + ## 0.1.35 No user-facing changes. diff --git a/rust/ql/src/change-notes/released/0.1.36.md b/rust/ql/src/change-notes/released/0.1.36.md new file mode 100644 index 00000000000..8685189c564 --- /dev/null +++ b/rust/ql/src/change-notes/released/0.1.36.md @@ -0,0 +1,3 @@ +## 0.1.36 + +No user-facing changes. diff --git a/rust/ql/src/codeql-pack.release.yml b/rust/ql/src/codeql-pack.release.yml index 6a5806eec2b..270bd27a7aa 100644 --- a/rust/ql/src/codeql-pack.release.yml +++ b/rust/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.35 +lastReleaseVersion: 0.1.36 diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 67966540de6..853aefb020d 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.36-dev +version: 0.1.36 groups: - rust - queries diff --git a/shared/concepts/CHANGELOG.md b/shared/concepts/CHANGELOG.md index e2de2975455..787779674f0 100644 --- a/shared/concepts/CHANGELOG.md +++ b/shared/concepts/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.25 + +No user-facing changes. + ## 0.0.24 No user-facing changes. diff --git a/shared/concepts/change-notes/released/0.0.25.md b/shared/concepts/change-notes/released/0.0.25.md new file mode 100644 index 00000000000..e41a9acfa06 --- /dev/null +++ b/shared/concepts/change-notes/released/0.0.25.md @@ -0,0 +1,3 @@ +## 0.0.25 + +No user-facing changes. diff --git a/shared/concepts/codeql-pack.release.yml b/shared/concepts/codeql-pack.release.yml index b956773a07f..6d0e80a50c3 100644 --- a/shared/concepts/codeql-pack.release.yml +++ b/shared/concepts/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.24 +lastReleaseVersion: 0.0.25 diff --git a/shared/concepts/qlpack.yml b/shared/concepts/qlpack.yml index c51537b2228..98ae75ca6ca 100644 --- a/shared/concepts/qlpack.yml +++ b/shared/concepts/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/concepts -version: 0.0.25-dev +version: 0.0.25 groups: shared library: true dependencies: diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index dc02f115c99..8ac7faf2554 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.35 + +No user-facing changes. + ## 2.0.34 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.35.md b/shared/controlflow/change-notes/released/2.0.35.md new file mode 100644 index 00000000000..526e1fc9f4c --- /dev/null +++ b/shared/controlflow/change-notes/released/2.0.35.md @@ -0,0 +1,3 @@ +## 2.0.35 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 339a3ce7c57..27eb8ef8ece 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.34 +lastReleaseVersion: 2.0.35 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index e33617ca4f0..a28d74ae749 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.35-dev +version: 2.0.35 groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index 7ecbeda3b21..b2cf75110ac 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.7 + +No user-facing changes. + ## 2.1.6 No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.1.7.md b/shared/dataflow/change-notes/released/2.1.7.md new file mode 100644 index 00000000000..af7772169fe --- /dev/null +++ b/shared/dataflow/change-notes/released/2.1.7.md @@ -0,0 +1,3 @@ +## 2.1.7 + +No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index 1c810b60c4a..cfa57a47251 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.1.6 +lastReleaseVersion: 2.1.7 diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 2058b35be64..6564305a246 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.1.7-dev +version: 2.1.7 groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index 964c1bb1d98..6619a18079c 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.51.md b/shared/mad/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/mad/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index fb135546a90..c8d8eb47b4a 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/quantum/CHANGELOG.md b/shared/quantum/CHANGELOG.md index 7153b9314b1..c8b656e4f35 100644 --- a/shared/quantum/CHANGELOG.md +++ b/shared/quantum/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.29 + +No user-facing changes. + ## 0.0.28 No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.29.md b/shared/quantum/change-notes/released/0.0.29.md new file mode 100644 index 00000000000..4428927c79d --- /dev/null +++ b/shared/quantum/change-notes/released/0.0.29.md @@ -0,0 +1,3 @@ +## 0.0.29 + +No user-facing changes. diff --git a/shared/quantum/codeql-pack.release.yml b/shared/quantum/codeql-pack.release.yml index 3462db7d348..c81f1813120 100644 --- a/shared/quantum/codeql-pack.release.yml +++ b/shared/quantum/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.28 +lastReleaseVersion: 0.0.29 diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index 951cce392ae..a8d3a71823b 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.29-dev +version: 0.0.29 groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index e2a893046c9..a400a91f8c9 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.51.md b/shared/rangeanalysis/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 41f319731b0..5ea1c83b182 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index bb83dfc0a1f..c4b7fc6e87f 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.51.md b/shared/regex/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/regex/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 198bf43da04..3c01106e9b8 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index f9145f2c88b..9cfe68398b2 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.27 + +No user-facing changes. + ## 2.0.26 No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.27.md b/shared/ssa/change-notes/released/2.0.27.md new file mode 100644 index 00000000000..639cf77090e --- /dev/null +++ b/shared/ssa/change-notes/released/2.0.27.md @@ -0,0 +1,3 @@ +## 2.0.27 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index 63d57bef481..a047558f018 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.26 +lastReleaseVersion: 2.0.27 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index 5f8de945745..c10e0892660 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.27-dev +version: 2.0.27 groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index 512a5732ccd..14258018aea 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.51.md b/shared/threat-models/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index c3ac3656b3a..855242656c8 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.51-dev +version: 1.0.51 library: true groups: shared dataExtensions: diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index c98a035d149..9e78286a1a4 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.51.md b/shared/tutorial/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index e68fe7948ff..39bfd9cc21d 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index de43834a84e..e9334c9da8d 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.51.md b/shared/typeflow/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index 482138349ac..f06ea443f79 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/typeinference/CHANGELOG.md b/shared/typeinference/CHANGELOG.md index 3bbb96e59a9..24dc81f3aa2 100644 --- a/shared/typeinference/CHANGELOG.md +++ b/shared/typeinference/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.32 + +No user-facing changes. + ## 0.0.31 No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.32.md b/shared/typeinference/change-notes/released/0.0.32.md new file mode 100644 index 00000000000..c390443f09a --- /dev/null +++ b/shared/typeinference/change-notes/released/0.0.32.md @@ -0,0 +1,3 @@ +## 0.0.32 + +No user-facing changes. diff --git a/shared/typeinference/codeql-pack.release.yml b/shared/typeinference/codeql-pack.release.yml index 54b504d06ec..714fcfc1828 100644 --- a/shared/typeinference/codeql-pack.release.yml +++ b/shared/typeinference/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.31 +lastReleaseVersion: 0.0.32 diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index d7dbeae2e09..ece5dd3b6e8 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.32-dev +version: 0.0.32 groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 313862d5bc7..e9b5492b0d8 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.35 + +No user-facing changes. + ## 2.0.34 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.35.md b/shared/typetracking/change-notes/released/2.0.35.md new file mode 100644 index 00000000000..526e1fc9f4c --- /dev/null +++ b/shared/typetracking/change-notes/released/2.0.35.md @@ -0,0 +1,3 @@ +## 2.0.35 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 339a3ce7c57..27eb8ef8ece 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.34 +lastReleaseVersion: 2.0.35 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index 891f8d0b1b1..bd874407aff 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.35-dev +version: 2.0.35 groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index 5838cd3c535..dbafbea9b98 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.51.md b/shared/typos/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/typos/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index b4705122b0a..9a2ed996444 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index 24a4f7d09a2..df741ed9d73 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.38 + +No user-facing changes. + ## 2.0.37 No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.38.md b/shared/util/change-notes/released/2.0.38.md new file mode 100644 index 00000000000..0fab2ede165 --- /dev/null +++ b/shared/util/change-notes/released/2.0.38.md @@ -0,0 +1,3 @@ +## 2.0.38 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 108259a7400..4ec9eb0980c 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.37 +lastReleaseVersion: 2.0.38 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 6190a3b4275..dc654fca261 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.38-dev +version: 2.0.38 groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 96dfbcadf56..685a8032d64 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.51.md b/shared/xml/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/xml/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index c8e51461dae..40cf2695728 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index e006acbeb21..4f57ee07cfa 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.51 + +No user-facing changes. + ## 1.0.50 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.51.md b/shared/yaml/change-notes/released/1.0.51.md new file mode 100644 index 00000000000..b96d48b8822 --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.51.md @@ -0,0 +1,3 @@ +## 1.0.51 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 856137cc5db..232dbe38ec8 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.50 +lastReleaseVersion: 1.0.51 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index c499501ab26..0b4fd245f3b 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.51-dev +version: 1.0.51 groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index 01461fd5bfe..1eb5afb48e7 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 6.7.0 + +### Major Analysis Improvements + +* Upgraded to allow analysis of Swift 6.3.2. + +### Minor Analysis Improvements + +* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. + ## 6.6.0 ### New Features diff --git a/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md b/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md deleted file mode 100644 index 530b7187e7a..00000000000 --- a/swift/ql/lib/change-notes/2026-05-19-swift-6.3.2.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: majorAnalysis ---- -* Upgraded to allow analysis of Swift 6.3.2. diff --git a/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md b/swift/ql/lib/change-notes/released/6.7.0.md similarity index 76% rename from swift/ql/lib/change-notes/2026-05-14-sensitive-data.md rename to swift/ql/lib/change-notes/released/6.7.0.md index 70e96a3469c..8d7bf41cc1d 100644 --- a/swift/ql/lib/change-notes/2026-05-14-sensitive-data.md +++ b/swift/ql/lib/change-notes/released/6.7.0.md @@ -1,4 +1,9 @@ ---- -category: minorAnalysis ---- +## 6.7.0 + +### Major Analysis Improvements + +* Upgraded to allow analysis of Swift 6.3.2. + +### Minor Analysis Improvements + * The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `swift/cleartext-logging`) may find more correct results and fewer false positive results after these changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 4d7f31f2d8e..55a13d309e5 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.6.0 +lastReleaseVersion: 6.7.0 diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index 5e2f7c2942d..f62f77afa0e 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 6.6.1-dev +version: 6.7.0 groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index 4bd8088718a..4e3b53c37b3 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.4 + +No user-facing changes. + ## 1.3.3 No user-facing changes. diff --git a/swift/ql/src/change-notes/released/1.3.4.md b/swift/ql/src/change-notes/released/1.3.4.md new file mode 100644 index 00000000000..5073aca7222 --- /dev/null +++ b/swift/ql/src/change-notes/released/1.3.4.md @@ -0,0 +1,3 @@ +## 1.3.4 + +No user-facing changes. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index eb1f7dabc84..8263ddf2c8b 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.3.3 +lastReleaseVersion: 1.3.4 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index da4df6ae6d9..05710b29874 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.3.4-dev +version: 1.3.4 groups: - swift - queries From cfb18c247708d2fa77d74130c465f31d32a29487 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 May 2026 12:04:35 +0000 Subject: [PATCH 83/85] Post-release preparation for codeql-cli-2.25.6 --- actions/ql/lib/qlpack.yml | 2 +- actions/ql/src/qlpack.yml | 2 +- cpp/ql/lib/qlpack.yml | 2 +- cpp/ql/src/qlpack.yml | 2 +- csharp/ql/campaigns/Solorigate/lib/qlpack.yml | 2 +- csharp/ql/campaigns/Solorigate/src/qlpack.yml | 2 +- csharp/ql/lib/qlpack.yml | 2 +- csharp/ql/src/qlpack.yml | 2 +- go/ql/consistency-queries/qlpack.yml | 2 +- go/ql/lib/qlpack.yml | 2 +- go/ql/src/qlpack.yml | 2 +- java/ql/lib/qlpack.yml | 2 +- java/ql/src/qlpack.yml | 2 +- javascript/ql/lib/qlpack.yml | 2 +- javascript/ql/src/qlpack.yml | 2 +- misc/suite-helpers/qlpack.yml | 2 +- python/ql/lib/qlpack.yml | 2 +- python/ql/src/qlpack.yml | 2 +- ruby/ql/lib/qlpack.yml | 2 +- ruby/ql/src/qlpack.yml | 2 +- rust/ql/lib/qlpack.yml | 2 +- rust/ql/src/qlpack.yml | 2 +- shared/concepts/qlpack.yml | 2 +- shared/controlflow/qlpack.yml | 2 +- shared/dataflow/qlpack.yml | 2 +- shared/mad/qlpack.yml | 2 +- shared/quantum/qlpack.yml | 2 +- shared/rangeanalysis/qlpack.yml | 2 +- shared/regex/qlpack.yml | 2 +- shared/ssa/qlpack.yml | 2 +- shared/threat-models/qlpack.yml | 2 +- shared/tutorial/qlpack.yml | 2 +- shared/typeflow/qlpack.yml | 2 +- shared/typeinference/qlpack.yml | 2 +- shared/typetracking/qlpack.yml | 2 +- shared/typos/qlpack.yml | 2 +- shared/util/qlpack.yml | 2 +- shared/xml/qlpack.yml | 2 +- shared/yaml/qlpack.yml | 2 +- swift/ql/lib/qlpack.yml | 2 +- swift/ql/src/qlpack.yml | 2 +- 41 files changed, 41 insertions(+), 41 deletions(-) diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index 71c9cadbf28..5d47e3f3d67 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.37 +version: 0.4.38-dev library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 3615c08b583..19187efb071 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.29 +version: 0.6.30-dev library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index 04ee2d76ae9..6f63423d953 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 10.2.0 +version: 10.2.1-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 4915f969278..7f3df37c30a 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.6.4 +version: 1.6.5-dev groups: - cpp - queries diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 1de44f9e1d8..52172a7a189 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.68 +version: 1.7.69-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index e99c5a26b32..cf63a439518 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.68 +version: 1.7.69-dev groups: - csharp - solorigate diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 0745dfdd527..ca43ae8b07b 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 6.0.2 +version: 6.0.3-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index d9269a9fd1b..378d02fee3f 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.7.4 +version: 1.7.5-dev groups: - csharp - queries diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index c07260f76da..6938858c6ba 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.51 +version: 1.0.52-dev groups: - go - queries diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index 8a9a9624de5..6084bfbfee3 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 7.1.2 +version: 7.1.3-dev groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 601e81ea035..3357004e466 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.6.4 +version: 1.6.5-dev groups: - go - queries diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index 561ef7db55c..18948bf45f5 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 9.1.2 +version: 9.1.3-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index cfd8dbc56c8..ac519484225 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.11.4 +version: 1.11.5-dev groups: - java - queries diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index 6caebf91399..870ad58a1b8 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.7.2 +version: 2.7.3-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 03a7153c05a..09303bab573 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 2.3.11 +version: 2.3.12-dev groups: - javascript - queries diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index a6aeeb719fa..7ac4b0e1dc3 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.51 +version: 1.0.52-dev groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index a53a716fbf0..210e683a54f 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 7.1.2 +version: 7.1.3-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index afa318334b6..0eba954079e 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.8.4 +version: 1.8.5-dev groups: - python - queries diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index b36aada4770..3029a6d098f 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 5.2.2 +version: 5.2.3-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index e0c8c6b4c0c..72b0258fa30 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.6.4 +version: 1.6.5-dev groups: - ruby - queries diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index 49c4dddd4c6..e97302ac1f9 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.2.15 +version: 0.2.16-dev groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 853aefb020d..9ba6302ecc0 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.36 +version: 0.1.37-dev groups: - rust - queries diff --git a/shared/concepts/qlpack.yml b/shared/concepts/qlpack.yml index 98ae75ca6ca..dd1f0280e79 100644 --- a/shared/concepts/qlpack.yml +++ b/shared/concepts/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/concepts -version: 0.0.25 +version: 0.0.26-dev groups: shared library: true dependencies: diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index a28d74ae749..b3518003b24 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.35 +version: 2.0.36-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 6564305a246..cdce161af7e 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.1.7 +version: 2.1.8-dev groups: shared library: true dependencies: diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index c8d8eb47b4a..21a06e7cc4d 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true dependencies: diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index a8d3a71823b..c430e4a69be 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.29 +version: 0.0.30-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 5ea1c83b182..7cecb52325f 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true dependencies: diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 3c01106e9b8..a1ec511b126 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true dependencies: diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index c10e0892660..9c14b9e6469 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.27 +version: 2.0.28-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index 855242656c8..c7326273c65 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.51 +version: 1.0.52-dev library: true groups: shared dataExtensions: diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index 39bfd9cc21d..bb6eeeb2460 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index f06ea443f79..9790bbcaeae 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true dependencies: diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index ece5dd3b6e8..ab43c330dcc 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.32 +version: 0.0.33-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index bd874407aff..de6ff4c16c9 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.35 +version: 2.0.36-dev groups: shared library: true dependencies: diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index 9a2ed996444..0b6aee6fd1c 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index dc654fca261..2914785b146 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.38 +version: 2.0.39-dev groups: shared library: true dependencies: null diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index 40cf2695728..0476610fda8 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true dependencies: diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index 0b4fd245f3b..ae27690a3f9 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.51 +version: 1.0.52-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index f62f77afa0e..960d679e6d9 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 6.7.0 +version: 6.7.1-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index 05710b29874..578456c089a 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.3.4 +version: 1.3.5-dev groups: - swift - queries From e18448dd5929046139b91e159365e8ed294aef30 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Fri, 29 May 2026 18:22:13 +0200 Subject: [PATCH 84/85] C++: Add more tests. --- .../dataflow/external-models/flow.expected | 66 ++++++++++++++----- .../dataflow/external-models/flow.ext.yml | 4 +- .../dataflow/external-models/sinks.expected | 2 + .../dataflow/external-models/sources.expected | 2 + .../dataflow/external-models/test.cpp | 27 ++++++++ 5 files changed, 84 insertions(+), 17 deletions(-) diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index 4142b09473a..2b790a2838b 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -51,13 +51,15 @@ models | 50 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated | | 51 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual | | 52 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual | -| 53 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual | -| 54 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual | -| 55 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | -| 56 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | -| 57 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | +| 53 | Summary: ; TemplateClass1; false; templateFunction; (T,U); ; Argument[0]; ReturnValue; value; manual | +| 54 | Summary: ; TemplateClass2; false; function; (U,T); ; Argument[1]; ReturnValue; value; manual | +| 55 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 56 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 57 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | +| 58 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | +| 59 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | edges -| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:57 | +| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:59 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:32 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:32 Sink:MaD:2 | | asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction | @@ -66,24 +68,24 @@ edges | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 | | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | | -| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:57 | -| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:56 | -| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:53 | -| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:54 | -| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:55 | +| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:59 | +| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:58 | +| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:55 | +| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:56 | +| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:57 | | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:253:48:253:60 | *call to GetBodyStream | provenance | Src:MaD:29 | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:257:5:257:8 | *resp | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:262:5:262:8 | *resp | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:266:38:266:41 | *resp | provenance | | | azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | provenance | | -| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:53 | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:55 | | azure.cpp:257:16:257:21 | Read output argument | azure.cpp:258:10:258:16 | * ... | provenance | | | azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | provenance | | -| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:54 | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:56 | | azure.cpp:262:23:262:28 | ReadToCount output argument | azure.cpp:263:10:263:16 | * ... | provenance | | | azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | -| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:55 | +| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:57 | | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | | | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:267:10:267:12 | vec [element] | provenance | | | azure.cpp:267:10:267:12 | vec [element] | azure.cpp:267:10:267:12 | vec | provenance | | @@ -100,11 +102,11 @@ edges | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | provenance | Src:MaD:26 | | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:282:21:282:23 | *call to get | provenance | | | azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | -| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:55 | +| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:57 | | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:10:282:38 | call to ReadToEnd | provenance | | | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | | | azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | provenance | | -| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:56 | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:58 | | azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:24:289:56 | call to GetHeader | provenance | | | azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:32:289:40 | call to GetHeader | provenance | Src:MaD:30 | | azure.cpp:289:63:289:65 | call to Value | azure.cpp:289:63:289:65 | call to Value | provenance | | @@ -180,6 +182,20 @@ edges | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:119:10:119:11 | y2 | provenance | Sink:MaD:1 | | test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | provenance | | | test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:48 | +| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | provenance | MaD:53 | +| test.cpp:130:10:130:18 | call to ymlSource | test.cpp:130:10:130:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:130:10:130:18 | call to ymlSource | test.cpp:131:45:131:45 | x | provenance | | +| test.cpp:131:13:131:43 | call to templateFunction | test.cpp:131:13:131:43 | call to templateFunction | provenance | | +| test.cpp:131:13:131:43 | call to templateFunction | test.cpp:132:10:132:10 | y | provenance | Sink:MaD:1 | +| test.cpp:131:45:131:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | provenance | | +| test.cpp:131:45:131:45 | x | test.cpp:131:13:131:43 | call to templateFunction | provenance | MaD:53 | +| test.cpp:137:4:137:11 | [summary param] 1 in function | test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | provenance | MaD:54 | +| test.cpp:143:10:143:18 | call to ymlSource | test.cpp:143:10:143:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:143:10:143:18 | call to ymlSource | test.cpp:145:26:145:26 | x | provenance | | +| test.cpp:145:10:145:27 | call to function | test.cpp:145:10:145:27 | call to function | provenance | | +| test.cpp:145:10:145:27 | call to function | test.cpp:146:10:146:10 | z | provenance | Sink:MaD:1 | +| test.cpp:145:26:145:26 | x | test.cpp:137:4:137:11 | [summary param] 1 in function | provenance | | +| test.cpp:145:26:145:26 | x | test.cpp:145:10:145:27 | call to function | provenance | MaD:54 | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:33 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | | @@ -483,6 +499,22 @@ nodes | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | semmle.label | call to callWithNonTypeTemplate | | test.cpp:118:44:118:44 | *x | semmle.label | *x | | test.cpp:119:10:119:11 | y2 | semmle.label | y2 | +| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | semmle.label | [summary param] 0 in templateFunction | +| test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | semmle.label | [summary] to write: ReturnValue in templateFunction | +| test.cpp:130:10:130:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:130:10:130:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:131:13:131:43 | call to templateFunction | semmle.label | call to templateFunction | +| test.cpp:131:13:131:43 | call to templateFunction | semmle.label | call to templateFunction | +| test.cpp:131:45:131:45 | x | semmle.label | x | +| test.cpp:132:10:132:10 | y | semmle.label | y | +| test.cpp:137:4:137:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function | +| test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function | +| test.cpp:143:10:143:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:143:10:143:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:145:10:145:27 | call to function | semmle.label | call to function | +| test.cpp:145:10:145:27 | call to function | semmle.label | call to function | +| test.cpp:145:26:145:26 | x | semmle.label | x | +| test.cpp:146:10:146:10 | z | semmle.label | z | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | semmle.label | [summary param] *0 in CommandLineToArgvA | | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | semmle.label | [summary] to write: ReturnValue[**] in CommandLineToArgvA | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | semmle.label | *call to GetCommandLineA | @@ -688,6 +720,8 @@ subpaths | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | | test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | | test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | +| test.cpp:131:45:131:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | test.cpp:131:13:131:43 | call to templateFunction | +| test.cpp:145:26:145:26 | x | test.cpp:137:4:137:11 | [summary param] 1 in function | test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | test.cpp:145:10:145:27 | call to function | | windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | | windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | | windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml index 8e200aabfbd..dfa9b981ef1 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml @@ -18,4 +18,6 @@ extensions: - ["", "", False, "ymlStepManual_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["", "", False, "ymlStepGenerated_with_body", "", "", "Argument[0]", "ReturnValue", "taint", "df-generated"] - ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"] - - ["", "", False, "callWithNonTypeTemplate", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"] \ No newline at end of file + - ["", "", False, "callWithNonTypeTemplate", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"] + - ["", "TemplateClass1", False, "templateFunction", "(T,U)", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["", "TemplateClass2", False, "function", "(U,T)", "", "Argument[1]", "ReturnValue", "value", "manual"] \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected index e28349b7159..379ce723806 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected @@ -15,3 +15,5 @@ | test.cpp:89:11:89:11 | y | test-sink | | test.cpp:116:10:116:11 | y1 | test-sink | | test.cpp:119:10:119:11 | y2 | test-sink | +| test.cpp:132:10:132:10 | y | test-sink | +| test.cpp:146:10:146:10 | z | test-sink | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected index b46aa87af6f..f13d75bc66b 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected @@ -9,6 +9,8 @@ | test.cpp:56:8:56:16 | call to ymlSource | local | | test.cpp:94:10:94:18 | call to ymlSource | local | | test.cpp:114:10:114:18 | call to ymlSource | local | +| test.cpp:130:10:130:18 | call to ymlSource | local | +| test.cpp:143:10:143:18 | call to ymlSource | local | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | local | | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | local | | windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | local | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp index af11ff958f5..fb9b6ceb0e7 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp @@ -118,3 +118,30 @@ void test_callWithNonTypeTemplate() { int y2 = callWithNonTypeTemplate(x); ymlSink(y2); // $ ir } + +template +struct TemplateClass1 { + template + U templateFunction(T, U); +}; + +void test_template_function_in_template_class() { + TemplateClass1 b; + int x = ymlSource(); + auto y = b.templateFunction(x, 0UL); + ymlSink(y); // $ ir +} + +template +struct TemplateClass2 { + T function(T, S); +}; + +template using PartialInstantiationOfTemplateClass2 = TemplateClass2; + +void test_partial_instantiation() { + int x = ymlSource(); + PartialInstantiationOfTemplateClass2 y; + int z = y.function(0UL, x); + ymlSink(z); // $ ir +} \ No newline at end of file From 22b08f1ea4e473832580604d243981afa4ca97ea Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Sun, 31 May 2026 12:47:31 +0200 Subject: [PATCH 85/85] C++: Add a test with a kind of "partial function template" instantiation. --- .../dataflow/external-models/flow.expected | 140 ++++++++++++------ .../dataflow/external-models/flow.ext.yml | 3 +- .../dataflow/external-models/sinks.expected | 6 +- .../dataflow/external-models/sources.expected | 6 +- .../dataflow/external-models/test.cpp | 29 +++- 5 files changed, 130 insertions(+), 54 deletions(-) diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index 2b790a2838b..8d247738c98 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -51,15 +51,16 @@ models | 50 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated | | 51 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual | | 52 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual | -| 53 | Summary: ; TemplateClass1; false; templateFunction; (T,U); ; Argument[0]; ReturnValue; value; manual | -| 54 | Summary: ; TemplateClass2; false; function; (U,T); ; Argument[1]; ReturnValue; value; manual | -| 55 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual | -| 56 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual | -| 57 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | -| 58 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | -| 59 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | +| 53 | Summary: ; TemplateClass1; true; templateFunction2; (U,V); ; Argument[1]; ReturnValue; value; manual | +| 54 | Summary: ; TemplateClass1; false; templateFunction; (T,U); ; Argument[0]; ReturnValue; value; manual | +| 55 | Summary: ; TemplateClass2; true; function; (U,T); ; Argument[1]; ReturnValue; value; manual | +| 56 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 57 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 58 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | +| 59 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | +| 60 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | edges -| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:59 | +| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:60 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:32 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:32 Sink:MaD:2 | | asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction | @@ -68,24 +69,24 @@ edges | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 | | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | | -| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:59 | -| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:58 | -| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:55 | -| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:56 | -| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:57 | +| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:60 | +| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:59 | +| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:56 | +| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:57 | +| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:58 | | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:253:48:253:60 | *call to GetBodyStream | provenance | Src:MaD:29 | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:257:5:257:8 | *resp | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:262:5:262:8 | *resp | provenance | | | azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:266:38:266:41 | *resp | provenance | | | azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | provenance | | -| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:55 | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:56 | | azure.cpp:257:16:257:21 | Read output argument | azure.cpp:258:10:258:16 | * ... | provenance | | | azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | provenance | | -| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:56 | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:57 | | azure.cpp:262:23:262:28 | ReadToCount output argument | azure.cpp:263:10:263:16 | * ... | provenance | | | azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | -| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:57 | +| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:58 | | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | | | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:267:10:267:12 | vec [element] | provenance | | | azure.cpp:267:10:267:12 | vec [element] | azure.cpp:267:10:267:12 | vec | provenance | | @@ -102,11 +103,11 @@ edges | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | provenance | Src:MaD:26 | | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:282:21:282:23 | *call to get | provenance | | | azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | -| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:57 | +| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:58 | | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:10:282:38 | call to ReadToEnd | provenance | | | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | | | azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | provenance | | -| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:58 | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:59 | | azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:24:289:56 | call to GetHeader | provenance | | | azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:32:289:40 | call to GetHeader | provenance | Src:MaD:30 | | azure.cpp:289:63:289:65 | call to Value | azure.cpp:289:63:289:65 | call to Value | provenance | | @@ -182,20 +183,39 @@ edges | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:119:10:119:11 | y2 | provenance | Sink:MaD:1 | | test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | provenance | | | test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:48 | -| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | provenance | MaD:53 | -| test.cpp:130:10:130:18 | call to ymlSource | test.cpp:130:10:130:18 | call to ymlSource | provenance | Src:MaD:25 | -| test.cpp:130:10:130:18 | call to ymlSource | test.cpp:131:45:131:45 | x | provenance | | -| test.cpp:131:13:131:43 | call to templateFunction | test.cpp:131:13:131:43 | call to templateFunction | provenance | | -| test.cpp:131:13:131:43 | call to templateFunction | test.cpp:132:10:132:10 | y | provenance | Sink:MaD:1 | -| test.cpp:131:45:131:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | provenance | | -| test.cpp:131:45:131:45 | x | test.cpp:131:13:131:43 | call to templateFunction | provenance | MaD:53 | -| test.cpp:137:4:137:11 | [summary param] 1 in function | test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | provenance | MaD:54 | -| test.cpp:143:10:143:18 | call to ymlSource | test.cpp:143:10:143:18 | call to ymlSource | provenance | Src:MaD:25 | -| test.cpp:143:10:143:18 | call to ymlSource | test.cpp:145:26:145:26 | x | provenance | | -| test.cpp:145:10:145:27 | call to function | test.cpp:145:10:145:27 | call to function | provenance | | -| test.cpp:145:10:145:27 | call to function | test.cpp:146:10:146:10 | z | provenance | Sink:MaD:1 | -| test.cpp:145:26:145:26 | x | test.cpp:137:4:137:11 | [summary param] 1 in function | provenance | | -| test.cpp:145:26:145:26 | x | test.cpp:145:10:145:27 | call to function | provenance | MaD:54 | +| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | provenance | MaD:54 | +| test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | provenance | MaD:53 | +| test.cpp:133:10:133:18 | call to ymlSource | test.cpp:133:10:133:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:133:10:133:18 | call to ymlSource | test.cpp:134:45:134:45 | x | provenance | | +| test.cpp:134:13:134:43 | call to templateFunction | test.cpp:134:13:134:43 | call to templateFunction | provenance | | +| test.cpp:134:13:134:43 | call to templateFunction | test.cpp:135:10:135:10 | y | provenance | Sink:MaD:1 | +| test.cpp:134:45:134:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | provenance | | +| test.cpp:134:45:134:45 | x | test.cpp:134:13:134:43 | call to templateFunction | provenance | MaD:54 | +| test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | provenance | MaD:55 | +| test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | provenance | MaD:55 | +| test.cpp:146:10:146:18 | call to ymlSource | test.cpp:146:10:146:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:146:10:146:18 | call to ymlSource | test.cpp:148:26:148:26 | x | provenance | | +| test.cpp:148:10:148:27 | call to function | test.cpp:148:10:148:27 | call to function | provenance | | +| test.cpp:148:10:148:27 | call to function | test.cpp:149:10:149:10 | z | provenance | Sink:MaD:1 | +| test.cpp:148:26:148:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | provenance | | +| test.cpp:148:26:148:26 | x | test.cpp:148:10:148:27 | call to function | provenance | MaD:55 | +| test.cpp:155:10:155:18 | call to ymlSource | test.cpp:155:10:155:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:155:10:155:18 | call to ymlSource | test.cpp:157:26:157:26 | x | provenance | | +| test.cpp:157:13:157:20 | call to function | test.cpp:157:13:157:20 | call to function | provenance | | +| test.cpp:157:13:157:20 | call to function | test.cpp:158:10:158:10 | z | provenance | Sink:MaD:1 | +| test.cpp:157:26:157:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | provenance | | +| test.cpp:157:26:157:26 | x | test.cpp:157:13:157:20 | call to function | provenance | MaD:55 | +| test.cpp:164:34:164:34 | x | test.cpp:165:69:165:69 | x | provenance | | +| test.cpp:165:12:165:64 | call to templateFunction2 | test.cpp:164:7:164:7 | *templateFunction3 | provenance | | +| test.cpp:165:12:165:64 | call to templateFunction2 | test.cpp:165:12:165:64 | call to templateFunction2 | provenance | | +| test.cpp:165:69:165:69 | x | test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | provenance | | +| test.cpp:165:69:165:69 | x | test.cpp:165:12:165:64 | call to templateFunction2 | provenance | MaD:53 | +| test.cpp:170:10:170:18 | call to ymlSource | test.cpp:170:10:170:18 | call to ymlSource | provenance | Src:MaD:25 | +| test.cpp:170:10:170:18 | call to ymlSource | test.cpp:172:51:172:51 | x | provenance | | +| test.cpp:172:13:172:44 | call to templateFunction3 | test.cpp:172:13:172:44 | call to templateFunction3 | provenance | | +| test.cpp:172:13:172:44 | call to templateFunction3 | test.cpp:173:10:173:10 | y | provenance | Sink:MaD:1 | +| test.cpp:172:51:172:51 | x | test.cpp:164:34:164:34 | x | provenance | | +| test.cpp:172:51:172:51 | x | test.cpp:172:13:172:44 | call to templateFunction3 | provenance | MaD:53 | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:33 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | | @@ -501,20 +521,41 @@ nodes | test.cpp:119:10:119:11 | y2 | semmle.label | y2 | | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | semmle.label | [summary param] 0 in templateFunction | | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | semmle.label | [summary] to write: ReturnValue in templateFunction | -| test.cpp:130:10:130:18 | call to ymlSource | semmle.label | call to ymlSource | -| test.cpp:130:10:130:18 | call to ymlSource | semmle.label | call to ymlSource | -| test.cpp:131:13:131:43 | call to templateFunction | semmle.label | call to templateFunction | -| test.cpp:131:13:131:43 | call to templateFunction | semmle.label | call to templateFunction | -| test.cpp:131:45:131:45 | x | semmle.label | x | -| test.cpp:132:10:132:10 | y | semmle.label | y | -| test.cpp:137:4:137:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function | -| test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function | -| test.cpp:143:10:143:18 | call to ymlSource | semmle.label | call to ymlSource | -| test.cpp:143:10:143:18 | call to ymlSource | semmle.label | call to ymlSource | -| test.cpp:145:10:145:27 | call to function | semmle.label | call to function | -| test.cpp:145:10:145:27 | call to function | semmle.label | call to function | -| test.cpp:145:26:145:26 | x | semmle.label | x | -| test.cpp:146:10:146:10 | z | semmle.label | z | +| test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | semmle.label | [summary param] 1 in templateFunction2 | +| test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | semmle.label | [summary] to write: ReturnValue in templateFunction2 | +| test.cpp:133:10:133:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:133:10:133:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:134:13:134:43 | call to templateFunction | semmle.label | call to templateFunction | +| test.cpp:134:13:134:43 | call to templateFunction | semmle.label | call to templateFunction | +| test.cpp:134:45:134:45 | x | semmle.label | x | +| test.cpp:135:10:135:10 | y | semmle.label | y | +| test.cpp:140:4:140:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function | +| test.cpp:140:4:140:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function | +| test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function | +| test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function | +| test.cpp:146:10:146:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:146:10:146:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:148:10:148:27 | call to function | semmle.label | call to function | +| test.cpp:148:10:148:27 | call to function | semmle.label | call to function | +| test.cpp:148:26:148:26 | x | semmle.label | x | +| test.cpp:149:10:149:10 | z | semmle.label | z | +| test.cpp:155:10:155:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:155:10:155:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:157:13:157:20 | call to function | semmle.label | call to function | +| test.cpp:157:13:157:20 | call to function | semmle.label | call to function | +| test.cpp:157:26:157:26 | x | semmle.label | x | +| test.cpp:158:10:158:10 | z | semmle.label | z | +| test.cpp:164:7:164:7 | *templateFunction3 | semmle.label | *templateFunction3 | +| test.cpp:164:34:164:34 | x | semmle.label | x | +| test.cpp:165:12:165:64 | call to templateFunction2 | semmle.label | call to templateFunction2 | +| test.cpp:165:12:165:64 | call to templateFunction2 | semmle.label | call to templateFunction2 | +| test.cpp:165:69:165:69 | x | semmle.label | x | +| test.cpp:170:10:170:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:170:10:170:18 | call to ymlSource | semmle.label | call to ymlSource | +| test.cpp:172:13:172:44 | call to templateFunction3 | semmle.label | call to templateFunction3 | +| test.cpp:172:13:172:44 | call to templateFunction3 | semmle.label | call to templateFunction3 | +| test.cpp:172:51:172:51 | x | semmle.label | x | +| test.cpp:173:10:173:10 | y | semmle.label | y | | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | semmle.label | [summary param] *0 in CommandLineToArgvA | | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | semmle.label | [summary] to write: ReturnValue[**] in CommandLineToArgvA | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | semmle.label | *call to GetCommandLineA | @@ -720,8 +761,11 @@ subpaths | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | | test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | | test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | -| test.cpp:131:45:131:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | test.cpp:131:13:131:43 | call to templateFunction | -| test.cpp:145:26:145:26 | x | test.cpp:137:4:137:11 | [summary param] 1 in function | test.cpp:137:4:137:11 | [summary] to write: ReturnValue in function | test.cpp:145:10:145:27 | call to function | +| test.cpp:134:45:134:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | test.cpp:134:13:134:43 | call to templateFunction | +| test.cpp:148:26:148:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | test.cpp:148:10:148:27 | call to function | +| test.cpp:157:26:157:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | test.cpp:157:13:157:20 | call to function | +| test.cpp:165:69:165:69 | x | test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | test.cpp:165:12:165:64 | call to templateFunction2 | +| test.cpp:172:51:172:51 | x | test.cpp:164:34:164:34 | x | test.cpp:164:7:164:7 | *templateFunction3 | test.cpp:172:13:172:44 | call to templateFunction3 | | windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | | windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | | windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml index dfa9b981ef1..76d649152bd 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ext.yml @@ -20,4 +20,5 @@ extensions: - ["", "", False, "callWithArgument", "", "", "Argument[1]", "Argument[0].Parameter[0]", "value", "manual"] - ["", "", False, "callWithNonTypeTemplate", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"] - ["", "TemplateClass1", False, "templateFunction", "(T,U)", "", "Argument[0]", "ReturnValue", "value", "manual"] - - ["", "TemplateClass2", False, "function", "(U,T)", "", "Argument[1]", "ReturnValue", "value", "manual"] \ No newline at end of file + - ["", "TemplateClass1", True, "templateFunction2", "(U,V)", "", "Argument[1]", "ReturnValue", "value", "manual"] + - ["", "TemplateClass2", True, "function", "(U,T)", "", "Argument[1]", "ReturnValue", "value", "manual"] \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected index 379ce723806..03a0d442c1c 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sinks.expected @@ -15,5 +15,7 @@ | test.cpp:89:11:89:11 | y | test-sink | | test.cpp:116:10:116:11 | y1 | test-sink | | test.cpp:119:10:119:11 | y2 | test-sink | -| test.cpp:132:10:132:10 | y | test-sink | -| test.cpp:146:10:146:10 | z | test-sink | +| test.cpp:135:10:135:10 | y | test-sink | +| test.cpp:149:10:149:10 | z | test-sink | +| test.cpp:158:10:158:10 | z | test-sink | +| test.cpp:173:10:173:10 | y | test-sink | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected index f13d75bc66b..4040cff4fd2 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected @@ -9,8 +9,10 @@ | test.cpp:56:8:56:16 | call to ymlSource | local | | test.cpp:94:10:94:18 | call to ymlSource | local | | test.cpp:114:10:114:18 | call to ymlSource | local | -| test.cpp:130:10:130:18 | call to ymlSource | local | -| test.cpp:143:10:143:18 | call to ymlSource | local | +| test.cpp:133:10:133:18 | call to ymlSource | local | +| test.cpp:146:10:146:18 | call to ymlSource | local | +| test.cpp:155:10:155:18 | call to ymlSource | local | +| test.cpp:170:10:170:18 | call to ymlSource | local | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | local | | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | local | | windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | local | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp index fb9b6ceb0e7..01bf6cc4093 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/test.cpp @@ -123,6 +123,9 @@ template struct TemplateClass1 { template U templateFunction(T, U); + + template + V templateFunction2(U, V); }; void test_template_function_in_template_class() { @@ -139,9 +142,33 @@ struct TemplateClass2 { template using PartialInstantiationOfTemplateClass2 = TemplateClass2; -void test_partial_instantiation() { +void test_partial_class_instantiation() { int x = ymlSource(); PartialInstantiationOfTemplateClass2 y; int z = y.function(0UL, x); ymlSink(z); // $ ir +} + +template struct DeriveFromFromPartialTemplateInstantiation : TemplateClass2 { }; + +void test_inheritance() { + int x = ymlSource(); + DeriveFromFromPartialTemplateInstantiation y; + auto z = y.function(0L, x); + ymlSink(z); // $ ir +} + +template +struct Class1 : TemplateClass1 { + template + int templateFunction3(U u, int x) { + return TemplateClass1::template templateFunction2(u, x); + } +}; + +void test_class1() { + int x = ymlSource(); + Class1 c; + auto y = c.templateFunction3(0UL, x); + ymlSink(y); // $ ir } \ No newline at end of file