[Lldb-commits] [lldb] b042d15 - [lldb/test] Add Shell/Expr/TestStringLiteralExpr.test
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 8 01:01:20 PDT 2022
Author: Jesus Checa Hidalgo
Date: 2022-07-08T10:01:07+02:00
New Revision: b042d15d2e39eea528c51a30fe637b9ea84250d3
URL: https://github.com/llvm/llvm-project/commit/b042d15d2e39eea528c51a30fe637b9ea84250d3
DIFF: https://github.com/llvm/llvm-project/commit/b042d15d2e39eea528c51a30fe637b9ea84250d3.diff
LOG: [lldb/test] Add Shell/Expr/TestStringLiteralExpr.test
This test should exercise the usage of expressions containing
string literals and ensure that lldb doesn't crash.
Differential Revision: https://reviews.llvm.org/D129261
Added:
lldb/test/Shell/Expr/TestStringLiteralExpr.test
Modified:
Removed:
################################################################################
diff --git a/lldb/test/Shell/Expr/TestStringLiteralExpr.test b/lldb/test/Shell/Expr/TestStringLiteralExpr.test
new file mode 100644
index 0000000000000..89570599f8f4f
--- /dev/null
+++ b/lldb/test/Shell/Expr/TestStringLiteralExpr.test
@@ -0,0 +1,11 @@
+# RUN: echo "int main() { return 0; }" | %clang_host -x c -o %t -
+# RUN: %lldb -s %s %t | FileCheck %s
+
+# Make sure that lldb doesn't crash when evaluating expressions with string literals
+b main
+run
+expr "hello there"
+expr printf("hello there")
+
+# CHECK: (const char[12]) $0 = "hello there"
+# CHECK: (int) $1 = 11
More information about the lldb-commits
mailing list