[cfe-dev] get value of struct's member
klimek at google.com
Thu Mar 21 09:41:46 PDT 2013
On Thu, Mar 21, 2013 at 7:07 AM, huc1985 <huc1985 at 163.com> wrote:
> I'm using a RecursiveASTVisitor and implementing its VisitCallExpr()
> How can I get the value of struct's member?
> bool VisitCallExpr(CallExpr *expr)
> for (int i=0;i<expr->getNumArgs();i++)
> Expr* ex = expr->getArg(i);
> if (ex->getType()->isStructureType())
> //get the value of struct's member
I'm not sure I understand what you're asking - in general the value of a
variable (or member of a struct) is only known at runtime.
> View this message in context:
> Sent from the Clang Developers mailing list archive at Nabble.com.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev