aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-25 18:18:56 +0000
committerChris Lattner <sabre@nondot.org>2009-05-25 18:18:56 +0000
commit3f76ae12b90f9a911fccc3612c2d4ba79b5a8b55 (patch)
tree3dd89ded63e6bd9b93950cf0a5e4ff89717d9aaa
parent2b68eb342c33cd7b490a89c41ce67e60b2d6058c (diff)
reword a warning for clarity
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72391 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--test/Sema/nonnull-check.c12
2 files changed, 8 insertions, 7 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index bcf4774ca6..1c6c7f2e7c 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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<
diff --git a/test/Sema/nonnull-check.c b/test/Sema/nonnull-check.c
index dc0928477e..8454c7ca74 100644
--- a/test/Sema/nonnull-check.c
+++ b/test/Sema/nonnull-check.c
@@ -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}}
}