summaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticSemaKinds.td
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-05-31 04:12:14 +0000
committerJordan Rose <jordan_rose@apple.com>2014-05-31 04:12:14 +0000
commita0ea5b8f25880fa9f07d9b210afccf5e40271a99 (patch)
tree96dbb40393674b18629c91d622f27757a934092b /include/clang/Basic/DiagnosticSemaKinds.td
parenta217888b66795e432b938ba7686dd0155d41d335 (diff)
downloadclang-a0ea5b8f25880fa9f07d9b210afccf5e40271a99.tar.gz
clang-a0ea5b8f25880fa9f07d9b210afccf5e40271a99.tar.bz2
clang-a0ea5b8f25880fa9f07d9b210afccf5e40271a99.tar.xz
Format strings: check against an enum's underlying type.
This allows us to be more careful when dealing with enums whose fixed underlying type requires special handling in a format string, like NSInteger. A refinement of r163266 from a year and a half ago, which added the special handling for NSInteger and friends in the first place. <rdar://problem/16616623> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index da011e4615..175a5a94a6 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -6295,12 +6295,13 @@ def warn_missing_format_string : Warning<
def warn_scanf_nonzero_width : Warning<
"zero field width in scanf format string is unused">,
InGroup<Format>;
-def warn_printf_conversion_argument_type_mismatch : Warning<
- "format specifies type %0 but the argument has type %1">,
+def warn_format_conversion_argument_type_mismatch : Warning<
+ "format specifies type %0 but the argument has "
+ "%select{type|underlying type}2 %1">,
InGroup<Format>;
def warn_format_argument_needs_cast : Warning<
- "values of type '%0' should not be used as format arguments; add an explicit "
- "cast to %1 instead">,
+ "%select{values of type|enum values with underlying type}2 '%0' should not "
+ "be used as format arguments; add an explicit cast to %1 instead">,
InGroup<Format>;
def warn_printf_positional_arg_exceeds_data_args : Warning <
"data argument position '%0' exceeds the number of data arguments (%1)">,