<div dir="ltr"><div>Hi,<br>Do you mean finding AST corresponding to MemberExpr or you already found then and trying to figure out SourceLocation for them?<br><br></div>Regards, Alexey K<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-07 11:40 GMT+03:00 Qiufeng Yu via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm new to clang and currently working on a project where I need to rewrite some codes in CUDA source file.</div><div><br></div><div>For example, if I have the following CUDA code:</div><div><br></div><div>int bx = blockIdx.x;</div><div>int by = blockIdx.y;</div><div><br></div><div>I want to rewrite the blockIdx and blockIdx.x and blockIdx.y to some other code:</div><div>int bx = something else;</div><div>int by = something else;</div><div><br></div><div>My problem is that how do I find the MemberExpr blockIdx,x and blockIdx.y?</div><div><br></div><div>I know how to get the MemberExpr, but I have no clue how to extract the name of the MemberExpr in order to know that it is the right MemberExpr for me to rewrite.</div><div><br></div><div>Any help is appreciated.</div><div><br></div><div><br></div><div>Patrick</div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><a href="https://www.linkedin.com/profile/view?id=AAMAABn6oKQBDhBteiQnWsYm-S9yxT7wQkfWhSw" target="_blank">linkedin.com/profile</a><br><br><a href="http://github.com/alexeyknyshev" target="_blank">github.com/alexeyknyshev</a><span></span><a href="http:///" target="_blank"></a><span></span><br><a href="https://bitbucket.org/alexeyknyshev/" target="_blank">bitbucket.org/alexeyknyshev</a><br></div></div>
</div>