mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Address review comments
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 = "(...)"
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user