aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseExprCXX.cpp')
-rw-r--r--lib/Parse/ParseExprCXX.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp
index d09f20e113..422b915b68 100644
--- a/lib/Parse/ParseExprCXX.cpp
+++ b/lib/Parse/ParseExprCXX.cpp
@@ -527,7 +527,15 @@ ExprResult Parser::ParseCXXTypeid() {
RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
if (RParenLoc.isInvalid())
return ExprError();
-
+
+ // If we are a foo<int> that identifies a single function, resolve it now...
+ Expr* e = Result.get();
+ if (e->getType() == Actions.Context.OverloadTy) {
+ ExprResult er =
+ Actions.ResolveAndFixSingleFunctionTemplateSpecialization(e);
+ if (er.isUsable())
+ Result = er.release();
+ }
Result = Actions.ActOnCXXTypeid(OpLoc, LParenLoc, /*isType=*/false,
Result.release(), RParenLoc);
}