rjmccall added a comment.
Oh, I see. The code currently tries to work with just the specialization and
the pattern. To do the instantiation, we have to find template arguments for
the context in which the pattern appears. For function temploids that aren't
defined in a friend declaration, we
sepavloff added a comment.
In https://reviews.llvm.org/D21767#1197783, @rjmccall wrote:
> Shouldn't there just be a link in the AST from the instantiated
> `FunctionTemplateDecl ` back to the original pattern? Maybe a generalization
> of `InstantiatedFromMember` in `RedeclarablableTemplateDecl
rjmccall added a comment.
Shouldn't there just be a link in the AST from the instantiated
`FunctionTemplateDecl ` back to the original pattern? Maybe a generalization
of `InstantiatedFromMember` in `RedeclarablableTemplateDecl`?
Repository:
rC Clang
https://reviews.llvm.org/D21767
_
sepavloff updated this revision to Diff 160290.
sepavloff added a comment.
Rebased the patch, it is still actual.
Repository:
rC Clang
https://reviews.llvm.org/D21767
Files:
include/clang/AST/ASTLambda.h
include/clang/AST/Decl.h
include/clang/Sema/Sema.h
lib/AST/Decl.cpp
lib/Sema/S
sepavloff updated this revision to Diff 139758.
sepavloff added a comment.
Rebased patch
Repository:
rC Clang
https://reviews.llvm.org/D21767
Files:
include/clang/AST/ASTLambda.h
include/clang/AST/Decl.h
include/clang/Sema/Sema.h
lib/AST/Decl.cpp
lib/Sema/SemaTemplateInstantiate.cp
sepavloff updated this revision to Diff 116484.
sepavloff edited the summary of this revision.
sepavloff added a comment.
Added regression test for PR34343
Investigation of this defect is presented in
https://bugs.llvm.org/show_bug.cgi?id=34343 .
https://reviews.llvm.org/D21767
Files:
inclu
sepavloff updated this revision to Diff 107817.
sepavloff added a comment.
Reworked patch
Used more general way to cope with calculation of instantiation
stack, which is suitable for cases represented in PR26512.
Added new tests.
https://reviews.llvm.org/D21767
Files:
include/clang/AST/ASTL
sepavloff updated this revision to Diff 106914.
sepavloff added a comment.
Aligned implementation with https://reviews.llvm.org/D21508.
https://reviews.llvm.org/D21767
Files:
lib/AST/Decl.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaTemplate/instantiate-friend-function.cpp
Index: te
sepavloff created this revision.
sepavloff added a reviewer: rsmith.
sepavloff added a subscriber: cfe-commits.
If a function template was defined in a friend declaration in a
template class, it was not instantiated because template definition
was not found.
http://reviews.llvm.org/D21767
Files: