// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
// RUN: 'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
// REQUIRES: host-supports-jit
// UNSUPPORTED: system-aix
// CHECK-DRIVER: i = 10
// RUN: cat %s | clang-repl | FileCheck %s
extern "C" int ;
int x1 = 0;
int x2 = 42;
%undo
int x2 = 24;
auto r1 = ;
// CHECK: x1 = 0
auto r2 = ;
// CHECK-NEXT: x2 = 24
int
%undo
int
auto r3 = ;
// CHECK-NEXT: foo() = 2
inline int
auto r4 = ;
%undo
auto r5 = ;
%quit