[PATCH] Allow more lookup of types in dependent base classes

Reid Kleckner rnk at google.com
Fri Jun 20 17:18:51 PDT 2014


For the mailing list, the change log is:

MSVC appears to perform name lookup into dependent base classes when the
dependent base class has a known primary template.  This allows them to
know whether some unqualified ids are types or not, which allows them to
parse more class templates without typename keywords.

We can do the same thing when type name lookup fails, and if we find a
single type decl in one of our dependent base classes, recover as though
the user wrote 'typename MyClass::TypeFromBase'.

This allows us to parse some COM smart pointer classes in wrl/client.h
from the Windows 8 SDK.


On Fri, Jun 20, 2014 at 5:17 PM, Reid Kleckner <rnk at google.com> wrote:

> cfe-commits try 2
>
> http://reviews.llvm.org/D4237
>
> Files:
>   lib/Sema/SemaDecl.cpp
>   test/SemaTemplate/ms-lookup-template-base-classes.cpp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140620/73175557/attachment.html>


More information about the cfe-commits mailing list