File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1323,6 +1323,8 @@ class TranslatedUnaryExpr extends TranslatedSingleInstructionExpr {
1323
1323
class TranslatedNotExpr extends TranslatedNonConstantExpr {
1324
1324
override NotExpr expr ;
1325
1325
1326
+ override Type getExprType ( ) { result instanceof BoolType }
1327
+
1326
1328
final override Instruction getFirstInstruction ( EdgeKind kind ) {
1327
1329
result = this .getOperand ( ) .getFirstInstruction ( kind )
1328
1330
}
@@ -1807,6 +1809,12 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr {
1807
1809
result = comparisonOpcode ( expr )
1808
1810
}
1809
1811
1812
+ override Type getExprType ( ) {
1813
+ if exists ( comparisonOpcode ( expr ) )
1814
+ then result instanceof BoolType
1815
+ else result = super .getExprType ( )
1816
+ }
1817
+
1810
1818
override int getInstructionElementSize ( InstructionTag tag ) {
1811
1819
tag = OnlyInstructionTag ( ) and
1812
1820
exists ( Opcode opcode |
You can’t perform that action at this time.
0 commit comments