summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index 8f14ce50b8d..19b521b2641 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -131,7 +131,7 @@ Parser::ExprResult Parser::ParseCXXIdExpression() {
// unqualified-id:
// identifier
// operator-function-id
- // conversion-function-id [TODO]
+ // conversion-function-id
// '~' class-name [TODO]
// template-id [TODO]
//
@@ -152,11 +152,15 @@ Parser::ExprResult Parser::ParseCXXIdExpression() {
if (IdentifierInfo *II = TryParseOperatorFunctionId()) {
return Actions.ActOnIdentifierExpr(CurScope, OperatorLoc, *II,
Tok.is(tok::l_paren), &SS);
+ } else if (TypeTy *Type = ParseConversionFunctionId()) {
+ return Actions.ActOnConversionFunctionExpr(CurScope, OperatorLoc,
+ Type, Tok.is(tok::l_paren),
+ &SS);
}
- // FIXME: Handle conversion-function-id.
- unsigned DiagID = PP.getDiagnostics().getCustomDiagID(Diagnostic::Error,
- "expected operator-function-id");
- return Diag(Tok, DiagID);
+
+ // We already complained about a bad conversion-function-id,
+ // above.
+ return true;
}
} // switch.
OpenPOWER on IntegriCloud