pointee type is scalar type, create element region regardless with the sizes
of types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71360
91177308-0d34-0410-b5e6-
96231b3b80d8
uint64_t PointeeTySize = getContext().getTypeSize(PointeeTy);
uint64_t ObjTySize = getContext().getTypeSize(ObjTy);
- if (PointeeTySize > 0 && PointeeTySize < ObjTySize) {
+ if ((PointeeTySize > 0 && PointeeTySize < ObjTySize) ||
+ (ObjTy->isAggregateType() && PointeeTy->isScalarType())) {
// Record the cast type of the region.
state = setCastType(state, R, ToTy);
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
-// XFAIL
unsigned foo();
typedef struct bf { unsigned x:2; } bf;