[cfe-dev] A patch for Sema::CheckTypenameType.
Douglas Gregor
dgregor at apple.com
Sat Apr 24 08:37:22 PDT 2010
On Apr 24, 2010, at 12:55 AM, Enea Zaffanella wrote:
> Hello.
>
> Please find attached a patch for Sema::CheckTypenameType() that should solve a couple of FIXMEs related to the construction of DependentNameType nodes. In code such as the following
> ===============
> template <typename T> class S;
>
> template <typename T>
> struct Derived : public S<T>::base_type {};
> ===============
> clang was generating a DependentNameType node for the base class of Derived where the presence of the keyword "typename" was (wrongly) assumed. Hence we were obtaining:
>
> $ llvm/Debug/bin/clang -cc1 -ast-print c.cc
> template <typename T> class S;
> template <typename T> class Derived : public typename S<T>::base_type {
> };
>
>
> With the attached patch, we get instead:
>
> template <typename T> class S;
> template <typename T> struct Derived : public S<T>::base_type {
> };
>
> The patch passes all tests (r102070).
Perfect, thanks! Committed as r102243.
- Doug
More information about the cfe-dev
mailing list