summaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2019-09-18 19:05:14 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2019-09-18 19:05:14 +0000
commit7a6d9c12018b01e8d97ccb88367f24d7f38351cc (patch)
tree59c3b6a222dfe7452c9ee64fb42c794bb4884fb7 /include/clang/Basic
parentda7c99cf283cf1773550f372cb50d3320db77e92 (diff)
downloadclang-7a6d9c12018b01e8d97ccb88367f24d7f38351cc.tar.gz
[Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd
Also, add a diagnostic under -Wformat for printing a boolean value as a character. rdar://54579473 Differential revision: https://reviews.llvm.org/D66856 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index b89bd36757..8dd72d27e3 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -8145,6 +8145,9 @@ def warn_printf_invalid_objc_flag: Warning<
def warn_scanf_scanlist_incomplete : Warning<
"no closing ']' for '%%[' in scanf format string">,
InGroup<Format>;
+def warn_format_bool_as_character : Warning<
+ "using '%0' format specifier, but argument has boolean value">,
+ InGroup<Format>;
def note_format_string_defined : Note<"format string is defined here">;
def note_format_fix_specifier : Note<"did you mean to use '%0'?">;
def note_printf_c_str: Note<"did you mean to call the %0 method?">;