File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed
csharp/ql/lib/semmle/code/csharp/commons Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -105,31 +105,12 @@ private module ConstantComparisonOperation {
105
105
}
106
106
}
107
107
108
- private class StructuralComparisonConfig extends StructuralComparison:: StructuralComparisonConfiguration {
109
- StructuralComparisonConfig ( ) { this = "CompareIdenticalValues" }
110
-
111
- override predicate candidate ( ControlFlowElement x , ControlFlowElement y ) {
112
- exists ( ComparisonTest ct |
113
- x = ct .getFirstArgument ( ) and
114
- y = ct .getSecondArgument ( )
115
- )
116
- }
117
-
118
- ComparisonTest getComparisonTest ( ) {
119
- exists ( Element x , Element y |
120
- result .getFirstArgument ( ) = x and
121
- result .getSecondArgument ( ) = y and
122
- same ( x , y )
123
- )
124
- }
125
- }
126
-
127
108
/**
128
109
* Holds if comparison test `ct` compares two structurally identical
129
110
* expressions.
130
111
*/
131
112
predicate comparesIdenticalValues ( ComparisonTest ct ) {
132
- ct = any ( StructuralComparisonConfig c ) . getComparisonTest ( )
113
+ StructuralComparison :: sameGvn ( ct . getFirstArgument ( ) , ct . getSecondArgument ( ) )
133
114
}
134
115
135
116
/**
You can’t perform that action at this time.
0 commit comments