[cfe-dev] Type Uniquing with noexcept specifiers
Douglas Gregor
dgregor at apple.com
Mon Mar 7 14:57:51 PST 2011
On Mar 7, 2011, at 12:46 PM, Sebastian Redl wrote:
> Hi,
>
> With noexcept, FunctionProtoType gained an Expr* member. This is a problem for uniquing types: to profile an Expr, I need an ASTContext, but I can't get one into FunctionProtoType::Profile(). Other types with an Expr* member (e.g. DependentTypeOfExprType) store their own ASTContext, but I'm loath to store one in a type as common as FunctionProtoType.
>
> Do I have a choice?
In this case, I would add a FunctionProtoWithNoExceptType node that's a "hidden" subclass adding the Expr* and the ASTContext&. We've done this elsewhere, for rarely-used fields of common Type nodes.
- Doug
More information about the cfe-dev
mailing list