Vassil Vassilev c96c5edb58 [clang-repl] Enable basic multiline support.
This patch allows the users to use backslash to tell clang-repl that more input
is coming. This would help support OpenMP directives which generally require to
be in separate lines.
2023-05-20 14:40:58 +00:00

25 lines
413 B
C++

// REQUIRES: host-supports-jit
// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
extern "C" int printf(const char*,...);
int i = \
12;
printf("i=%d\n", i);
// CHECK: i=12
void f(int x) \
{ \
printf("x=\
%d", x); \
}
f(i);
// CHECK: x=12
// FIXME: Support preprocessor directives.
// #if 0 \
// #error "Can't be!" \
// #endif