Address review comments

This commit is contained in:
Tom Hvitved
2025-11-20 11:03:53 +01:00
parent e4853ab060
commit d4fdf956a0
3 changed files with 15 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ class FlowSummaryNode extends Node, TFlowSummaryNode {
}
}
/** A data flow node that corresponds directly to a CFG node for an AST node. */
/** A data flow node that corresponds directly to an AST node. */
abstract class AstNodeNode extends Node {
AstNode n;

View File

@@ -24,6 +24,19 @@ module Impl {
override string toStringImpl() {
result = "(" + this.getExpr().toAbbreviatedString() + ")"
or
// In macro expansions such as
//
// ```rust
// [
// "a",
// "b",
// #[cfg(target_os = "macos")]
// "c",
// ]
// ```
//
// the last array element will give rise to an empty `ParenExpr` when not
// compiling for macos.
not exists(this.getExpr().toAbbreviatedString()) and
result = "(...)"
}

View File

@@ -40,7 +40,7 @@ module AccessAfterLifetime {
abstract class Barrier extends DataFlow::Node { }
/**
* Holds if the value `source` points to accesses a variable `target` with scope `scope`.
* Holds if the value pointed to by `source` accesses a variable `target` with scope `scope`.
*/
pragma[nomagic]
predicate sourceValueScope(Source source, Variable target, BlockExpr scope) {