Skip to content

Commit be7aca9

Browse files
committed
Address review comments
1 parent e6887f9 commit be7aca9

File tree

6 files changed

+78
-8
lines changed

6 files changed

+78
-8
lines changed

misc/codegen/codegen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def _parse_args() -> argparse.Namespace:
5454
"generated qll file importing every class file"),
5555
p.add_argument("--ql-test-output",
5656
help="output directory for QL generated extractor test files"),
57+
p.add_argument("--ql-cfg-output",
58+
help="output directory for QL CFG layer (optional)."),
5759
p.add_argument("--cpp-output",
5860
help="output directory for generated C++ files, required if trap or cpp is provided to "
5961
"--generate"),
@@ -64,8 +66,6 @@ def _parse_args() -> argparse.Namespace:
6466
help="registry file containing information about checked-in generated code. A .gitattributes"
6567
"file is generated besides it to mark those files with linguist-generated=true. Must"
6668
"be in a directory containing all generated code."),
67-
p.add_argument("--ql-cfg-output",
68-
help="output directory for QL CFG layer (optional)."),
6969
]
7070
p.add_argument("--script-name",
7171
help="script name to put in header comments of generated files. By default, the path of this "

rust/ql/.generated.list

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/controlflow/internal/CfgConsistency.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ query predicate missingCfgChild(CfgNode parent, string pred, int i, AstNode chil
6565
CfgNodes::missingCfgChild(parent, pred, i, child) and
6666
successfullyExtractedFile(child.getLocation().getFile()) and
6767
not exists(AstNode last, CfgImpl::Completion c | CfgImpl::last(child, last, c) |
68-
// In for example `if (a && true) ...` there is no RHS CFG node going into the
69-
// `[false] a && true` operation
68+
// In for example `if (a && true) ...`, there is no edge from the CFG node
69+
// for `true` into the `[false] a && true` node.
7070
strictcount(ConditionalSuccessor cs | exists(last.getACfgNode().getASuccessor(cs)) | cs) = 1
7171
or
72-
// In for example `x && return`, there is no RHS CFG node going into the `&&` operation
72+
// In for example `x && return`, there is no edge from the node for
73+
// `return` into the `&&` node.
7374
not c instanceof CfgImpl::NormalCompletion
7475
)
7576
}

rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ module Node {
158158

159159
ParameterNode() { this = TParameterNode(n) }
160160

161-
/** Gets the parameter in the AST that this node corresponds to. */
161+
/** Gets the parameter in the CFG that this node corresponds to. */
162162
ParamCfgNode getParameter() { result = n }
163163
}
164164

rust/schema/annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ class _:
14671467
"""
14681468

14691469

1470-
@annotate(SelfParam)
1470+
@annotate(SelfParam, cfg = True)
14711471
class _:
14721472
"""
14731473
A SelfParam. For example:

0 commit comments

Comments
 (0)