mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 17:46:06 +00:00

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.
25 lines
413 B
C++
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
|
|
|