[cfe-dev] Adding type source info to ImplicitValueInitExpr.

John McCall rjmccall at apple.com
Mon Jan 18 15:33:20 CST 2010


On Jan 18, 2010, at 3:21 AM, Enea Zaffanella wrote:
> The attached patch adds (optional) type source info to class ImplicitValueInitExpr: the type source info will have a valid value if the ImplicitValueInitExpr results from __builtin_offsetof constructs.

I think we'd rather not take this.  The primary use of ImplicitValueInitExpr does not involve a type written in the source;  in fact, it involves no source code at all.  This patch is useful solely because of the current implementation of __builtin_offsetof.  That implementation is terrible, and it's long past time for __builtin_offsetof to get its own AST class.  When that happens, this patch will be unnecessary.

If you are interested in working on this, it is being tracked as PR 5390: http://llvm.org/bugs/show_bug.cgi?id=5390

John.


More information about the cfe-dev mailing list