diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-02-13 10:32:27 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-02-13 10:32:27 +0000 |
commit | 4ee01ef7bd170b6f3f3f71882b407cd6408c5b1e (patch) | |
tree | d209594d27ccc3ce403fbeec2adc72c02f132fd3 /test/Sema/format-strings.c | |
parent | 86c3ae46250cdcc57778c27826060779a92f3815 (diff) |
Fix typo in PrintfConversionSpecifier::isDoubleArg()
This makes the printf diagnostics issue warnigns for %a, %A, %e, etc.
when used with the wrong argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index dcff75a07a..a7b40f8a55 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -471,6 +471,8 @@ void pr9751() { const char kFormat17[] = "%hu"; // expected-note{{format string is defined here}}} printf(kFormat17, (int[]){0}); // expected-warning{{format specifies type 'unsigned short' but the argument}} + + printf("%a", (long double)0); // expected-warning{{format specifies type 'double' but the argument has type 'long double'}} } // PR 9466: clang: doesn't know about %Lu, %Ld, and %Lx |