File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,19 @@ abstract class TranslatedExpr extends TranslatedElement {
59
59
60
60
final CppType getResultType ( ) {
61
61
if this .isResultGLValue ( )
62
- then result = getTypeForGLValue ( expr . getType ( ) )
63
- else result = getTypeForPRValue ( expr . getType ( ) )
62
+ then result = getTypeForGLValue ( this . getExprType ( ) )
63
+ else result = getTypeForPRValue ( this . getExprType ( ) )
64
64
}
65
65
66
+ /**
67
+ * Gets the type of `expr`.
68
+ *
69
+ * This predicate can be overwritten in subclasses to modify the result
70
+ * of `getResultType` which determines the type of the instruction that
71
+ * generates the result of `expr`.
72
+ */
73
+ Type getExprType ( ) { result = expr .getType ( ) }
74
+
66
75
/**
67
76
* Holds if the result of this `TranslatedExpr` is a glvalue.
68
77
*/
You can’t perform that action at this time.
0 commit comments