On saltstack this drops the number of consistency errors

of type uniqueEnclosingCallable from 4026 to 614.
This commit is contained in:
Rasmus Lerchedahl Petersen
2021-01-24 15:30:59 +01:00
parent 527c41520e
commit baf0917524

View File

@@ -179,7 +179,11 @@ ExprNode exprNode(DataFlowExpr e) { result.getNode().getNode() = e }
class ParameterNode extends CfgNode {
ParameterDefinition def;
ParameterNode() { node = def.getDefiningNode() }
ParameterNode() {
node = def.getDefiningNode() and
// Disregard parameters to the function the extractor has synthesised for comprehensions
not def.getScope() = any(Comp comp).getNthInnerLoop(0).getIter().getScope()
}
/**
* Holds if this node is the parameter of callable `c` at the