34 lines · plain
1# XFAIL: target-windows2# RUN: echo quit | %lldb -o "expression a+b" \3# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK14# (lldb) expression a+b5# CHECK1:{{^ \^ \^}}6# CHECK1: {{^ | error: use of undeclared identifier 'b'}}7# CHECK1: {{^ error: use of undeclared identifier 'a'}}8 9# RUN: echo quit | %lldb -o "expr a" \10# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK211# (lldb) expr a 12# CHECK2:{{^ \^}}13 14# RUN: echo quit | %lldb -o "expr -i 0 -o 0 -- a" \15# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK316# (lldb) expr -i 0 -o 0 -- a17# CHECK3:{{^ \^}}18# CHECK3: {{^ error: use of undeclared identifier 'a'}}19 20# RUN: echo "int main(){return 0;}">%t.c21# RUN: %clang_host %t.c -o %t.exe22# RUN: echo quit | %lldb %t.exe -o "b main" -o r -o \23# RUN: "expr --top-level -- template<typename T> T FOO(T x) { return x/2;}" -o \24# RUN: "expression -- FOO(\"\")" 2>&1 | FileCheck %s --check-prefix=CHECK425# (lldb) expression -- FOO("")26# CHECK4:{{^ \^}}27# CHECK4: {{^ note: in instantiation of function template}}28# CHECK4: error: <user expression29 30# RUN: echo expression --\na\n+\nb31# RUN: cat %S/Inputs/multiline-expr.txt | %lldb 2>&1 | FileCheck %s --strict-whitespace --check-prefix=CHECK532# CHECK5: error: <user{{.*}}a33# CHECK5: error: <user{{.*}}b34