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

Chris Lattner sabre at nondot.org
Tue Jul 1 15:40:09 PDT 2008


On Tue, 1 Jul 2008, Eli Friedman wrote:
>> One way to get semantic analysis *and* type locations is by subclassing
>> the Sema class. Is there a better way for this ?

One issue is that there isn't really a good way to keep locations around 
for types while uniquing the types.  I don't really know a good solution 
for this without a huge expense.

> I think making Sema itself public is a bad idea. It likely will never
> be stable enough to become a public interface.  We don't want to
> commit to making it usefully subclassable, both because of the the
> potential performance cost and the instability of Sema. And we don't
> want outside code messing with its internal codeflow and data
> structures: it would likely lead to subtle bugs in the semantic
> analysis.

I strongly agree with Eli here.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the cfe-commits mailing list