brintos

brintos / llvm-project-archived public Read only

0
0
Text · 527 B · eb1f9e8 Raw
16 lines · cpp
1// RUN: %clang_cc1 -std=c++03 -verify=cxx11 %s -Wno-c++11-extensions2// RUN: %clang_cc1 -std=c++11 -verify=cxx11 %s3// RUN: %clang_cc1 -std=c++2a -verify=cxx2a %s4// RUN: %clang_cc1 -std=c++2a -verify=cxx2a-no-deprecated %s -Wno-deprecated5// cxx11-no-diagnostics6// cxx2a-no-deprecated-no-diagnostics7 8struct A {9  int i;10  void f() {11    (void) [=] { // cxx2a-note {{add an explicit capture of 'this'}}12      return i; // cxx2a-warning {{implicit capture of 'this' with a capture default of '=' is deprecated}}13    };14  }15};16