aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 2325454c0b..9e8007b9b0 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -301,3 +301,10 @@ void pr7981(wint_t c, wchar_t c2) {
printf("%lc", c2); // no-warning
}
+// <rdar://problem/8269537> -Wformat-security says NULL is not a string literal
+void r8269537() {
+ // This is likely to crash in most cases, but -Wformat-nonliteral technically
+ // doesn't warn in this case.
+ printf(0); // no-warning
+}
+