diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index fdd10522ee5..231f6d4d97a 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2890,21 +2890,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // following an Objective-C object pointer type. Handle either // one of them. if (Tok.is(tok::less) && getLangOpts().ObjC1) { - ParseObjCTypeArgsOrProtocolQualifiers( - DS, /*warnOnIncompleteProtocols=*/false); - - // An Objective-C object pointer followed by type arguments - // can then be followed again by a set of protocol references, e.g., - // \c NSArray<NSView><NSTextDelegate> - if (Tok.is(tok::less)) { - if (DS.getProtocolQualifiers()) { - Diag(Tok, diag::err_objc_type_args_after_protocols) - << SourceRange(DS.getProtocolLAngleLoc(), DS.getLocEnd()); - SkipUntil(tok::greater, tok::greatergreater); - } else { - ParseObjCProtocolQualifiers(DS); - } - } + ParseObjCTypeArgsAndProtocolQualifiers(DS); } continue; @@ -3016,21 +3002,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // following an Objective-C object pointer type. Handle either // one of them. if (Tok.is(tok::less) && getLangOpts().ObjC1) { - ParseObjCTypeArgsOrProtocolQualifiers( - DS, /*warnOnIncompleteProtocols=*/false); - - // An Objective-C object pointer followed by type arguments - // can then be followed again by a set of protocol references, e.g., - // \c NSArray<NSView><NSTextDelegate> - if (Tok.is(tok::less)) { - if (DS.getProtocolQualifiers()) { - Diag(Tok, diag::err_objc_type_args_after_protocols) - << SourceRange(DS.getProtocolLAngleLoc(), DS.getLocEnd()); - SkipUntil(tok::greater, tok::greatergreater); - } else { - ParseObjCProtocolQualifiers(DS); - } - } + ParseObjCTypeArgsAndProtocolQualifiers(DS); } // Need to support trailing type qualifiers (e.g. "id<p> const"). |