[cfe-dev] which class represent variable scope ?

kevinlynx kevinlynx at gmail.com
Thu Jan 10 21:05:10 PST 2013


For example:

    void func() {
        unsigned a;
        {
             unsigned b;
        }
   }

I want to know whether `a` and `b` is in the same code scope.  DeclContext does NOT work on this, which means `a` and `b` have the same DeclContext (a function decl context). I googled and found someone have already asked this question but didn't get an answer. 

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130111/da6bdb2f/attachment.html>


More information about the cfe-dev mailing list