@@ -2155,8 +2155,15 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr {
2155
2155
not this .elseIsVoid ( ) and tag = ConditionValueFalseStoreTag ( )
2156
2156
) and
2157
2157
opcode instanceof Opcode:: Store and
2158
- resultType = this .getResultType ( )
2158
+ (
2159
+ not expr .hasLValueToRValueConversion ( ) and
2160
+ resultType = this .getResultType ( )
2161
+ or
2162
+ expr .hasLValueToRValueConversion ( ) and
2163
+ resultType = getTypeForPRValue ( expr .getType ( ) )
2164
+ )
2159
2165
or
2166
+ not expr .hasLValueToRValueConversion ( ) and
2160
2167
tag = ConditionValueResultLoadTag ( ) and
2161
2168
opcode instanceof Opcode:: Load and
2162
2169
resultType = this .getResultType ( )
@@ -2186,8 +2193,15 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr {
2186
2193
)
2187
2194
or
2188
2195
tag = ConditionValueResultTempAddressTag ( ) and
2189
- result = this .getInstruction ( ConditionValueResultLoadTag ( ) )
2196
+ (
2197
+ not expr .hasLValueToRValueConversion ( ) and
2198
+ result = this .getInstruction ( ConditionValueResultLoadTag ( ) )
2199
+ or
2200
+ expr .hasLValueToRValueConversion ( ) and
2201
+ result = this .getParent ( ) .getChildSuccessor ( this )
2202
+ )
2190
2203
or
2204
+ not expr .hasLValueToRValueConversion ( ) and
2191
2205
tag = ConditionValueResultLoadTag ( ) and
2192
2206
result = this .getParent ( ) .getChildSuccessor ( this )
2193
2207
)
@@ -2216,18 +2230,23 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr {
2216
2230
result = this .getElse ( ) .getResult ( )
2217
2231
)
2218
2232
or
2233
+ not expr .hasLValueToRValueConversion ( ) and
2219
2234
tag = ConditionValueResultLoadTag ( ) and
2220
- (
2221
- operandTag instanceof AddressOperandTag and
2222
- result = this .getInstruction ( ConditionValueResultTempAddressTag ( ) )
2223
- )
2235
+ operandTag instanceof AddressOperandTag and
2236
+ result = this .getInstruction ( ConditionValueResultTempAddressTag ( ) )
2224
2237
)
2225
2238
}
2226
2239
2227
2240
final override predicate hasTempVariable ( TempVariableTag tag , CppType type ) {
2228
2241
not this .resultIsVoid ( ) and
2229
2242
tag = ConditionValueTempVar ( ) and
2230
- type = this .getResultType ( )
2243
+ (
2244
+ not expr .hasLValueToRValueConversion ( ) and
2245
+ type = this .getResultType ( )
2246
+ or
2247
+ expr .hasLValueToRValueConversion ( ) and
2248
+ type = getTypeForPRValue ( expr .getType ( ) )
2249
+ )
2231
2250
}
2232
2251
2233
2252
final override IRVariable getInstructionVariable ( InstructionTag tag ) {
@@ -2242,7 +2261,13 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr {
2242
2261
2243
2262
final override Instruction getResult ( ) {
2244
2263
not this .resultIsVoid ( ) and
2245
- result = this .getInstruction ( ConditionValueResultLoadTag ( ) )
2264
+ (
2265
+ expr .hasLValueToRValueConversion ( ) and
2266
+ result = this .getInstruction ( ConditionValueResultTempAddressTag ( ) )
2267
+ or
2268
+ not expr .hasLValueToRValueConversion ( ) and
2269
+ result = this .getInstruction ( ConditionValueResultLoadTag ( ) )
2270
+ )
2246
2271
}
2247
2272
2248
2273
override Instruction getChildSuccessor ( TranslatedElement child ) {
0 commit comments