From e8cc0ee453b3a2cb4e09c730fa17d8105dfb30b3 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:08:18 +0000 Subject: [PATCH 1/6] Add the `ql/primary-ql-class-consistency` query --- ql/src/codeql_ql/ast/Ast.qll | 12 +++++---- .../style/GetAPrimaryQlClassConsistency.ql | 27 +++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 ql/src/queries/style/GetAPrimaryQlClassConsistency.ql diff --git a/ql/src/codeql_ql/ast/Ast.qll b/ql/src/codeql_ql/ast/Ast.qll index 94535bfc5a4..b615ec026eb 100644 --- a/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/src/codeql_ql/ast/Ast.qll @@ -630,7 +630,11 @@ class String extends Literal { override string getAPrimaryQlClass() { result = "String" } /** Gets the string value of this literal. */ - string getValue() { result = lit.getChild().(Generated::String).getValue() } + string getValue() { + exists(string raw | raw = lit.getChild().(Generated::String).getValue() | + result = raw.substring(1, raw.length() - 1) + ) + } } /** An integer literal. */ @@ -1198,10 +1202,8 @@ class ModuleExpr extends TModuleExpr, ModuleRef { override AstNode getParent() { result = super.getParent() or - result.(PredicateCall).getQualifier() = this - or - result.(PredicateExpr).getQualifier() = this - or + result.(PredicateCall).getQualifier() = this or + result.(PredicateExpr).getQualifier() = this or result.(Module).getAlias() = this } } diff --git a/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql b/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql new file mode 100644 index 00000000000..5ed0069d0c1 --- /dev/null +++ b/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql @@ -0,0 +1,27 @@ +/** + * @name Inconsistent getAPrimaryQlClass predicate + * @description A getAPrimaryQlClass predicate should result in the name of the class. + * @kind problem + * @problem.severity error + * @id ql/primary-ql-class-consistency + * @tags correctness + * @precision low + */ + +import ql + +from ClassPredicate pred, String constant +where + exists(string className, string constantName | + pred.getParent().getName() = className and + pred.getName() = "getAPrimaryQlClass" and + constant = pred.getBody().(ComparisonFormula).getRightOperand() and + constant.(String).getValue() = constantName and + // might be "Foo::classname", detect by matching with a regexp + not constantName.regexpMatch(".*\\b" + className + "$") and + // ignore constants with "?" in them + not constantName.regexpMatch(".*\\?.*") + ) +select pred, + "The getAPrimaryQlClass predicate $@ instead of the class name \"" + pred.getParent().getName() + + "\".", constant, "results in \"" + constant.getValue() + " \"" From 79c99b0c6105fb947a8cd6e9d44a2021d019f0a8 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:13:35 +0000 Subject: [PATCH 2/6] update expected output after the introduction of a TopLevel ast node --- ql/test/printAst/printAst.expected | 290 +++++++++++++++-------------- 1 file changed, 152 insertions(+), 138 deletions(-) diff --git a/ql/test/printAst/printAst.expected b/ql/test/printAst/printAst.expected index bd0d677c65a..0f58abbac13 100644 --- a/ql/test/printAst/printAst.expected +++ b/ql/test/printAst/printAst.expected @@ -1,282 +1,296 @@ nodes | Foo.qll:1:1:1:17 | Import | semmle.label | [Import] Import | | Foo.qll:1:1:1:17 | Import | semmle.order | 1 | +| Foo.qll:1:1:25:2 | TopLevel | semmle.label | [TopLevel] TopLevel | +| Foo.qll:1:1:25:2 | TopLevel | semmle.order | 1 | | Foo.qll:3:1:7:1 | Class | semmle.label | [Class] Class | -| Foo.qll:3:1:7:1 | Class | semmle.order | 2 | +| Foo.qll:3:1:7:1 | Class | semmle.order | 3 | | Foo.qll:3:19:3:22 | Type | semmle.label | [Type] Type | -| Foo.qll:3:19:3:22 | Type | semmle.order | 3 | +| Foo.qll:3:19:3:22 | Type | semmle.order | 4 | | Foo.qll:4:3:4:17 | CharPred | semmle.label | [CharPred] CharPred | -| Foo.qll:4:3:4:17 | CharPred | semmle.order | 4 | +| Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 | | Foo.qll:4:11:4:11 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:4:11:4:11 | Integer | semmle.order | 5 | +| Foo.qll:4:11:4:11 | Integer | semmle.order | 6 | | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:4:11:4:15 | ComparisonFormula | semmle.order | 5 | +| Foo.qll:4:11:4:15 | ComparisonFormula | semmle.order | 6 | | Foo.qll:4:13:4:13 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 7 | +| Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 | | Foo.qll:4:15:4:15 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:4:15:4:15 | Integer | semmle.order | 8 | +| Foo.qll:4:15:4:15 | Integer | semmle.order | 9 | | Foo.qll:6:3:6:8 | Type | semmle.label | [Type] Type | -| Foo.qll:6:3:6:8 | Type | semmle.order | 9 | +| Foo.qll:6:3:6:8 | Type | semmle.order | 10 | | Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | [ClassPredicate] ClassPredicate | -| Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 9 | +| Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 10 | | Foo.qll:6:23:6:28 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:6:23:6:28 | Identifier | semmle.order | 11 | +| Foo.qll:6:23:6:28 | Identifier | semmle.order | 12 | | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 11 | +| Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 12 | | Foo.qll:6:30:6:30 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:6:30:6:30 | ComparisonOp | semmle.order | 13 | +| Foo.qll:6:30:6:30 | ComparisonOp | semmle.order | 14 | | Foo.qll:6:32:6:36 | String | semmle.label | [String] String | -| Foo.qll:6:32:6:36 | String | semmle.order | 14 | +| Foo.qll:6:32:6:36 | String | semmle.order | 15 | | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate | -| Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 15 | +| Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 | | Foo.qll:9:21:9:23 | Type | semmle.label | [Type] Type | -| Foo.qll:9:21:9:23 | Type | semmle.order | 16 | +| Foo.qll:9:21:9:23 | Type | semmle.order | 17 | | Foo.qll:9:21:9:25 | VarDecl | semmle.label | [VarDecl] VarDecl | -| Foo.qll:9:21:9:25 | VarDecl | semmle.order | 16 | +| Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 | | Foo.qll:10:3:10:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:3:10:3 | Identifier | semmle.order | 18 | +| Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 | | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 18 | +| Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 | | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:10:5:10:5 | ComparisonOp | semmle.order | 20 | +| Foo.qll:10:5:10:5 | ComparisonOp | semmle.order | 21 | | Foo.qll:10:7:10:85 | Rank | semmle.label | [Rank] Rank | -| Foo.qll:10:7:10:85 | Rank | semmle.order | 21 | +| Foo.qll:10:7:10:85 | Rank | semmle.order | 22 | | Foo.qll:10:12:10:12 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:10:12:10:12 | Integer | semmle.order | 22 | +| Foo.qll:10:12:10:12 | Integer | semmle.order | 23 | | Foo.qll:10:15:10:17 | Type | semmle.label | [Type] Type | -| Foo.qll:10:15:10:17 | Type | semmle.order | 23 | +| Foo.qll:10:15:10:17 | Type | semmle.order | 24 | | Foo.qll:10:15:10:23 | VarDecl | semmle.label | [VarDecl] VarDecl | -| Foo.qll:10:15:10:23 | VarDecl | semmle.order | 23 | +| Foo.qll:10:15:10:23 | VarDecl | semmle.order | 24 | | Foo.qll:10:27:10:31 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:27:10:31 | Identifier | semmle.order | 25 | +| Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 | | Foo.qll:10:27:10:42 | MemberCall | semmle.label | [MemberCall] MemberCall | -| Foo.qll:10:27:10:42 | MemberCall | semmle.order | 25 | +| Foo.qll:10:27:10:42 | MemberCall | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:10:27:10:50 | ComparisonFormula | semmle.order | 25 | +| Foo.qll:10:27:10:50 | ComparisonFormula | semmle.order | 26 | | Foo.qll:10:44:10:44 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:10:44:10:44 | ComparisonOp | semmle.order | 28 | +| Foo.qll:10:44:10:44 | ComparisonOp | semmle.order | 29 | | Foo.qll:10:46:10:50 | String | semmle.label | [String] String | -| Foo.qll:10:46:10:50 | String | semmle.order | 29 | +| Foo.qll:10:46:10:50 | String | semmle.order | 30 | | Foo.qll:10:54:10:58 | AsExpr | semmle.label | [AsExpr] AsExpr | -| Foo.qll:10:54:10:58 | AsExpr | semmle.order | 30 | +| Foo.qll:10:54:10:58 | AsExpr | semmle.order | 31 | | Foo.qll:10:54:10:58 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:54:10:58 | Identifier | semmle.order | 30 | +| Foo.qll:10:54:10:58 | Identifier | semmle.order | 31 | | Foo.qll:10:69:10:73 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:10:69:10:73 | Identifier | semmle.order | 32 | +| Foo.qll:10:69:10:73 | Identifier | semmle.order | 33 | | Foo.qll:10:69:10:84 | MemberCall | semmle.label | [MemberCall] MemberCall | -| Foo.qll:10:69:10:84 | MemberCall | semmle.order | 32 | +| Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate | -| Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 34 | +| Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 | | Foo.qll:13:17:13:19 | Type | semmle.label | [Type] Type | -| Foo.qll:13:17:13:19 | Type | semmle.order | 35 | +| Foo.qll:13:17:13:19 | Type | semmle.order | 36 | | Foo.qll:13:17:13:21 | VarDecl | semmle.label | [VarDecl] VarDecl | -| Foo.qll:13:17:13:21 | VarDecl | semmle.order | 35 | +| Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | [PredicateCall] PredicateCall | -| Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 37 | +| Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 38 | | Foo.qll:14:3:16:29 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:16:29 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:16:29 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:18:28 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:18:28 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:18:28 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:20:13 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:20:13 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:20:13 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:22:16 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:22:16 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:24:15 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:24:15 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 | | Foo.qll:14:9:14:9 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:14:9:14:9 | Identifier | semmle.order | 43 | +| Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | | Foo.qll:16:3:16:7 | String | semmle.label | [String] String | -| Foo.qll:16:3:16:7 | String | semmle.order | 44 | +| Foo.qll:16:3:16:7 | String | semmle.order | 45 | | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 44 | +| Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 45 | | Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 46 | +| Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 | | Foo.qll:16:11:16:11 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:16:11:16:11 | Identifier | semmle.order | 47 | +| Foo.qll:16:11:16:11 | Identifier | semmle.order | 48 | | Foo.qll:16:11:16:29 | MemberCall | semmle.label | [MemberCall] MemberCall | -| Foo.qll:16:11:16:29 | MemberCall | semmle.order | 47 | +| Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 | | Foo.qll:16:22:16:22 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:16:22:16:22 | Integer | semmle.order | 49 | +| Foo.qll:16:22:16:22 | Integer | semmle.order | 50 | | Foo.qll:16:25:16:25 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:16:25:16:25 | Integer | semmle.order | 50 | +| Foo.qll:16:25:16:25 | Integer | semmle.order | 51 | | Foo.qll:16:28:16:28 | Integer | semmle.label | [Integer] Integer | -| Foo.qll:16:28:16:28 | Integer | semmle.order | 51 | +| Foo.qll:16:28:16:28 | Integer | semmle.order | 52 | | Foo.qll:18:3:18:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:18:3:18:3 | Identifier | semmle.order | 52 | +| Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 | | Foo.qll:18:3:18:9 | InlineCast | semmle.label | [InlineCast] InlineCast | -| Foo.qll:18:3:18:9 | InlineCast | semmle.order | 52 | +| Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 | | Foo.qll:18:3:18:20 | MemberCall | semmle.label | [MemberCall] MemberCall | -| Foo.qll:18:3:18:20 | MemberCall | semmle.order | 52 | +| Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 | | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 52 | +| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 | | Foo.qll:18:6:18:8 | Type | semmle.label | [Type] Type | -| Foo.qll:18:6:18:8 | Type | semmle.order | 56 | +| Foo.qll:18:6:18:8 | Type | semmle.order | 57 | | Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 57 | +| Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 | | Foo.qll:18:24:18:28 | String | semmle.label | [String] String | -| Foo.qll:18:24:18:28 | String | semmle.order | 58 | +| Foo.qll:18:24:18:28 | String | semmle.order | 59 | | Foo.qll:20:3:20:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:20:3:20:3 | Identifier | semmle.order | 59 | +| Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 | | Foo.qll:20:3:20:9 | InlineCast | semmle.label | [InlineCast] InlineCast | -| Foo.qll:20:3:20:9 | InlineCast | semmle.order | 59 | +| Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 59 | +| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 | | Foo.qll:20:6:20:8 | Type | semmle.label | [Type] Type | -| Foo.qll:20:6:20:8 | Type | semmle.order | 62 | +| Foo.qll:20:6:20:8 | Type | semmle.order | 63 | | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 63 | +| Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 | | Foo.qll:20:13:20:13 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:20:13:20:13 | Identifier | semmle.order | 64 | +| Foo.qll:20:13:20:13 | Identifier | semmle.order | 65 | | Foo.qll:22:3:22:3 | Identifier | semmle.label | [Identifier] Identifier | -| Foo.qll:22:3:22:3 | Identifier | semmle.order | 65 | +| Foo.qll:22:3:22:3 | Identifier | semmle.order | 66 | | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | -| Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 65 | +| Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 | | Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | -| Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 67 | +| Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 | | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | [Aggregate[any]] Aggregate[any] | -| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 68 | +| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 | | Foo.qll:22:11:22:13 | Type | semmle.label | [Type] Type | -| Foo.qll:22:11:22:13 | Type | semmle.order | 69 | +| Foo.qll:22:11:22:13 | Type | semmle.order | 70 | | Foo.qll:22:11:22:15 | VarDecl | semmle.label | [VarDecl] VarDecl | -| Foo.qll:22:11:22:15 | VarDecl | semmle.order | 69 | +| Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | | Foo.qll:24:7:24:11 | AnyCall | semmle.label | [AnyCall] AnyCall | -| Foo.qll:24:7:24:11 | AnyCall | semmle.order | 71 | +| Foo.qll:24:7:24:11 | AnyCall | semmle.order | 72 | | printAst.ql:1:1:1:28 | Import | semmle.label | [Import] Import | -| printAst.ql:1:1:1:28 | Import | semmle.order | 72 | +| printAst.ql:1:1:1:28 | Import | semmle.order | 73 | +| printAst.ql:1:1:1:29 | TopLevel | semmle.label | [TopLevel] TopLevel | +| printAst.ql:1:1:1:29 | TopLevel | semmle.order | 73 | edges +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.label | 1 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.order | 1 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:3:1:7:1 | Class | semmle.label | 2 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:3:1:7:1 | Class | semmle.order | 3 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.label | 3 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | 4 | +| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 | | Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.label | 1 | -| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.order | 3 | +| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.order | 4 | | Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.label | 2 | -| Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.order | 4 | +| Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 | | Foo.qll:3:1:7:1 | Class | Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | 3 | -| Foo.qll:3:1:7:1 | Class | Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 9 | +| Foo.qll:3:1:7:1 | Class | Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 10 | | Foo.qll:4:3:4:17 | CharPred | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.label | 1 | -| Foo.qll:4:3:4:17 | CharPred | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.order | 5 | +| Foo.qll:4:3:4:17 | CharPred | Foo.qll:4:11:4:15 | ComparisonFormula | semmle.order | 6 | | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:11:4:11 | Integer | semmle.label | 1 | -| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:11:4:11 | Integer | semmle.order | 5 | +| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:11:4:11 | Integer | semmle.order | 6 | | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:13:4:13 | ComparisonOp | semmle.label | 2 | -| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 7 | +| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 | | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.label | 3 | -| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.order | 8 | +| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.order | 9 | | Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.label | 1 | -| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.order | 9 | +| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.order | 10 | | Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 11 | +| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 12 | | Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | Identifier | semmle.label | 1 | -| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | Identifier | semmle.order | 11 | +| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | Identifier | semmle.order | 12 | | Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:30:6:30 | ComparisonOp | semmle.label | 2 | -| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:30:6:30 | ComparisonOp | semmle.order | 13 | +| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:30:6:30 | ComparisonOp | semmle.order | 14 | | Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:32:6:36 | String | semmle.label | 3 | -| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:32:6:36 | String | semmle.order | 14 | +| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:32:6:36 | String | semmle.order | 15 | | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:9:21:9:25 | VarDecl | semmle.label | 1 | -| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 16 | +| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 | | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 18 | +| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 | | Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.label | 1 | -| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.order | 16 | +| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.order | 17 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.label | 1 | -| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.order | 18 | +| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | 2 | -| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.order | 20 | +| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.order | 21 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:7:10:85 | Rank | semmle.label | 3 | -| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:7:10:85 | Rank | semmle.order | 21 | +| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:7:10:85 | Rank | semmle.order | 22 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:12:10:12 | Integer | semmle.label | 1 | -| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:12:10:12 | Integer | semmle.order | 22 | +| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:12:10:12 | Integer | semmle.order | 23 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:15:10:23 | VarDecl | semmle.label | 2 | -| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:15:10:23 | VarDecl | semmle.order | 23 | +| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:15:10:23 | VarDecl | semmle.order | 24 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:27:10:50 | ComparisonFormula | semmle.label | 3 | -| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:27:10:50 | ComparisonFormula | semmle.order | 25 | +| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:27:10:50 | ComparisonFormula | semmle.order | 26 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:54:10:58 | AsExpr | semmle.label | 4 | -| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:54:10:58 | AsExpr | semmle.order | 30 | +| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:54:10:58 | AsExpr | semmle.order | 31 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.label | 5 | -| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 32 | +| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | | Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.label | 1 | -| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.order | 23 | +| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.order | 24 | | Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.label | 1 | -| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.order | 25 | +| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.label | 1 | -| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.order | 25 | +| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:44:10:44 | ComparisonOp | semmle.label | 2 | -| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:44:10:44 | ComparisonOp | semmle.order | 28 | +| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:44:10:44 | ComparisonOp | semmle.order | 29 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.label | 3 | -| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.order | 29 | +| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.order | 30 | | Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | Identifier | semmle.label | 1 | -| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | Identifier | semmle.order | 30 | +| Foo.qll:10:54:10:58 | AsExpr | Foo.qll:10:54:10:58 | Identifier | semmle.order | 31 | | Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.label | 1 | -| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.order | 32 | +| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.label | 1 | -| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 35 | +| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.label | 2 | -| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.order | 37 | +| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 | | Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.label | 1 | -| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.order | 35 | +| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.order | 36 | | Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.label | 1 | -| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.order | 43 | +| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | 1 | -| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 37 | +| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 38 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 44 | +| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 45 | | Foo.qll:14:3:18:28 | Disjunction | Foo.qll:14:3:16:29 | Disjunction | semmle.label | 1 | -| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:14:3:16:29 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:14:3:16:29 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 52 | +| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 | | Foo.qll:14:3:20:13 | Disjunction | Foo.qll:14:3:18:28 | Disjunction | semmle.label | 1 | -| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:14:3:18:28 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:14:3:18:28 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 59 | +| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 | | Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.label | 1 | -| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | 2 | -| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 65 | +| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 | | Foo.qll:14:3:24:15 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.label | 1 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 37 | +| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:24:15 | Disjunction | Foo.qll:24:7:24:11 | AnyCall | semmle.label | 2 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:24:7:24:11 | AnyCall | semmle.order | 71 | +| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:24:7:24:11 | AnyCall | semmle.order | 72 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.label | 1 | -| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.order | 44 | +| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.order | 45 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | 2 | -| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 46 | +| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.label | 3 | -| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 47 | +| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | Identifier | semmle.label | 1 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | Identifier | semmle.order | 47 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | Identifier | semmle.order | 48 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.label | 2 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.order | 49 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.order | 50 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.label | 3 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.order | 50 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.order | 51 | | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.label | 4 | -| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 51 | +| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.label | 1 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.order | 52 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.label | 2 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.order | 56 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.order | 57 | | Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.label | 1 | -| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 52 | +| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.label | 1 | -| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.order | 52 | +| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | 2 | -| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 57 | +| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.label | 3 | -| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 58 | +| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 59 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.label | 1 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.order | 59 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.label | 2 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.order | 62 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.order | 63 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.label | 1 | -| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 59 | +| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | 2 | -| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 63 | +| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | Identifier | semmle.label | 3 | -| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | Identifier | semmle.order | 64 | +| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | Identifier | semmle.order | 65 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | Identifier | semmle.label | 1 | -| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | Identifier | semmle.order | 65 | +| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | Identifier | semmle.order | 66 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | 2 | -| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 67 | +| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 | | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | 3 | -| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 68 | +| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 | | Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.label | 1 | -| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 69 | +| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | | Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.label | 1 | -| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.order | 69 | +| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.order | 70 | +| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.label | 1 | +| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 73 | graphProperties | semmle.graphKind | tree | From 497f0cd48b3f04248ae2a03209279658335cd277 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:16:57 +0000 Subject: [PATCH 3/6] autoformat --- ql/src/codeql_ql/ast/internal/AstNodes.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql/src/codeql_ql/ast/internal/AstNodes.qll b/ql/src/codeql_ql/ast/internal/AstNodes.qll index 00f9582a62b..f7acd4428c9 100644 --- a/ql/src/codeql_ql/ast/internal/AstNodes.qll +++ b/ql/src/codeql_ql/ast/internal/AstNodes.qll @@ -64,8 +64,8 @@ class TFormula = class TBinOpExpr = TAddSubExpr or TMulDivModExpr; class TExpr = - TBinOpExpr or TLiteral or TAggregate or TExprAggregate or TIdentifier or TInlineCast or TCall or TUnaryExpr or - TExprAnnotation or TDontCare or TRange or TSet; + TBinOpExpr or TLiteral or TAggregate or TExprAggregate or TIdentifier or TInlineCast or TCall or + TUnaryExpr or TExprAnnotation or TDontCare or TRange or TSet; class TCall = TPredicateCall or TMemberCall or TNoneCall or TAnyCall; From 16cf439f6b829aa29f75d2aaeb0428d957a8fffa Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:21:09 +0000 Subject: [PATCH 4/6] run the query on our on code, and fix an error --- ql/src/codeql_ql/ast/Ast.qll | 2 +- ql/test/printAst/printAst.expected | 64 +++++++++++++++--------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ql/src/codeql_ql/ast/Ast.qll b/ql/src/codeql_ql/ast/Ast.qll index b615ec026eb..f635d94c065 100644 --- a/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/src/codeql_ql/ast/Ast.qll @@ -203,7 +203,7 @@ class TypeExpr extends TType, AstNode { TypeExpr() { this = TType(type) } - override string getAPrimaryQlClass() { result = "Type" } + override string getAPrimaryQlClass() { result = "TypeExpr" } /** * Gets the class name for the type. diff --git a/ql/test/printAst/printAst.expected b/ql/test/printAst/printAst.expected index 0f58abbac13..3e0e78d3b74 100644 --- a/ql/test/printAst/printAst.expected +++ b/ql/test/printAst/printAst.expected @@ -5,8 +5,8 @@ nodes | Foo.qll:1:1:25:2 | TopLevel | semmle.order | 1 | | Foo.qll:3:1:7:1 | Class | semmle.label | [Class] Class | | Foo.qll:3:1:7:1 | Class | semmle.order | 3 | -| Foo.qll:3:19:3:22 | Type | semmle.label | [Type] Type | -| Foo.qll:3:19:3:22 | Type | semmle.order | 4 | +| Foo.qll:3:19:3:22 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 | | Foo.qll:4:3:4:17 | CharPred | semmle.label | [CharPred] CharPred | | Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 | | Foo.qll:4:11:4:11 | Integer | semmle.label | [Integer] Integer | @@ -17,8 +17,8 @@ nodes | Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 | | Foo.qll:4:15:4:15 | Integer | semmle.label | [Integer] Integer | | Foo.qll:4:15:4:15 | Integer | semmle.order | 9 | -| Foo.qll:6:3:6:8 | Type | semmle.label | [Type] Type | -| Foo.qll:6:3:6:8 | Type | semmle.order | 10 | +| Foo.qll:6:3:6:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 10 | | Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | [ClassPredicate] ClassPredicate | | Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 10 | | Foo.qll:6:23:6:28 | Identifier | semmle.label | [Identifier] Identifier | @@ -31,8 +31,8 @@ nodes | Foo.qll:6:32:6:36 | String | semmle.order | 15 | | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate | | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 | -| Foo.qll:9:21:9:23 | Type | semmle.label | [Type] Type | -| Foo.qll:9:21:9:23 | Type | semmle.order | 17 | +| Foo.qll:9:21:9:23 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 | | Foo.qll:9:21:9:25 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 | | Foo.qll:10:3:10:3 | Identifier | semmle.label | [Identifier] Identifier | @@ -45,8 +45,8 @@ nodes | Foo.qll:10:7:10:85 | Rank | semmle.order | 22 | | Foo.qll:10:12:10:12 | Integer | semmle.label | [Integer] Integer | | Foo.qll:10:12:10:12 | Integer | semmle.order | 23 | -| Foo.qll:10:15:10:17 | Type | semmle.label | [Type] Type | -| Foo.qll:10:15:10:17 | Type | semmle.order | 24 | +| Foo.qll:10:15:10:17 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 | | Foo.qll:10:15:10:23 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:10:15:10:23 | VarDecl | semmle.order | 24 | | Foo.qll:10:27:10:31 | Identifier | semmle.label | [Identifier] Identifier | @@ -69,8 +69,8 @@ nodes | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate | | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 | -| Foo.qll:13:17:13:19 | Type | semmle.label | [Type] Type | -| Foo.qll:13:17:13:19 | Type | semmle.order | 36 | +| Foo.qll:13:17:13:19 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 | | Foo.qll:13:17:13:21 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | [PredicateCall] PredicateCall | @@ -111,8 +111,8 @@ nodes | Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 | | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 | -| Foo.qll:18:6:18:8 | Type | semmle.label | [Type] Type | -| Foo.qll:18:6:18:8 | Type | semmle.order | 57 | +| Foo.qll:18:6:18:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 | | Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 | | Foo.qll:18:24:18:28 | String | semmle.label | [String] String | @@ -123,8 +123,8 @@ nodes | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 | -| Foo.qll:20:6:20:8 | Type | semmle.label | [Type] Type | -| Foo.qll:20:6:20:8 | Type | semmle.order | 63 | +| Foo.qll:20:6:20:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 | | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 | | Foo.qll:20:13:20:13 | Identifier | semmle.label | [Identifier] Identifier | @@ -137,8 +137,8 @@ nodes | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 | | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | [Aggregate[any]] Aggregate[any] | | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 | -| Foo.qll:22:11:22:13 | Type | semmle.label | [Type] Type | -| Foo.qll:22:11:22:13 | Type | semmle.order | 70 | +| Foo.qll:22:11:22:13 | TypeExpr | semmle.label | [TypeExpr] TypeExpr | +| Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 | | Foo.qll:22:11:22:15 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | | Foo.qll:24:7:24:11 | AnyCall | semmle.label | [AnyCall] AnyCall | @@ -156,8 +156,8 @@ edges | Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 | | Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | 4 | | Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 | -| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.label | 1 | -| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.order | 4 | +| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | TypeExpr | semmle.label | 1 | +| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 | | Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.label | 2 | | Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 | | Foo.qll:3:1:7:1 | Class | Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | 3 | @@ -170,8 +170,8 @@ edges | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 | | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.label | 3 | | Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.order | 9 | -| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.label | 1 | -| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.order | 10 | +| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | TypeExpr | semmle.label | 1 | +| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 10 | | Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | 2 | | Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 12 | | Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | Identifier | semmle.label | 1 | @@ -184,8 +184,8 @@ edges | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 | | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | 2 | | Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 | -| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.label | 1 | -| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.order | 17 | +| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.label | 1 | +| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.label | 1 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 | | Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | 2 | @@ -202,8 +202,8 @@ edges | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:54:10:58 | AsExpr | semmle.order | 31 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.label | 5 | | Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 | -| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.label | 1 | -| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.order | 24 | +| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.label | 1 | +| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 | | Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.label | 1 | | Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 | | Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.label | 1 | @@ -220,8 +220,8 @@ edges | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.label | 2 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 | -| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.label | 1 | -| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.order | 36 | +| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | 1 | +| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 | | Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.label | 1 | | Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | | Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | 1 | @@ -260,8 +260,8 @@ edges | Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.label | 1 | | Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.label | 2 | -| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.order | 57 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.label | 2 | +| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 | | Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.label | 1 | | Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 | | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.label | 1 | @@ -272,8 +272,8 @@ edges | Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 59 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.label | 1 | | Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.label | 2 | -| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.order | 63 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.label | 2 | +| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.label | 1 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 | | Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | 2 | @@ -288,8 +288,8 @@ edges | Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 | | Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.label | 1 | | Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | -| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.label | 1 | -| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.order | 70 | +| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.label | 1 | +| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 | | printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.label | 1 | | printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 73 | graphProperties From d59f0df23fc9404ba5ac769256127fd058e9b20e Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:21:14 +0000 Subject: [PATCH 5/6] space --- ql/src/queries/style/GetAPrimaryQlClassConsistency.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql b/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql index 5ed0069d0c1..abd528eeb58 100644 --- a/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql +++ b/ql/src/queries/style/GetAPrimaryQlClassConsistency.ql @@ -24,4 +24,4 @@ where ) select pred, "The getAPrimaryQlClass predicate $@ instead of the class name \"" + pred.getParent().getName() + - "\".", constant, "results in \"" + constant.getValue() + " \"" + "\".", constant, "results in \"" + constant.getValue() + "\"" From 391c8150f5dd70149fe7f9775cb0dcdda3a0c693 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Thu, 27 May 2021 22:26:14 +0000 Subject: [PATCH 6/6] make the test pass an auto-format check --- ql/test/printAst/Foo.qll | 2 +- ql/test/printAst/printAst.expected | 62 +++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/ql/test/printAst/Foo.qll b/ql/test/printAst/Foo.qll index ffb28163ebc..de9ecbe1133 100644 --- a/ql/test/printAst/Foo.qll +++ b/ql/test/printAst/Foo.qll @@ -21,5 +21,5 @@ predicate calls(Foo f) { or f = any(Foo f) or - ((((any())))) + 2 = 1 + (2 + (3 + 4)) } diff --git a/ql/test/printAst/printAst.expected b/ql/test/printAst/printAst.expected index 3e0e78d3b74..03a0abda214 100644 --- a/ql/test/printAst/printAst.expected +++ b/ql/test/printAst/printAst.expected @@ -83,8 +83,8 @@ nodes | Foo.qll:14:3:20:13 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:22:16 | Disjunction | semmle.label | [Disjunction] Disjunction | | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | -| Foo.qll:14:3:24:15 | Disjunction | semmle.label | [Disjunction] Disjunction | -| Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 | +| Foo.qll:14:3:24:23 | Disjunction | semmle.label | [Disjunction] Disjunction | +| Foo.qll:14:3:24:23 | Disjunction | semmle.order | 38 | | Foo.qll:14:9:14:9 | Identifier | semmle.label | [Identifier] Identifier | | Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 | | Foo.qll:16:3:16:7 | String | semmle.label | [String] String | @@ -141,12 +141,30 @@ nodes | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 | | Foo.qll:22:11:22:15 | VarDecl | semmle.label | [VarDecl] VarDecl | | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | -| Foo.qll:24:7:24:11 | AnyCall | semmle.label | [AnyCall] AnyCall | -| Foo.qll:24:7:24:11 | AnyCall | semmle.order | 72 | +| Foo.qll:24:3:24:3 | Integer | semmle.label | [Integer] Integer | +| Foo.qll:24:3:24:3 | Integer | semmle.order | 72 | +| Foo.qll:24:3:24:23 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula | +| Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 72 | +| Foo.qll:24:5:24:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp | +| Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 74 | +| Foo.qll:24:7:24:7 | Integer | semmle.label | [Integer] Integer | +| Foo.qll:24:7:24:7 | Integer | semmle.order | 75 | +| Foo.qll:24:7:24:23 | AddExpr | semmle.label | [AddExpr] AddExpr | +| Foo.qll:24:7:24:23 | AddExpr | semmle.order | 75 | +| Foo.qll:24:12:24:12 | Integer | semmle.label | [Integer] Integer | +| Foo.qll:24:12:24:12 | Integer | semmle.order | 77 | +| Foo.qll:24:12:24:22 | AddExpr | semmle.label | [AddExpr] AddExpr | +| Foo.qll:24:12:24:22 | AddExpr | semmle.order | 77 | +| Foo.qll:24:17:24:17 | Integer | semmle.label | [Integer] Integer | +| Foo.qll:24:17:24:17 | Integer | semmle.order | 79 | +| Foo.qll:24:17:24:21 | AddExpr | semmle.label | [AddExpr] AddExpr | +| Foo.qll:24:17:24:21 | AddExpr | semmle.order | 79 | +| Foo.qll:24:21:24:21 | Integer | semmle.label | [Integer] Integer | +| Foo.qll:24:21:24:21 | Integer | semmle.order | 81 | | printAst.ql:1:1:1:28 | Import | semmle.label | [Import] Import | -| printAst.ql:1:1:1:28 | Import | semmle.order | 73 | +| printAst.ql:1:1:1:28 | Import | semmle.order | 82 | | printAst.ql:1:1:1:29 | TopLevel | semmle.label | [TopLevel] TopLevel | -| printAst.ql:1:1:1:29 | TopLevel | semmle.order | 73 | +| printAst.ql:1:1:1:29 | TopLevel | semmle.order | 82 | edges | Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.label | 1 | | Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.order | 1 | @@ -218,8 +236,8 @@ edges | Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | Identifier | semmle.order | 33 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.label | 1 | | Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 | -| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.label | 2 | -| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 | +| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:23 | Disjunction | semmle.label | 2 | +| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:23 | Disjunction | semmle.order | 38 | | Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | 1 | | Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 | | Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.label | 1 | @@ -240,10 +258,10 @@ edges | Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.order | 38 | | Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | 2 | | Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.label | 1 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:24:7:24:11 | AnyCall | semmle.label | 2 | -| Foo.qll:14:3:24:15 | Disjunction | Foo.qll:24:7:24:11 | AnyCall | semmle.order | 72 | +| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.label | 1 | +| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 38 | +| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:24:3:24:23 | ComparisonFormula | semmle.label | 2 | +| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 72 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.label | 1 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.order | 45 | | Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | 2 | @@ -290,7 +308,25 @@ edges | Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 | | Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.label | 1 | | Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:3:24:3 | Integer | semmle.label | 1 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:3:24:3 | Integer | semmle.order | 72 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:5:24:5 | ComparisonOp | semmle.label | 2 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 74 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:7:24:23 | AddExpr | semmle.label | 3 | +| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:7:24:23 | AddExpr | semmle.order | 75 | +| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:7:24:7 | Integer | semmle.label | 1 | +| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:7:24:7 | Integer | semmle.order | 75 | +| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:12:24:22 | AddExpr | semmle.label | 2 | +| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:12:24:22 | AddExpr | semmle.order | 77 | +| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:12:24:12 | Integer | semmle.label | 1 | +| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:12:24:12 | Integer | semmle.order | 77 | +| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:17:24:21 | AddExpr | semmle.label | 2 | +| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:17:24:21 | AddExpr | semmle.order | 79 | +| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:17:24:17 | Integer | semmle.label | 1 | +| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:17:24:17 | Integer | semmle.order | 79 | +| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:21:24:21 | Integer | semmle.label | 2 | +| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:21:24:21 | Integer | semmle.order | 81 | | printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.label | 1 | -| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 73 | +| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 82 | graphProperties | semmle.graphKind | tree |