Skip to content

Commit d4fdf95

Browse files
committed
Address review comments
1 parent e4853ab commit d4fdf95

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class FlowSummaryNode extends Node, TFlowSummaryNode {
118118
}
119119
}
120120

121-
/** A data flow node that corresponds directly to a CFG node for an AST node. */
121+
/** A data flow node that corresponds directly to an AST node. */
122122
abstract class AstNodeNode extends Node {
123123
AstNode n;
124124

rust/ql/lib/codeql/rust/elements/internal/ParenExprImpl.qll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ module Impl {
2424
override string toStringImpl() {
2525
result = "(" + this.getExpr().toAbbreviatedString() + ")"
2626
or
27+
// In macro expansions such as
28+
//
29+
// ```rust
30+
// [
31+
// "a",
32+
// "b",
33+
// #[cfg(target_os = "macos")]
34+
// "c",
35+
// ]
36+
// ```
37+
//
38+
// the last array element will give rise to an empty `ParenExpr` when not
39+
// compiling for macos.
2740
not exists(this.getExpr().toAbbreviatedString()) and
2841
result = "(...)"
2942
}

rust/ql/lib/codeql/rust/security/AccessAfterLifetimeExtensions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module AccessAfterLifetime {
4040
abstract class Barrier extends DataFlow::Node { }
4141

4242
/**
43-
* Holds if the value `source` points to accesses a variable `target` with scope `scope`.
43+
* Holds if the value pointed to by `source` accesses a variable `target` with scope `scope`.
4444
*/
4545
pragma[nomagic]
4646
predicate sourceValueScope(Source source, Variable target, BlockExpr scope) {

0 commit comments

Comments
 (0)