// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
// rdar://problem/64202361
structA{int a;struct{struct{int b;union{int c;};};};};inttestCrash(){int*x =0;int A::*ap =&A::a;if(ap)// no crash
return*x;// expected-warning{{Dereference of null pointer (loaded from variable 'x')}}
return10;}inttestIndirectCrash(){int*x =0;int A::*cp =&A::c;if(cp)// no crash
return*x;// expected-warning{{Dereference of null pointer (loaded from variable 'x')}}
return10;}// PR46264
// This case shall not crash with an assertion failure about void* dereferening.
namespacens1{namespacea{classb{public:typedefint b::*c;operatorc(){return d ?&b::d :0;}int d;};}// namespace a
using a::b;classe{voidf();voidg();
b h;};voide::f(){
e *i;if(h)
i->g();// expected-warning{{Called C++ object pointer is uninitialized}}
}}// namespace ns1