Add the new diagnostic as a patch.
This commit is contained in:
parent
eef395f046
commit
6b26c3a415
13
patches/clang_diags.diff
Normal file
13
patches/clang_diags.diff
Normal 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<
|
Loading…
x
Reference in New Issue
Block a user