[cfe-commits] r52879 - in /cfe/trunk/lib/Sema: Sema.h SemaDeclAttr.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Tue Jul 1 13:35:01 PDT 2008


Chris Lattner wrote:
> On Tue, 1 Jul 2008, Argiris Kirtzidis wrote:
>>>  I'm not sure what you mean.  Since the Sema class is private to the 
>>> Sema  library, I'm fine with all of its members being public.  Is 
>>> that what you  mean?
>>
>> I'm talking about having Sema class "public" to client code, meaning 
>> moving Sema.h from 'lib/Sema' into 'include/clang/Sema'. Are there 
>> issues with this approach ?
>
> What is the advantage of that?  I would think most clients that would 
> want to build off Sema could just be AST consumers?

There are some things that the AST is missing, like source locations for 
type identifiers. i.e for

class A {};
A x;
class B { const A y; };

get the source locations for A,B occurances.

One way to get semantic analysis *and* type locations is by subclassing 
the Sema class. Is there a better way for this ?


-Argiris



More information about the cfe-commits mailing list