1. Fix parsing of method prototype involving c-style argument declarations.
2. Fixes all allowable key-words used as selectors.
3. Template to do the messaging parse.
4. A test case for all allowable selector names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41723 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseExpr.cpp b/Parse/ParseExpr.cpp
index c2b54828..f030e5d 100644
--- a/Parse/ParseExpr.cpp
+++ b/Parse/ParseExpr.cpp
@@ -427,11 +427,11 @@
/// [GNU] '__builtin_choose_expr' '(' assign-expr ',' assign-expr ','
/// assign-expr ')'
/// [GNU] '__builtin_types_compatible_p' '(' type-name ',' type-name ')'
-/// [OBC] '[' objc-receiver objc-message-args ']' [TODO]
-/// [OBC] '@selector' '(' objc-selector-arg ')' [TODO]
-/// [OBC] '@protocol' '(' identifier ')' [TODO]
-/// [OBC] '@encode' '(' type-name ')' [TODO]
-/// [OBC] objc-string-literal
+/// [OBJC] '[' objc-message-expr ']' [TODO]
+/// [OBJC] '@selector' '(' objc-selector-arg ')' [TODO]
+/// [OBJC] '@protocol' '(' identifier ')' [TODO]
+/// [OBJC] '@encode' '(' type-name ')' [TODO]
+/// [OBJC] objc-string-literal
/// [C++] 'const_cast' '<' type-name '>' '(' expression ')' [C++ 5.2p1]
/// [C++] 'dynamic_cast' '<' type-name '>' '(' expression ')' [C++ 5.2p1]
/// [C++] 'reinterpret_cast' '<' type-name '>' '(' expression ')' [C++ 5.2p1]
@@ -590,6 +590,8 @@
return ParseCXXCasts();
case tok::at:
return ParseObjCExpression();
+ case tok::l_square:
+ return ParseObjCMessageExpression ();
default:
Diag(Tok, diag::err_expected_expression);
return ExprResult(true);