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.
Any help is appreciated.
Best
Ridwan
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.
Any help is appreciated.
Best
Ridwan
DeclRefExpr::getDecl returns a ValueDecl*. For a variable, that's a
VarDecl.
-- James
I didn’t realize the inheritance, thanks a lot