<div dir="ltr">Worked great! Many thanks!<div><br></div><div>Robert</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019 at 10:43 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'd guess you'd call "getDecl" to get the decl the DeclRefExpr is referencing, then dyn_cast that (the decl is a ValueDecl*) to VarDecl to see if it's a variable that's being referenced (could be a function, etc, etc) then do whatever you want to do with that VarDecl.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019 at 1:33 PM Robert Ankeney via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Let's assume I have a DeclRefExpr that is referenceing some variable that is declared as "static const int var;". How can I determine the variable is static? There is no isStaticLocal() or getStorageClass() call as there would be for the VarDecl. Is there something within the QualType that gets me that info?<div><br></div><div>Many thanks,</div><div>Robert</div><div><br></div></div>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div>
</blockquote></div>