[cfe-dev] API to check if a decl is a pointer

Himanshu via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 25 09:00:38 PDT 2016


Hi All,

Is there an API that allows one to check if a DeclRefExpr or its
corresponding VarDecl is of a pointer type? For example:

int *pI;  // yes -- a pointer type
int i; // no.

I could use a string based check -- getting the type name as string and
then searching for '*' in it, but I believe there must be a cleaner and
robust way to do so.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160725/f2ca8e0b/attachment.html>


More information about the cfe-dev mailing list