Improve source position reporting for scatters.
Now, we only highlight the memory write--not both sides of the assignment expression.
This commit is contained in:
3
expr.cpp
3
expr.cpp
@@ -2663,6 +2663,7 @@ lEmitOpAssign(AssignExpr::Op op, Expr *arg0, Expr *arg1, const Type *type,
|
||||
}
|
||||
|
||||
// And store the result back to the lvalue.
|
||||
ctx->SetDebugPos(arg0->pos);
|
||||
lStoreAssignResult(newValue, lv, resultType, lvalueType, ctx, baseSym);
|
||||
|
||||
return newValue;
|
||||
@@ -2707,7 +2708,7 @@ AssignExpr::GetValue(FunctionEmitContext *ctx) const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctx->SetDebugPos(pos);
|
||||
ctx->SetDebugPos(lvalue->pos);
|
||||
|
||||
lStoreAssignResult(value, ptr, valueType, ptrType, ctx, baseSym);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user