diff options
author | Nico Weber <nicolasweber@gmx.de> | 2017-05-05 16:11:08 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2017-05-05 16:11:08 +0000 |
commit | dc1f3e5a2b9639e3ceb052cd291b3cd58e7c17ae (patch) | |
tree | 6d285a33a0583e145449017a647a03cf12a16445 /include/clang/Basic/DiagnosticSemaKinds.td | |
parent | efcdd0646b1e94f7b2f92dd2945622d868fd5eae (diff) |
Introduce Wzero-as-null-pointer-constant.
Add an opt-in warning that fires when 0 is used as a null pointer.
gcc has this warning, and there's some demand for it.
https://reviews.llvm.org/D32914
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 0a80c46b7e..444dd978ae 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -8975,6 +8975,9 @@ def warn_nullability_lost : Warning< "implicit conversion from nullable pointer %0 to non-nullable pointer " "type %1">, InGroup<NullableToNonNullConversion>, DefaultIgnore; +def warn_zero_as_null_pointer_constant : Warning< + "zero as null pointer constant">, + InGroup<DiagGroup<"zero-as-null-pointer-constant">>, DefaultIgnore; def err_nullability_cs_multilevel : Error< "nullability keyword %0 cannot be applied to multi-level pointer type %1">; |