Re: [PATCH] D21187: Allow use of lambda expressions in array bounds

2016-06-15 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Sorry for my late reply. Comment at: lib/Sema/SemaExpr.cpp:12825 @@ -12824,1 +12824,3 @@ + // BlockContext. + } else if (!Rec.IsArrayBound) { // C++1y [expr.const]p2: rsmith wrote: > This isn't correct; you still need

Re: [PATCH] D21187: Allow use of lambda expressions in array bounds

2016-06-09 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Sema/SemaExpr.cpp:12825 @@ -12824,1 +12824,3 @@ + // BlockContext. + } else if (!Rec.IsArrayBound) { // C++1y [expr.const]p2: This isn't correct; you still need to produce the diagnostic even if

[PATCH] D21187: Allow use of lambda expressions in array bounds

2016-06-09 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. clang currently errors out when a lambda expression is used to compute the size of an array even though clang supports variable-length arrays as a C99 extension. For example, $ cat vla1.cpp ``` int foo3(); struct S1 {