1 // RUN: %clang_cc1 -ast-print -std=c++17 %s | FileCheck %s 2 3 struct S { 4 template<typename ... T> test1S5void test1(int i, T... t) { 6 { 7 auto lambda = [i]{}; 8 //CHECK: [i] { 9 } 10 { 11 auto lambda = [=]{}; 12 //CHECK: [=] { 13 } 14 { 15 auto lambda = [&]{}; 16 //CHECK: [&] { 17 } 18 { 19 auto lambda = [k{i}] {}; 20 //CHECK: [k{i}] { 21 } 22 { 23 auto lambda = [k(i)] {}; 24 //CHECK: [k(i)] { 25 } 26 { 27 auto lambda = [k = i] {}; 28 //CHECK: [k = i] { 29 } 30 { 31 auto lambda = [t..., i]{}; 32 //CHECK: [t..., i] { 33 } 34 { 35 auto lambda = [&t...]{}; 36 //CHECK: [&t...] { 37 } 38 { 39 auto lambda = [this, &t...]{}; 40 //CHECK: [this, &t...] { 41 } 42 { 43 auto lambda = [t..., this]{}; 44 //CHECK: [t..., this] { 45 } 46 { 47 auto lambda = [k(t...)] {}; 48 //CHECK: [k(t...)] { 49 } 50 { 51 auto lambda = [k{t...}] {}; 52 //CHECK: [k{t...}] { 53 } 54 } 55 56 };