| /llvm-project-15.0.7/clang/test/AST/ |
| H A D | ast-printer-lambda.cpp | 7 auto lambda = [i]{}; in test1() local 11 auto lambda = [=]{}; in test1() local 15 auto lambda = [&]{}; in test1() local 19 auto lambda = [k{i}] {}; in test1() local 23 auto lambda = [k(i)] {}; in test1() local 27 auto lambda = [k = i] {}; in test1() local 31 auto lambda = [t..., i]{}; in test1() local 35 auto lambda = [&t...]{}; in test1() local 43 auto lambda = [t..., this]{}; in test1() local 47 auto lambda = [k(t...)] {}; in test1() local [all …]
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | lambdas-generalized-capture.cpp | 7 auto lambda = [x=v]() { in generalizedCapture() local 11 int result = lambda(); in generalizedCapture() 17 auto lambda = [x=v++]() { in sideEffectsInGeneralizedCapture() local 22 int r1 = lambda(); in sideEffectsInGeneralizedCapture() 23 int r2 = lambda(); in sideEffectsInGeneralizedCapture() 35 auto lambda = [x=addOne(v)]() { in inliningInGeneralizedCapture() local 39 int result = lambda(); in inliningInGeneralizedCapture() 44 auto lambda = [x=(p ? 1 : 2)]() { in caseSplitInGeneralizedCapture() local 48 int result = lambda(); in caseSplitInGeneralizedCapture()
|
| H A D | lambdas.mm | 92 auto lambda = [y]{ return y; }; 93 int(^block)() = lambda; 102 auto lambda = [x]() mutable { 108 int(^block)() = lambda; 116 // Because block copied the lambda, r3 should be 1. 117 int r3 = lambda(); 120 // Aliasing the block shouldn't copy the lambda. 129 // Another copy of lambda 130 int(^blockSecondCopy)() = lambda; 139 auto lambda = []{ }; // no-warning [all …]
|
| H A D | nonnullparamchecker-crash.cpp | 6 auto lambda = [&] { f(i); }; in f() local 7 typedef decltype(lambda) T; in f() 8 T* blah = new T(lambda); in f()
|
| /llvm-project-15.0.7/clang/test/CodeGenCXX/ |
| H A D | lambda-conversion-op-cc.cpp | 10 auto lambda = [](int i, float f, double d) CC { return i + f + d; }; in usage() local 12 double (*CC fp)(int, float, double) = lambda; in usage() 14 double (*__attribute__((thiscall)) fp2)(int, float, double) = lambda; in usage() 15 double (*__attribute__((stdcall)) fp3)(int, float, double) = lambda; in usage() 16 double (*__attribute__((fastcall)) fp4)(int, float, double) = lambda; in usage() 17 double (*__attribute__((vectorcall)) fp5)(int, float, double) = lambda; in usage() 27 auto x = +lambda; in usage()
|
| H A D | exceptions-seh-filter-captures.cpp | 98 auto lambda = [&]() { in test_lambda() local 105 lambda(); in test_lambda() 132 auto lambda = [=]() { in this_in_lambda() local 138 lambda(); in this_in_lambda()
|
| H A D | optnone-pragma-optimize-off.cpp | 9 auto lambda = [&p]() { ++p; }; in foo() local 10 lambda(); in foo()
|
| /llvm-project-15.0.7/clang/test/PCH/ |
| H A D | cxx11-lambdas.mm | 14 auto lambda = [&](int z) { return x + z; }; 15 return i + lambda(y); 20 auto lambda = [=](int N) -> int { 27 return lambda(n); 31 auto lambda = [=](int m) { return n + m; }; 32 int (^block)(int) = lambda; 57 // CHECK-PRINT: lambda = [&](int z)
|
| H A D | cxx1y-lambdas.mm | 14 auto lambda = [](auto z) { return z + z; }; 15 return i + lambda(y); 19 auto lambda = [](auto N) -> int { 28 return lambda(n); 32 auto lambda = [=](int m) { return n + m; }; 33 int (^block)(int) = lambda; 55 // CHECK-PRINT: lambda = [](auto z
|
| /llvm-project-15.0.7/clang/test/Parser/ |
| H A D | objcxx0x-lambda-expressions.mm | 9 // fail to parse as a lambda introducer, so we get objc message parsing errors instead 12 []; // expected-error {{expected body of lambda expression}} 13 [=,foo+] {}; // expected-error {{expected ',' or ']' in lambda capture list}} 35 [get(bar), baz]; // expected-error {{expected body of lambda}} 38 [foo = bar + baz]; // expected-error {{expected body of lambda}} 39 … { bar, baz }]; // expected-error {{<initializer_list>}} expected-error {{expected body of lambda}} 41 …{ bar }, baz ]; // expected-error {{<initializer_list>}} expected-error {{expected body of lambda}}
|
| /llvm-project-15.0.7/lldb/test/API/api/multiple-targets/ |
| H A D | main.cpp | 16 auto lambda = [&](){ in main() local 23 std::thread thread1(lambda); in main() 24 std::thread thread2(lambda); in main() 25 std::thread thread3(lambda); in main()
|
| /llvm-project-15.0.7/clang/test/SemaOpenCLCXX/ |
| H A D | address-space-lambda.clcpp | 13 // Test lambda with default parameters 17 …xpected-error-re{{no matching function for call to object of type '__constant (lambda at {{.*}})'}} 19 // we can test when taking lambda type from the object. 49 …const1(); //expected-error{{no matching function for call to object of type '__constant (lambda at… 56 …const2(); //expected-error{{no matching function for call to object of type '__constant (lambda at… 61 …[&] () __global {} (); //expected-error{{no matching function for call to object of type '(lambda … 62 … (); //expected-error{{no matching function for call to object of type '(lambda at}} expected-note… 64 …[&] __private {} (); // expected-error{{no matching function for call to object of type '(lambda a… 66 // expected-warning@-2{{lambda without a parameter clause is a C++2b extension}} 70 [&] () __private mutable {} (); //expected-error{{expected body of lambda expression}}
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
| H A D | lambda-function-name.rst | 1 .. title:: clang-tidy - bugprone-lambda-function-name 3 bugprone-lambda-function-name 6 Checks for attempts to get the name of a function from within a lambda 7 expression. The name of a lambda is always something like ``operator()``, which
|
| /llvm-project-15.0.7/lldb/test/API/commands/expression/expr_inside_lambda/ |
| H A D | main.cpp | 43 auto lambda = [&shadowed, this, &local_var, in method() local 66 auto lambda = [this] { in method() local 72 lambda(); in method() 80 lambda(); in method()
|
| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | attr-musttail.cpp | 161 auto lambda = []() { return 12; }; // expected-note {{'operator()' declared here}} in TestNonCapturingLambda() local 163 …return lambda(); // expected-error {{non-member function cannot perform a tail c… in TestNonCapturingLambda() 166 auto lambda_fptr = static_cast<int (*)()>(lambda); in TestNonCapturingLambda() 168 [[clang::musttail]] return (+lambda)(); in TestNonCapturingLambda() 173 auto lambda = [x]() { return 12; }; // expected-note {{'operator()' declared here}} in TestCapturingLambda() local 175 …return lambda(); // expected-error {{non-member function cannot perform a tail … in TestCapturingLambda()
|
| /llvm-project-15.0.7/clang/test/CXX/expr/expr.prim/expr.prim.lambda/ |
| H A D | p3.cpp | 6 auto lambda = [i]() -> void {}; // expected-note 2{{candidate constructor}} in test_nonaggregate() local 7 decltype(lambda) foo = { 1 }; // expected-error{{no matching constructor}} in test_nonaggregate() 8 static_assert(__is_literal(decltype(lambda)) == (__cplusplus >= 201703L), ""); in test_nonaggregate()
|
| H A D | templates.cpp | 20 auto lambda = [=, &y] () -> T { in captures() local 25 return lambda(); in captures() 40 auto lambda = [=](bool b) { return x + y; }; in infer_result() local 41 …return lambda(true); // expected-error{{no viable conversion from returned value of type 'X' to fu… in infer_result()
|
| H A D | p9.cpp | 5 const auto lambda = [](int x) { return x + 1; }; in test_noexcept() local 6 static_assert(noexcept((int (*)(int))(lambda)), in test_noexcept()
|
| H A D | p20.cpp | 11 auto lambda = []{}; in destructor() local 12 destroy(&lambda); in destructor()
|
| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
| H A D | infinite-loop.cpp | 464 auto lambda = [=]() { in lambda_capture_with_loop_inside_lambda_bad() local 471 lambda(); in lambda_capture_with_loop_inside_lambda_bad() 476 auto lambda = [captured_finished=finished]() { in lambda_capture_with_loop_inside_lambda_bad_init_capture() local 483 lambda(); in lambda_capture_with_loop_inside_lambda_bad_init_capture() 488 auto lambda = [&]() { in lambda_capture_with_loop_inside_lambda_good() local 495 lambda(); in lambda_capture_with_loop_inside_lambda_good() 500 auto lambda = [&captured_finished=finished]() { in lambda_capture_with_loop_inside_lambda_good_init_capture() local 507 lambda(); in lambda_capture_with_loop_inside_lambda_good_init_capture()
|
| /llvm-project-15.0.7/polly/lib/External/isl/imath/tests/ |
| H A D | imath-test.scm | 43 (lambda (n-digits d-digits num) 51 (lambda (n-digits d-digits num) 61 (lambda (n-digits d-digits num) 71 (lambda (n-digits d-digits num) 90 (lambda (n-digits d-digits) 118 (stringify (lambda (v) 141 (lambda (a b) '?)))
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/ |
| H A D | eval.pass.cpp | 66 double x_mean = 1/d.lambda(); in main() 67 double x_var = 1/sqr(d.lambda()); in main() 105 double x_mean = 1/d.lambda(); in main() 106 double x_var = 1/sqr(d.lambda()); in main() 144 double x_mean = 1/d.lambda(); in main() 145 double x_var = 1/sqr(d.lambda()); in main()
|
| /llvm-project-15.0.7/libcxx/include/__random/ |
| H A D | exponential_distribution.h | 46 result_type lambda() const {return __lambda_;} in lambda() function 86 result_type lambda() const {return __p_.lambda();} in lambda() function 120 / __p.lambda(); in operator() 132 return __os << __x.lambda();
|
| /llvm-project-15.0.7/llvm/test/Linker/ |
| H A D | odr-lambda-1.ll | 1 ; ModuleID = '/tmp/odr-lambda-1.ii' 3 ; RUN: llvm-link %s %p/Inputs/odr-lambda-2.ll -S -o - 2>&1 | FileCheck %s 26 source_filename = "/tmp/odr-lambda-1.ii" 70 !1 = !DIFile(filename: "/tmp/odr-lambda-1.ii", directory: "/Data") 90 !21 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-1.ii:5:20)>", linkag…
|
| /llvm-project-15.0.7/clang/test/SemaSYCL/ |
| H A D | unique-stable-name-multiple-target-crash.cpp | 15 auto lambda = []{}; in use() local 16 kernel<class i>(lambda); in use()
|