Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Interpreter / lambda.cpp
blobdf75274a050b29aff501b65da627d9154e4c391c
1 // REQUIRES: host-supports-jit
2 // UNSUPPORTED: system-aix
3 // RUN: cat %s | clang-repl | FileCheck %s
4 // RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
5 extern "C" int printf(const char *, ...);
7 auto l1 = []() { printf("ONE\n"); return 42; };
8 auto l2 = []() { printf("TWO\n"); return 17; };
10 auto r1 = l1();
11 // CHECK: ONE
12 auto r2 = l2();
13 // CHECK: TWO
14 auto r3 = l2();
15 // CHECK: TWO
17 %quit