[cfe-dev] Variable declaration location
James Dennett via cfe-dev
cfe-dev at lists.llvm.org
Wed Jul 25 01:13:33 PDT 2018
On Wed, Jul 25, 2018 at 12:27 AM, Ridwan Shariffdeen via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi,
>
> I am trying to get the location of the variable declaration from
> a DeclRefExpr.
> Is there a way I can achieve this? There doesn't seem to be any
> relationship with DeclRefExpr and the actual VarDecl.
>
DeclRefExpr::getDecl returns a ValueDecl*. For a variable, that's a
VarDecl.
-- James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180725/d6d9ad03/attachment.html>
More information about the cfe-dev
mailing list