<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>in my source-to-source translation tool I try to get the
lefthandside of assignment in my VisitCallExpr:</p>
<p>Example:</p>
<p>lhs = foo(42);</p>
<p>I need to retrieve "lhs" and its associated type.</p>
<p>Any hint is welcome!</p>
<p>Marcel<br>
</p>
<p>My code snippet:</p>
<p><font face="Courier New, Courier, monospace"> bool
VisitCallExpr(CallExpr *CallExpression) {<br>
QualType q = CallExpression->getType();<br>
const Type *t = q.getTypePtrOrNull(); <br>
const Stmt* callExpression = CallExpression;</font></p>
<p><font face="Courier New, Courier, monospace"> FunctionDecl
*func = CallExpression->getDirectCallee();</font></p>
<p><font face="Courier New, Courier, monospace"> ...<br>
</font></p>
<p><font face="Courier New, Courier, monospace"> // How to
retrieve "LHS" here and its type? <br>
</font></p>
<p><font face="Courier New, Courier, monospace"> ...<br>
</font></p>
<p><font face="Courier New, Courier, monospace"> return true;<br>
}<br>
<br>
<br>
</font></p>
<p><font face="Courier New, Courier, monospace"><br>
</font></p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>