File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
csharp/ql/src/semmle/code/cil Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,11 @@ module Opcodes {
167167 class Neg extends UnaryExpr , @cil_neg {
168168 override string getOpcodeName ( ) { result = "neg" }
169169
170- override NumericType getType ( ) { result = getOperand ( 0 ) .getType ( ) }
170+ override NumericType getType ( ) {
171+ result = getOperand ( ) .getType ( )
172+ or
173+ getOperand ( ) .getType ( ) instanceof Enum and result instanceof IntType
174+ }
171175 }
172176
173177 // Binary operations
@@ -1176,7 +1180,9 @@ module Opcodes {
11761180 class Localloc extends Expr , @cil_localloc {
11771181 override string getOpcodeName ( ) { result = "localloc" }
11781182
1179- override int getPopCount ( ) { result = 1 } // ??
1183+ override int getPopCount ( ) { result = 1 }
1184+
1185+ override PointerType getType ( ) { result .getReferentType ( ) instanceof ByteType }
11801186 }
11811187
11821188 class Readonly extends Instruction , @cil_readonly {
You can’t perform that action at this time.
0 commit comments