Add another expected to pass construct for null deref.

This commit is contained in:
Vassil Vassilev 2013-08-08 11:27:09 +02:00 committed by sftnight
parent a571d69951
commit a0850bbf4c

View File

@ -12,4 +12,13 @@ public:
};
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]}}
struct AggregatedNull {
AggregatedNull() : m(0) {}
MyClass m;
}
AggregatedNull agrNull;
agrNull.m->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