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 {
5959
6060 final CppType getResultType ( ) {
6161 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 ( ) )
6464 }
6565
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+
6675 /**
6776 * Holds if the result of this `TranslatedExpr` is a glvalue.
6877 */
You can’t perform that action at this time.
0 commit comments