[cfe-commits] r102407 - in /cfe/trunk: include/clang/AST/ lib/AST/ lib/CodeGen/ lib/Frontend/ lib/Sema/ test/SemaTemplate/

Douglas Gregor dgregor at apple.com
Tue Apr 27 08:02:45 PDT 2010


On Apr 26, 2010, at 5:57 PM, John McCall wrote:

> Author: rjmccall
> Date: Mon Apr 26 19:57:59 2010
> New Revision: 102407
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=102407&view=rev
> Log:
> Make the InjectedClassNameType the canonical type of the current instantiation
> of a class template or class template partial specialization.  That is to
> say, in
>  template <class T> class A { ... };
> or
>  template <class T> class B<const T*> { ... };
> make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
> when written inside the appropriate context.  This allows us to track the
> current instantiation appropriately even inside AST routines.  It also allows
> us to compute a DeclContext for a type much more efficiently, at some extra
> cost every time we write a template specialization (which can be optimized,
> but I've left it simple in this patch).

Excellent, this is *way* cleaner than the previous "late" checking of template specialization types against the current instantiation.

	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100427/e4606a52/attachment.html>


More information about the cfe-commits mailing list