summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-01 16:54:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-01 16:54:29 +0000
commit282b87a805812279986cec3e9f77db498e2115ec (patch)
tree3c1ac0de01e73fe27d9f1a790df410d7cb10a173 /lib/Sema/SemaTemplate.cpp
parentd94c3ae48f5cc9cceb5a2cdeb39fc4c590a6deba (diff)
Handle CC and NoReturn when instantiating members of class templates.
Before we were considering them only when instantiating templates. This fixes pr18033. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index e995ae1c36..7b901d2df8 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -7436,7 +7436,8 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
NamedDecl *Prev = *P;
if (!HasExplicitTemplateArgs) {
if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Prev)) {
- if (Context.hasSameUnqualifiedType(Method->getType(), R)) {
+ QualType Adjusted = adjustCCAndNoReturn(R, Method->getType());
+ if (Context.hasSameUnqualifiedType(Method->getType(), Adjusted)) {
Matches.clear();
Matches.addDecl(Method, P.getAccess());