[cfe-commits] [patch] Allow vector<id<protocol>> in objc++11

Nico Weber thakis at chromium.org
Fri Dec 14 10:23:54 PST 2012

r170223, thanks!

On Fri, Dec 14, 2012 at 9:26 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> A better way to write the test cases is to only put the expectations in
> the #if (using @OFFSET), and use the same set of test cases for C++11 and
> C++98.


> Other than that, seems like a good improvement. Thanks, Nico!
> Jordan
> On Dec 13, 2012, at 19:26 , Nico Weber <thakis at chromium.org> wrote:
> Hi,
> C++11 allowed writing "vector<vector<int>>" without a space between ">"
> and ">".
> Objective-C++11 doesn't seem to allow "vector<id<protocol>>" though, and
> the diagnostic message clang emits for it even gets worse with -std=c++11
> (PR14603).
> The attached patch allows vector<id<protocol>> (only in c++11 mode) by
> pulling the parsing code for >> into its own function and calling it from
> the objc protocol parsing code. In C++98-mode, this also improves the
> produced diagnostic. I'm aware this is a language change, but it's more
> permissive so it shouldn't break existing code, and the change feels
> consistent with c++11 to me.
> If you think the language change part is not desirable, I'd want to land
> the patch but make the new function not suppress the '>>' diagnostic when
> called from the protocol parser, for the improved diagnostic.
> Thanks,
> Nico
> <clang-objcxx11.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121214/02478492/attachment.html>

More information about the cfe-commits mailing list