reject invalid escape characters in extended-asm strings with a nice diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66605 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index 3acb58a..d429b94 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -50,13 +50,16 @@
}
// <rdar://problem/6512595>
-void test5()
-{
+void test5() {
asm("nop" : : "X" (8));
}
// PR3385
-void test6(long i)
-{
+void test6(long i) {
asm("nop" : : "er"(i));
}
+
+void test7() {
+ asm("%!"); // simple asm string, %! is not an error.
+ asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}}
+}