1 // RUN: %clang_cc1 -std=c++2a -verify %s -Wdeprecated
3 // This test does two things.
4 // Deleting the copy constructor ensures that an [=, this] capture doesn't copy the object.
5 // Accessing a member variable from the lambda ensures that the capture actually works.
11 auto L
= [=, this]() -> int { return i
; };
19 (void) [=] { // expected-note {{add an explicit capture of 'this'}}
20 return i
; // expected-warning {{implicit capture of 'this' with a capture default of '=' is deprecated}}