On Sep 4, 2009, at 5:15 PM, John McCall wrote: > Author: rjmccall > Date: Fri Sep 4 19:15:47 2009 > New Revision: 81057 > > URL: http://llvm.org/viewvc/llvm-project?rev=81057&view=rev > Log: > Basic support for representing elaborated type specifiers > directly in the AST. The current thinking is to create these > only in C++ mode for efficiency. But for now, they're not being > created at all; patch to follow. > > This will let us do things like verify that tags match during > template instantation, as well as signal that an elaborated type > specifier was used for clients that actually care.
Very nice! > Modified: cfe/trunk/lib/Sema/TreeTransform.h > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=81057&r1=81056&r2=81057&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- cfe/trunk/lib/Sema/TreeTransform.h (original) > +++ cfe/trunk/lib/Sema/TreeTransform.h Fri Sep 4 19:15:47 2009 > @@ -441,6 +441,11 @@ > QualType RebuildEnumType(EnumDecl *Enum) { > return SemaRef.Context.getTypeDeclType(Enum); > } > + > + /// \brief Build a new elaborated type. > + QualType RebuildElaboratedType(QualType T, > ElaboratedType::TagKind Tag) { > + return SemaRef.Context.getElaboratedType(T, Tag); > + } I assume that the TemplateInstantiator class will (eventually) be overriding RebuildElaboratedType, to complain about class-key mismatches? (struct vs. union, etc.) - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
