In getStaticSize, case of FieldRegionKind should return size of pointee type of the member. In the following example:
struct B {
	int x;
	int y;
	int z;
};
class A{
public:
	void foo(){
		m++;
	}
private:
	B *m;
};getDynamicElementCount of m region, if getDynamicExtent return the pointer size, getDynamicElementCount returns 0 in 64bit architecture(since pointer size is 8 while size of pointee type is 12). Use pointee type instead, it will return 1.