[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / lambda-implicit-this-capture.cpp
blob7e0e347a8fee794d4fb7d04921191239e4c3dced
1 // RUN: %clang_cc1 -std=c++11 -verify=cxx11 %s
2 // RUN: %clang_cc1 -std=c++2a -verify=cxx2a %s
3 // RUN: %clang_cc1 -std=c++2a -verify=cxx2a-no-deprecated %s -Wno-deprecated
4 // cxx11-no-diagnostics
5 // cxx2a-no-deprecated-no-diagnostics
7 struct A {
8 int i;
9 void f() {
10 (void) [=] { // cxx2a-note {{add an explicit capture of 'this'}}
11 return i; // cxx2a-warning {{implicit capture of 'this' with a capture default of '=' is deprecated}}