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 | b90f4b3fb94056609da9cca5eef7358d95a363b2 (patch) | |
tree | 512a4ad9da7041f437030b121f1d65a747e8f30e /test/Sema/format-strings.c | |
parent | aa230b7bd2054e70e9500aff584845cb1cc34ca7 (diff) |
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index bdc2bb0c9a..d6d37961d9 100644 --- a/test/Sema/format-strings.c +++ b/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}} +} |