[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
Douglas Gregor
dgregor at apple.com
Thu Apr 8 11:45:00 PDT 2010
On Apr 8, 2010, at 11:26 AM, John McCall wrote:
> 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.
I guess my point is that we won't have any saved function templates in this case, because we can't look into T. TemplateName can cope with that, FunctionTemplateDecl** cannot.
- Doug
More information about the cfe-commits
mailing list