[cfe-dev] AST and Sema: find out if a variable with a name is visible in a particular scope

Grzegorz Jablonski grzejabl at gmail.com
Mon Oct 22 12:09:21 PDT 2012


On 10/22/2012 03:44 PM, GabrieleCocco wrote:
> The problem I'm facing by now is pretty simple, but I'm not sure about the
> best way to solve it. Since I'm injecting new declarations, such as
> "cl_context cntx = clCreateContext(....)", I've to deal with variable names
> potentially already defined somewhere and visible in the scope where I'm
> injecting code.
> Can you suggest me a way to find out if a var name is visible in a
> particular scope and/or a way to produce (if clang provides a tool/api to do
> that) an unique ID in a particular scope?
>
>
You might want to look here:

http://wwwpub.zih.tu-dresden.de/~krzika/

Regards,
Grzegorz




More information about the cfe-dev mailing list