File tree Expand file tree Collapse file tree 2 files changed +1
-27
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -77,24 +77,6 @@ class TranslatedParenthesisCondition extends TranslatedFlexibleCondition {
77
77
}
78
78
}
79
79
80
- class TranslatedNotCondition extends TranslatedFlexibleCondition {
81
- override NotExpr expr ;
82
-
83
- override Instruction getChildTrueSuccessor ( TranslatedCondition child ) {
84
- child = this .getOperand ( ) and
85
- result = this .getConditionContext ( ) .getChildFalseSuccessor ( this )
86
- }
87
-
88
- override Instruction getChildFalseSuccessor ( TranslatedCondition child ) {
89
- child = this .getOperand ( ) and
90
- result = this .getConditionContext ( ) .getChildTrueSuccessor ( this )
91
- }
92
-
93
- override TranslatedCondition getOperand ( ) {
94
- result = getTranslatedCondition ( expr .getOperand ( ) .getFullyConverted ( ) )
95
- }
96
- }
97
-
98
80
abstract class TranslatedNativeCondition extends TranslatedCondition , TTranslatedNativeCondition {
99
81
TranslatedNativeCondition ( ) { this = TTranslatedNativeCondition ( expr ) }
100
82
Original file line number Diff line number Diff line change @@ -190,10 +190,7 @@ private predicate isNativeCondition(Expr expr) {
190
190
* depending on context.
191
191
*/
192
192
private predicate isFlexibleCondition ( Expr expr ) {
193
- (
194
- expr instanceof ParenthesisExpr or
195
- expr instanceof NotExpr
196
- ) and
193
+ expr instanceof ParenthesisExpr and
197
194
usedAsCondition ( expr ) and
198
195
not isIRConstant ( expr )
199
196
}
@@ -218,11 +215,6 @@ private predicate usedAsCondition(Expr expr) {
218
215
condExpr .getCondition ( ) .getFullyConverted ( ) = expr and not condExpr .isTwoOperand ( )
219
216
)
220
217
or
221
- exists ( NotExpr notExpr |
222
- notExpr .getOperand ( ) .getFullyConverted ( ) = expr and
223
- usedAsCondition ( notExpr )
224
- )
225
- or
226
218
exists ( ParenthesisExpr paren |
227
219
paren .getExpr ( ) = expr and
228
220
usedAsCondition ( paren )
You can’t perform that action at this time.
0 commit comments