================
@@ -157,3 +157,33 @@ unexpected b; // expected-error@33 1-1 {{unknown type}}
 // what-error {{huh?}}
 // CHECK9: error: 'what-error' diagnostics expected but not seen:
 #endif
+
+#ifdef TEST_WIDE_DELIM
+// RUN: not %clang_cc1 -DTEST_WIDE_DELIM -verify %s 2>&1 | FileCheck 
-check-prefix=CHECK-WIDE-DELIM %s
+
+// expected-error {{{some message with {{}} in it}}}
+// expected-error {{{some message with  {}} in it}}}
+// expected-error {{{some message with {{}  in it}}}
+
+// expected-error-re {{{some {{.*}} regex with double braces}}}
+// expected-error-re {{{some message with {{}  in it}}}
+
+// expected-error {{{mismatched delim}}
+// expected-error-re {{{mismatched re {{.*} }}}
+// expected-error-re {{{no regex}}}
+
+#if 0
----------------
sethp wrote:

Copypasta that separates out the FileCheck directives from the frontend 
verifier directives: FileCheck has no preprocessor and just "sees" the file as 
a sequence of bytes, but the clang frontend helpfully hides `#if 0`'d content 
from itself.

It looks like for this test it doesn't actually need to be there, since the 
`expected-error` substring in the FileCheck directive looks enough "unlike" 
what the frontend is looking for so as not to confuse it, though.

https://github.com/llvm/llvm-project/pull/77326
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to