Spell correctly expected-warning and not warning expected. Call a function with non null and check the expected result.

This commit is contained in:
Vassil Vassilev 2013-08-16 22:47:00 +02:00 committed by sftnight
parent 2152ad4c7d
commit f3ccb10135

View File

@ -22,9 +22,10 @@ extern "C" int cannotCallWithNull(int* p) {
return 1;
}
cannotCallWithNull() // warning-expected {{null passed to a callee which requires a non-null argument}}
cannotCallWithNull() // expected-warning {{null passed to a callee which requires a non-null argument}}
// expected-warning {{you are about to dereference null ptr, which probably will lead to seg violation. Do you want to proceed?[y/n]}}
//CHECK-NOT: Must not be called with p=0.
cannotCallWithNull(new int(4))
//CHECK: (int) 1