Add the new diagnostic as a patch.

This commit is contained in:
Vassil Vassilev 2013-07-27 21:09:24 +03:00 committed by sftnight
parent eef395f046
commit 6b26c3a415

13
patches/clang_diags.diff Normal file
View File

@ -0,0 +1,13 @@
Index: tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- tools/clang/include/clang/Basic/DiagnosticSemaKinds.td (版本 179269)
+++ tools/clang/include/clang/Basic/DiagnosticSemaKinds.td (工作副本)
@@ -5736,6 +5736,8 @@
def warn_null_arg : Warning<
"null passed to a callee which requires a non-null argument">,
InGroup<NonNull>;
+def warn_null_ptr_deref: Warning<
+ "you are about to dereference null ptr, which probably will lead to seg violation. Do you want to proceed?[y/n]">;
// CHECK: returning address/reference of stack memory
def warn_ret_stack_addr : Warning<