PR42513: Fix handling of function definitions lazily instantiated from
authorRichard Smith <richard@metafoo.co.uk>
Sat, 31 Oct 2020 01:30:56 +0000 (18:30 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Sat, 31 Oct 2020 01:35:12 +0000 (18:35 -0700)
commitdd8297b0669f8e69b03ba40171b195b5acf0f963
tree8cc3449273fa9531a063213560451f93f56f00d2
parentca55c99d56d336893a241bd758347a9d19b25fdd
PR42513: Fix handling of function definitions lazily instantiated from
friends.

When determining whether a function has a template instantiation
pattern, look for other declarations of that function that were
instantiated from a friend function definition, rather than assuming
that checking for member specialization information on whichever
declaration name lookup found will be sufficient.
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/SemaTemplate/friend.cpp