brintos

brintos / llvm-project-archived public Read only

0
0
Text · 439 B · 4516910 Raw
24 lines · cpp
1// RUN: cat %s | clang-repl | FileCheck %s2extern "C" int printf(const char *, ...);3int x1 = 0;4int x2 = 42;5%undo6int x2 = 24;7auto r1 = printf("x1 = %d\n", x1);8// CHECK: x1 = 09auto r2 = printf("x2 = %d\n", x2);10// CHECK-NEXT: x2 = 2411 12int foo() { return 1; }13%undo14int foo() { return 2; }15auto r3 = printf("foo() = %d\n", foo());16// CHECK-NEXT: foo() = 217 18inline int bar() { return 42;}19auto r4 = bar();20%undo21auto r5 = bar();22 23%quit24