aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-05-03 23:38:51 +0000
committerBob Wilson <bob.wilson@apple.com>2012-05-03 23:38:51 +0000
commit927a57cb8fb4134dec68997a476d84a15b29f9a8 (patch)
treecadcbed4d1c3d327db3f6a71f10d168177173579 /test/Sema/format-strings.c
parent82047c16486a28537746cfcc0d63745292b9fc54 (diff)
Add a test for r156092.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 086c5c6d6f..7e968899ac 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs %s
#include <stdarg.h>
typedef __typeof(sizeof(int)) size_t;
@@ -521,3 +521,10 @@ void test_other_formats() {
dateformat(""); // expected-warning{{format string is empty}}
dateformat(str); // no-warning (using strftime non literal is not unsafe)
}
+
+// Do not warn about unused arguments coming from system headers.
+// <rdar://problem/11317765>
+#include <format-unused-system-args.h>
+void test_unused_system_args(int x) {
+ PRINT1("%d\n", x); // no-warning{{extra argument is system header is OK}}
+}