<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello,<br>
<br>
You can use getBase() method to retrieve 'blockIdx' and
getMemberDecl() to find out what declaration is being referred.<br>
<br>
07.12.2017 11:40, Qiufeng Yu via cfe-dev пишет:<br>
</div>
<blockquote type="cite"
cite="mid:CAEMZuv9RSHz-BRu+34OWEx_04GSsqQvN-o62tnid5ZXXn4eyyw@mail.gmail.com">
<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>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Best regards,
Aleksei Sidorin,
SRR, Samsung Electronics
</pre>
</body>
</html>