aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM, thank you for this!



================
Comment at: clang/test/Sema/format-strings-pedantic.c:1
-// RUN: %clang_cc1 -fsyntax-only -verify -Wformat -Wformat-pedantic -isystem 
%S/Inputs %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wformat -Wformat-type-confusion %s
 
----------------
erik.pilkington wrote:
> aaron.ballman wrote:
> > Are we losing test coverage for `-Wformat-pedantic`, or do we have other 
> > tests covering that elsewhere? I would have expected this test file's 
> > contents to exercise pedantic cases.
> The only warning that was in this file is now under -Wformat-type-confusion. 
> New patch adds a test for the `printf("%p", (int*)0);` thing, which was 
> otherwise untested.
Thank you for adding that!


================
Comment at: clang/test/Sema/format-type-confusion.c:13
+         b, // expected-warning {{format specifies type 'unsigned short' but 
the argument has type '_Bool'}}
+         b, b, b, b, b);
+
----------------
erik.pilkington wrote:
> aaron.ballman wrote:
> > Just double-checking, but the reason we don't diagnose the `%c` here is 
> > because of `-Wno-format`?
> Yup, exactly. I just wanted to test -Wformat-type-confusion alone in this 
> file. 
Awesome, thank you for the verification!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67775/new/

https://reviews.llvm.org/D67775



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to