From 9af03022ffbbc2ff008296b5d19d98e13b109b1e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 26 May 2010 05:35:51 +0000 Subject: Tell the string literal parser when it's not permitted to emit diagnostics. That would be while we're parsing string literals for the sole purpose of producing a diagnostic about them. Fixes . llvm-svn: 104684 --- clang/test/Sema/format-strings.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/test') diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c index bdc2bb0c9ab..d6d37961d92 100644 --- a/clang/test/Sema/format-strings.c +++ b/clang/test/Sema/format-strings.c @@ -251,3 +251,6 @@ void test_pr_6697() { myprintf_PR_6697("%1$s\n", 1, (int) 0); // expected-warning{{conversion specifies type 'char *' but the argument has type 'int'}} } +void rdar8026030(FILE *fp) { + fprintf(fp, "\%"); // expected-warning{{incomplete format specifier}} +} -- cgit v1.2.3