summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/format-strings-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/format-strings-0x.cpp')
-rw-r--r--test/SemaCXX/format-strings-0x.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/format-strings-0x.cpp b/test/SemaCXX/format-strings-0x.cpp
index e7c5904..7b3aef1 100644
--- a/test/SemaCXX/format-strings-0x.cpp
+++ b/test/SemaCXX/format-strings-0x.cpp
@@ -12,4 +12,16 @@ void f(char **sp, float *fp) {
scanf("%afoobar", fp);
printf(nullptr);
printf(*sp); // expected-warning {{not a string literal}}
+
+ // PR13099
+ printf(
+ R"foobar(%)foobar"
+ R"bazquux(d)bazquux" // expected-warning {{more '%' conversions than data arguments}}
+ R"xyzzy()xyzzy");
+
+ printf(u8"this is %d test", 0); // ok
+ printf(u8R"foo(
+ \u1234\U0010fffe
+ %d)foo" // expected-warning {{more '%' conversions than data arguments}}
+ );
}
OpenPOWER on IntegriCloud