<div dir="ltr">This patch introduces VisitLValue() to evaluate the lvalue of an expression. VisitLValue()<br>is different from VisitLVal(). The motivation of this patch is as follows.<br><br>We have two kinds of RVal: LVal and NonLVal. LVal represents location value,<br>
NonLVal represents non-location value.<br><br>Expressions have two kinds of value: rvalue and lvalue. The rvalue of an<br>expression is is the normal value it evaluates to when placed at the RHS of an<br>assignment. The lvalue of an expression is the address of the memory object it<br>
represents.<br><br>We should distinguish rvalue/lvalue from NonLVal/LVal. An expression's lvalue<br>must be a LVal. An expression's rvalue can be either NonLVal or LVal. Every<br>expressoin has its rvalue. But not all of the expressions have lvalues. For<br>
example:<br><br>int x = 3;<br><br>"3" has rvalue 3, but no lvalue<br>"x" has rvalue 3, lvalue is its associated memregion MemRegionVal<br>"&x" has no lvalue, but has rvalue, which is the lvalue of 'x', i.e. MemRegionVal of x<br>
<br>So I suggest when we evaluate expressions, we pass on an argument indicating<br>whether we want to get its lvalue/rvalue, instead of specifying we are getting a<br>LVal or NonLVal.<br><br>In this patch, I use LValue/RValue to distinguish from LVal/NonLVal.<br>
<br>This patch cleans up a bunch of code. It lets store manager to evaluate the lvalue<br>of an expression.<br></div>