diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-10 00:59:31 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-10 00:59:31 +0000 |
commit | 03c4e28678b6608eeefb3fcb1a2bdba03823807c (patch) | |
tree | b95413cd64f8ac1a6cb5080943d4139632c2fa69 /lib/Sema/SemaTemplate.cpp | |
parent | 691a2223db5dced0b00e596638f2bf2d7171aeee (diff) |
Take into consideration calling convention when processing specializations.
This fixes pr18141.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 20a3d28331..b134f6ea51 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -6654,7 +6654,10 @@ Sema::CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous) { I != E; ++I) { NamedDecl *D = (*I)->getUnderlyingDecl(); if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) { - if (Context.hasSameType(Function->getType(), Method->getType())) { + QualType Adjusted = Function->getType(); + if (!hasExplicitCallingConv(Adjusted)) + Adjusted = adjustCCAndNoReturn(Adjusted, Method->getType()); + if (Context.hasSameType(Adjusted, Method->getType())) { Instantiation = Method; InstantiatedFrom = Method->getInstantiatedFromMemberFunction(); MSInfo = Method->getMemberSpecializationInfo(); |