[cfe-dev] Get name of MemberExpr expression
Alexey Knyshev via cfe-dev
cfe-dev at lists.llvm.org
Thu Dec 7 00:48:37 PST 2017
Do you mean finding AST corresponding to MemberExpr or you already found
then and trying to figure out SourceLocation for them?
Regards, Alexey K
2017-12-07 11:40 GMT+03:00 Qiufeng Yu via cfe-dev <cfe-dev at lists.llvm.org>:
> Hi all,
> I'm new to clang and currently working on a project where I need to
> rewrite some codes in CUDA source file.
> For example, if I have the following CUDA code:
> int bx = blockIdx.x;
> int by = blockIdx.y;
> I want to rewrite the blockIdx and blockIdx.x and blockIdx.y to some other
> int bx = something else;
> int by = something else;
> My problem is that how do I find the MemberExpr blockIdx,x and blockIdx.y?
> 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.
> Any help is appreciated.
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev