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 | b707a4762fcc47c12b5f487856ba0781c9399295 (patch) | |
tree | 8752b8f33e5d7f413097e61e03854c26fab18d8b /lib/Parse/ParseObjc.cpp | |
parent | e72f4d93ed44e00e1b1433768f0515b9c4f38562 (diff) | |
download | clang-b707a4762fcc47c12b5f487856ba0781c9399295.tar.gz clang-b707a4762fcc47c12b5f487856ba0781c9399295.tar.bz2 clang-b707a4762fcc47c12b5f487856ba0781c9399295.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 3b252d083e..6f162fa191 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/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, |