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 *, ...); 6 __anonf06837fa0102() 7auto l1 = []() { printf("ONE\n"); return 42; }; __anonf06837fa0202() 8auto l2 = []() { printf("TWO\n"); return 17; }; 9 10 auto r1 = l1(); 11 // CHECK: ONE 12 auto r2 = l2(); 13 // CHECK: TWO 14 auto r3 = l2(); 15 // CHECK: TWO 16 17 %quit 18