summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-05-02 00:49:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-05-02 00:49:05 +0000
commit2d77937455e8f133a9e4df562d91f40a97c59c8c (patch)
tree883f2206314d3e0a89c277b34fbb624ce763f58b /lib/Sema/SemaOverload.cpp
parent7a72a8bc72710febe64ee092f919514f3de6cf88 (diff)
downloadclang-2d77937455e8f133a9e4df562d91f40a97c59c8c.tar.gz
Diagnose non-dependent qualified friend function template declarations
that don't match any existing declaration. Don't get confused and treat such declarations as template *specializations*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 73f3e75c80..2b0467fa86 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -1056,6 +1056,7 @@ Sema::CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &Old,
// third bullet. If the type of the friend is dependent, skip this lookup
// until instantiation.
if (New->getFriendObjectKind() && New->getQualifier() &&
+ !New->getDescribedFunctionTemplate() &&
!New->getDependentSpecializationInfo() &&
!New->getType()->isDependentType()) {
LookupResult TemplateSpecResult(LookupResult::Temporary, Old);