Add an XFAIL-ing test, as TODO for Baozeng.
This commit is contained in:
parent
9bb1eae342
commit
66514e8d09
15
test/NullDeref/MethodCalls.C
Normal file
15
test/NullDeref/MethodCalls.C
Normal file
@ -0,0 +1,15 @@
|
||||
// RUN: cat %s | %cling -Xclang -verify
|
||||
// This test verifies that we get nice warning if a method on null ptr object is
|
||||
// called.
|
||||
// XFAIL:*
|
||||
extern "C" int printf(const char* fmt, ...);
|
||||
class MyClass {
|
||||
private:
|
||||
int a;
|
||||
public:
|
||||
MyClass() : a(1){}
|
||||
int getA(){return a;}
|
||||
};
|
||||
MyClass* my = 0;
|
||||
my->getA() // 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