aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-24 04:59:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-24 04:59:53 +0000
commit3eefb1c4bd2c562e43f25e0dba657bb32361dd14 (patch)
treedeb707e1fac14d534b44d44e0bf818f6f5088c03 /lib/AST/Expr.cpp
parent4d0d85c3370f2726c74ba0ece0a5e712830a1d82 (diff)
Fix overload resolution when calling a member template or taking the
address of a member template when explicit template arguments are provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 47df95dc71..ad9c9cbe10 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1126,6 +1126,18 @@ Expr::isLvalueResult Expr::isLvalueInternal(ASTContext &Ctx) const {
return LV_Valid;
}
+ case TemplateIdRefExprClass: {
+ const TemplateIdRefExpr *TID = cast<TemplateIdRefExpr>(this);
+ TemplateName Template = TID->getTemplateName();
+ NamedDecl *ND = Template.getAsTemplateDecl();
+ if (!ND)
+ ND = Template.getAsOverloadedFunctionDecl();
+ if (ND && DeclCanBeLvalue(ND, Ctx))
+ return LV_Valid;
+
+ break;
+ }
+
default:
break;
}