Add a simple test testing the new functionality.
This commit is contained in:
parent
10602d688f
commit
4f70eafbfd
9
test/NullDeref/NonNullArg.C
Normal file
9
test/NullDeref/NonNullArg.C
Normal file
@ -0,0 +1,9 @@
|
||||
// RUN: cat %s | %cling -Xclang -verify
|
||||
|
||||
//This file checks a call instruction. The called function has arguments with nonnull attribute.
|
||||
#include <string.h>
|
||||
char *p;
|
||||
strcmp("a", p); // expected-warning {{you are about to dereference null ptr, which probably will lead to seg violation. Do you want to proceed?[y/n]}}
|
||||
|
||||
strcmp(p, "a"); // expected-warning {{you are about to dereference null ptr, which probably will lead to seg violation. Do you want to proceed?[y/n]}}
|
||||
.q
|
Loading…
x
Reference in New Issue
Block a user