clang/test/Interpreter/multiline.cpp
raw| 1 | // REQUIRES: host-supports-jit |
| 2 | // UNSUPPORTED: system-aix |
| 3 | // RUN: cat %s | clang-repl | FileCheck %s |
| 4 | |
| 5 | extern "C" int printf(const char*,...); |
| 6 | int i = \ |
| 7 | 12; |
| 8 | |
| 9 | printf("i=%d\n", i); |
| 10 | // CHECK: i=12 |
| 11 | |
| 12 | void f(int x) \ |
| 13 | { \ |
| 14 | printf("x=\ |
| 15 | %d", x); \ |
| 16 | } |
| 17 | f(i); |
| 18 | // CHECK: x=12 |
| 19 | |
| 20 | // FIXME: Support preprocessor directives. |
| 21 | // #if 0 \ |
| 22 | // #error "Can't be!" \ |
| 23 | // #endif |
| 24 |