File tree 1 file changed +3
-2
lines changed
cpp/common/src/codingstandards/cpp/resources 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import cpp
2
2
import semmle.code.cpp.dataflow.DataFlow
3
- import semmle.code.cpp.valuenumbering.GlobalValueNumbering
3
+ import semmle.code.cpp.valuenumbering.HashCons
4
4
import semmle.code.cpp.controlflow.Dominance
5
5
import codeql.util.Boolean
6
6
@@ -40,13 +40,14 @@ signature module ResourceLeakConfigSig {
40
40
41
41
predicate isFree ( ControlFlowNode node , DataFlow:: Node resource ) ;
42
42
43
+ bindingset [ node]
43
44
default DataFlow:: Node getAnAlias ( DataFlow:: Node node ) {
44
45
DataFlow:: localFlow ( node , result )
45
46
or
46
47
exists ( Expr current , Expr after |
47
48
current in [ node .asExpr ( ) , node .asDefiningArgument ( ) ] and
48
49
after in [ result .asExpr ( ) , result .asDefiningArgument ( ) ] and
49
- globalValueNumber ( current ) = globalValueNumber ( after ) and
50
+ hashCons ( current ) = hashCons ( after ) and
50
51
strictlyDominates ( current , after )
51
52
)
52
53
}
You can’t perform that action at this time.
0 commit comments