[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 3 21:52:38 PDT 2019
erik.pilkington added inline comments.
================
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
----------------
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.
================
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);
+
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67775/new/
https://reviews.llvm.org/D67775
More information about the cfe-commits
mailing list