[llvm] [MC,ELF] Emit warning if a string constant contains newline char. (PR #98060)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 01:30:13 PDT 2024
================
@@ -0,0 +1,54 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64 %s 2>&1 -o /dev/null | FileCheck -DFILE=%s --strict-whitespace %s --implicit-check-not="{{[0-9]+:[0-9]+: warning: unterminated string}}" --check-prefix=CHECK-WARN
----------------
s-barannikov wrote:
```suggestion
// RUN: llvm-mc -filetype=obj -triple x86_64 %s 2>&1 -o /dev/null \
// | FileCheck %s --implicit-check-not="{{[0-9]+:[0-9]+: warning: unterminated string}}" --check-prefix=CHECK-WARN
```
-DFILE is unused and --strict-whitespace no longer seems necessary (?)
Long RUN lines can be split into multiple by the backslash character.
https://github.com/llvm/llvm-project/pull/98060
More information about the llvm-commits
mailing list