Add a simple test testing the new functionality.

This commit is contained in:
Baozeng Ding 2013-08-14 20:36:33 +02:00 committed by sftnight
parent 10602d688f
commit 4f70eafbfd

View 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