[Lldb-commits] [PATCH] D129261: [lldb/test] Add Shell/Expr/TestStringLiteralExpr.test

Jesus Checa Hidalgo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 7 01:47:27 PDT 2022


jchecahi updated this revision to Diff 442819.
jchecahi added a comment.

[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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129261/new/

https://reviews.llvm.org/D129261

Files:
  lldb/test/Shell/Expr/TestStringLiteralExpr.test


Index: lldb/test/Shell/Expr/TestStringLiteralExpr.test
===================================================================
--- /dev/null
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129261.442819.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220707/9630e18f/attachment.bin>


More information about the lldb-commits mailing list