1 // RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
2 // RUN:            'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
3 // REQUIRES: host-supports-jit
4 // UNSUPPORTED: system-aix
5 // CHECK-DRIVER: i = 10
6 // RUN: cat %s | clang-repl | FileCheck %s
7 extern "C" int printf(const char *, ...);
8 int i = 42;
9 auto r1 = printf("i = %d\n", i);
10 // CHECK: i = 42
11 
12 struct S { float f = 1.0; S *m = nullptr;} s;
13 
14 auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast<unsigned long long>(s.m));
15 // CHECK-NEXT: S[f=1.000000, m=0x0]
16 quit
17