diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index b4eb4b8e194a..1dc5118d9e89 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -838,7 +838,8 @@ SVal RegionStoreManager::Retrieve(const GRState *state, Loc L, QualType T) { SVal idx = ValMgr.makeIntVal(0, Ctx.IntTy); R = MRMgr.getElementRegion(T, idx, R, Ctx); RTy = T; - assert(RTy == R->getValueType(Ctx)); + assert(Ctx.getCanonicalType(RTy) == + Ctx.getCanonicalType(R->getValueType(Ctx))); } if (RTy->isStructureType())