diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-26 05:35:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-26 05:35:51 +0000 |
commit | 9af03022ffbbc2ff008296b5d19d98e13b109b1e (patch) | |
tree | e3c4709cf4b92b6c86ebd60e50a78a005c30d994 /clang/test/Sema/format-strings.c | |
parent | b48414f4cbe45035cf37f1c6c06ca8a2be67abb6 (diff) | |
download | bcm5719-llvm-9af03022ffbbc2ff008296b5d19d98e13b109b1e.tar.gz bcm5719-llvm-9af03022ffbbc2ff008296b5d19d98e13b109b1e.zip |
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
<rdar://problem/8026030>.
llvm-svn: 104684
Diffstat (limited to 'clang/test/Sema/format-strings.c')
-rw-r--r-- | clang/test/Sema/format-strings.c | 3 |
1 files changed, 3 insertions, 0 deletions
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}} +} |