reword a warning for clarity

llvm-svn: 72391
This commit is contained in:
Chris Lattner 2009-05-25 18:18:56 +00:00
parent 31cadd77ef
commit c7516835c3
2 changed files with 8 additions and 7 deletions

View File

@ -1624,7 +1624,8 @@ def warn_printf_invalid_conversion : Warning<
def warn_printf_missing_format_string : Warning<
"format string missing">, InGroup<Format>;
def warn_null_arg : Warning<
"argument is null where non-null is required">, InGroup<NonNull>;
"null passed to a callee which requires a non-null argument">,
InGroup<NonNull>;
def warn_printf_empty_format_string : Warning<
"format string is empty">, InGroup<FormatZeroLength>;
def warn_printf_format_string_is_wide_literal : Warning<

View File

@ -13,14 +13,14 @@ foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)())
{
func1(cp1, cp2, i1);
func1(0, cp2, i1); // expected-warning {{argument is null where non-null is required}}
func1(cp1, 0, i1); // expected-warning {{argument is null where non-null is required}}
func1(0, cp2, i1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func1(cp1, 0, i1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func1(cp1, cp2, 0);
func3(0, i2, cp3, i3); // expected-warning {{argument is null where non-null is required}}
func3(cp3, i2, 0, i3); // expected-warning {{argument is null where non-null is required}}
func3(0, i2, cp3, i3); // expected-warning {{null passed to a callee which requires a non-null argument}}
func3(cp3, i2, 0, i3); // expected-warning {{null passed to a callee which requires a non-null argument}}
func4(0, cp1); // expected-warning {{argument is null where non-null is required}}
func4(cp1, 0); // expected-warning {{argument is null where non-null is required}}
func4(0, cp1); // expected-warning {{null passed to a callee which requires a non-null argument}}
func4(cp1, 0); // expected-warning {{null passed to a callee which requires a non-null argument}}
}