summaryrefslogtreecommitdiffstats
path: root/clang/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Parse/ParseObjc.cpp')
-rw-r--r--clang/Parse/ParseObjc.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/Parse/ParseObjc.cpp b/clang/Parse/ParseObjc.cpp
index 8fa071a3fe8..e382974daf4 100644
--- a/clang/Parse/ParseObjc.cpp
+++ b/clang/Parse/ParseObjc.cpp
@@ -986,8 +986,11 @@ Parser::ExprResult Parser::ParseObjCMessageExpression() {
assert(Tok.getKind() == tok::l_square && "'[' expected");
SourceLocation Loc = ConsumeBracket(); // consume '['
// Parse receiver
- // FIXME: receiver as type-name/class-name
- ParseAssignmentExpression();
+ if (Tok.getKind() == tok::identifier &&
+ Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope))
+ ConsumeToken();
+ else
+ ParseAssignmentExpression();
// Parse objc-selector
IdentifierInfo *selIdent = ParseObjCSelector();
if (Tok.getKind() == tok::colon) {
@@ -1024,7 +1027,7 @@ Parser::ExprResult Parser::ParseObjCMessageExpression() {
return 0;
}
ConsumeBracket(); // consume ']'
- return 0;
+ return 0; // FIXME: return a message expr AST!
}
Parser::ExprResult Parser::ParseObjCStringLiteral() {
OpenPOWER on IntegriCloud