[llvm] [objcopy] Return an error in case of an invalid regex (PR #74319)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 01:00:54 PST 2023


================
@@ -0,0 +1,20 @@
+## Test if providing objcopy with an invalid regex generates an error.
+
+# RUN: yaml2obj %s -o %t
+
+# RUN: not llvm-objcopy --regex --strip-symbol='f[^)' %t /dev/null 2>&1 | FileCheck %s
+# CHECK: cannot compile regular expression
----------------
jh7370 wrote:

Please include the regex pattern and "error:" prefix in the message matching, to show that a) it is an error, not a warning, and b) that the pattern is formatted as expected.

https://github.com/llvm/llvm-project/pull/74319


More information about the llvm-commits mailing list