[cfe-commits] r100753 - in /cfe/trunk: include/clang/AST/Decl.h include/clang/AST/DeclFriend.h include/clang/AST/DeclTemplate.h lib/AST/Decl.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaTemplate.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/CXX/temp/temp.decls/temp.friend/p1.cpp

John McCall rjmccall at apple.com
Thu Apr 8 11:26:49 PDT 2010


On Apr 8, 2010, at 8:16 AM, Douglas Gregor wrote:
> I do wonder if we'll need to hold on to a TemplateName, for the case where the name of the template we're specializing is dependent, e.g.,
> 
> template<typename T, typename U>
> struct X {
>  friend void T::foo<>(U);
> };
> 
> (that's yet another level of complexity)

This will be reflected in the declaration's qualifier.  You're right that, in this case, we should do the redeclaration lookup instead of relying on the saved function templates.

John.



More information about the cfe-commits mailing list