diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-09 20:59:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-09 20:59:17 +0000 |
commit | e9d075e4341fd50f699b54adff57cd3efe86d4d5 (patch) | |
tree | cde0066a31bc55ff266e311b7629aa542651aadb /clang/lib/Sema/SemaDecl.cpp | |
parent | 668d3625030b37a340af05da9c8da0d79179698c (diff) | |
download | bcm5719-llvm-e9d075e4341fd50f699b54adff57cd3efe86d4d5.tar.gz bcm5719-llvm-e9d075e4341fd50f699b54adff57cd3efe86d4d5.zip |
A friend template specialization is also dependent if any of its
template arguments are dependent. Fixes PR10913.
llvm-svn: 141515
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 451751f1430..5ba38ee9f23 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -4987,8 +4987,12 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, // that either the specialized function type or the specialized // template is dependent, and therefore matching will fail. In // this case, don't check the specialization yet. + bool InstantiationDependent = false; if (isFunctionTemplateSpecialization && isFriend && - (NewFD->getType()->isDependentType() || DC->isDependentContext())) { + (NewFD->getType()->isDependentType() || DC->isDependentContext() || + TemplateSpecializationType::anyDependentTemplateArguments( + TemplateArgs.getArgumentArray(), TemplateArgs.size(), + InstantiationDependent))) { assert(HasExplicitTemplateArgs && "friend function specialization without template args"); if (CheckDependentFunctionTemplateSpecialization(NewFD, TemplateArgs, |