[cfe-dev] Retrieve variable name
Alberto Barbaro
barbaro.alberto at gmail.com
Wed Jan 7 12:37:34 PST 2015
Hi all,
please consider this code:
int main {
int a = 7;
int b = a;
}
I have a Decl object called decl that represents int b = a; If i do
decl->getInit() i can have an Expr pointer that represents a I think. From
there how can i retrieve the variable name 'a'? Maybe using
getNameAsString()? I tried but it didn't work.
Thanks,
Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150107/e17929c4/attachment.html>
More information about the cfe-dev
mailing list