[clang] bad error message on incorrect string literal #18079 (PR #81670)

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 14 11:13:13 PST 2024


================
@@ -0,0 +1,5 @@
+// RUN: not  %clang_cc1 -E %s 2>&1 | grep 'error: invalid newline character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string'
----------------
jroelofs wrote:

Please use `-fsyntax-only -verify` instead of `grep` for checking diagnostics. There are some examples in sibling files, but the gist of it is that you'll need a `// expected-error at +1{{invalid newline character...}}` on the line before the declaration.

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


More information about the cfe-commits mailing list