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 {
13231323class TranslatedNotExpr extends TranslatedNonConstantExpr {
13241324 override NotExpr expr ;
13251325
1326+ override Type getExprType ( ) { result instanceof BoolType }
1327+
13261328 final override Instruction getFirstInstruction ( EdgeKind kind ) {
13271329 result = this .getOperand ( ) .getFirstInstruction ( kind )
13281330 }
@@ -1807,6 +1809,12 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr {
18071809 result = comparisonOpcode ( expr )
18081810 }
18091811
1812+ override Type getExprType ( ) {
1813+ if exists ( comparisonOpcode ( expr ) )
1814+ then result instanceof BoolType
1815+ else result = super .getExprType ( )
1816+ }
1817+
18101818 override int getInstructionElementSize ( InstructionTag tag ) {
18111819 tag = OnlyInstructionTag ( ) and
18121820 exists ( Opcode opcode |
You can’t perform that action at this time.
0 commit comments