[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 18:04:18 PST 2024


================
@@ -58,16 +58,10 @@ class Class2 : public Class1<T> {
 #pragma omp declare reduction(fun1 : long : omp_out += omp_in) initializer                              // expected-error {{expected '(' after 'initializer'}}
 #pragma omp declare reduction(fun2 : long : omp_out += omp_in) initializer {                            // expected-error {{expected '(' after 'initializer'}} expected-error {{expected expression}} expected-warning {{extra tokens at the end of '#pragma omp declare reduction' are ignored}}
 #pragma omp declare reduction(fun3 : long : omp_out += omp_in) initializer[
-#if __cplusplus <= 199711L
----------------
philnik777 wrote:

Because the `[` is now parsed as a start for a lambda capture.

https://github.com/llvm/llvm-project/pull/73376


More information about the cfe-commits mailing list