<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>