diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-12-14 18:22:38 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-12-14 18:22:38 +0000 |
commit | 7aa4a881e6c534b89c39247bbd059729c22ddef3 (patch) | |
tree | 1f842a4a7055ed8a81c2a3c8f49350a71efe1d86 /clang/lib/Parse/ParseObjc.cpp | |
parent | 9f0b4ec0f5c456179803e2674bade8ee5d1f8677 (diff) | |
download | bcm5719-llvm-7aa4a881e6c534b89c39247bbd059729c22ddef3.tar.gz bcm5719-llvm-7aa4a881e6c534b89c39247bbd059729c22ddef3.zip |
Don't require a space between the two ">" in "vector<id<protocol>>" in objc++11.
C++11 allowed writing "vector<vector<int>>" without a space between the two ">".
This change allows this for protocols in template lists too in -std=c++11 mode,
and improves the diagnostic in c++98 mode.
llvm-svn: 170223
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 3b252d083e7..6f162fa1912 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1200,12 +1200,8 @@ ParseObjCProtocolReferences(SmallVectorImpl<Decl *> &Protocols, } // Consume the '>'. - if (Tok.isNot(tok::greater)) { - Diag(Tok, diag::err_expected_greater); + if (ParseGreaterThanInTemplateList(EndLoc, /*ConsumeLastToken=*/true)) return true; - } - - EndLoc = ConsumeToken(); // Convert the list of protocols identifiers into a list of protocol decls. Actions.FindProtocolDeclaration(WarnOnDeclarations, |