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 {
7777 }
7878}
7979
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-
9880abstract class TranslatedNativeCondition extends TranslatedCondition , TTranslatedNativeCondition {
9981 TranslatedNativeCondition ( ) { this = TTranslatedNativeCondition ( expr ) }
10082
Original file line number Diff line number Diff line change @@ -190,10 +190,7 @@ private predicate isNativeCondition(Expr expr) {
190190 * depending on context.
191191 */
192192private predicate isFlexibleCondition ( Expr expr ) {
193- (
194- expr instanceof ParenthesisExpr or
195- expr instanceof NotExpr
196- ) and
193+ expr instanceof ParenthesisExpr and
197194 usedAsCondition ( expr ) and
198195 not isIRConstant ( expr )
199196}
@@ -218,11 +215,6 @@ private predicate usedAsCondition(Expr expr) {
218215 condExpr .getCondition ( ) .getFullyConverted ( ) = expr and not condExpr .isTwoOperand ( )
219216 )
220217 or
221- exists ( NotExpr notExpr |
222- notExpr .getOperand ( ) .getFullyConverted ( ) = expr and
223- usedAsCondition ( notExpr )
224- )
225- or
226218 exists ( ParenthesisExpr paren |
227219 paren .getExpr ( ) = expr and
228220 usedAsCondition ( paren )
You can’t perform that action at this time.
0 commit comments