From cc26b66e99f2829d7a544c68284b6411c46cae3e Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 19 Apr 2012 11:23:20 -0700 Subject: [PATCH] Improve source position reporting for scatters. Now, we only highlight the memory write--not both sides of the assignment expression. --- expr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expr.cpp b/expr.cpp index 81680874..6d6ad8bb 100644 --- a/expr.cpp +++ b/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);