rjmccall added a comment.

Thanks.

It's good to have a lambda test, but that one isn't actually testing the lambda 
path — the place the diagnostic will trigger is just the normal 
function-prototype path, just originally within a lambda.  You can do something 
like this:

  template <class T> int foo(T &&t);
  void bar(int x = foo(
      [](int x = foo(
      [](int x = foo(
      [](int x = foo(
      ...

It looks like you'll have to bump `-fbracket-level` to get a crash, but since 
that's configurable and this limit isn't, we should still be testing that.

Also I think the same problem can happen with the "blocks" extension — could 
you test that, too?  That would be something like (with `-fblocks`):

  void bar(int x = foo(
      ^(int x = foo(
      ^(int x = foo(
      ^(int x = foo(
      ...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63975/new/

https://reviews.llvm.org/D63975



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to