Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.
llvm-svn: 73482
diff --git a/clang/lib/Analysis/Store.cpp b/clang/lib/Analysis/Store.cpp
index 13326ab..5aa756e 100644
--- a/clang/lib/Analysis/Store.cpp
+++ b/clang/lib/Analysis/Store.cpp
@@ -90,7 +90,8 @@
// FIXME: Is this the right thing to do in all cases?
const TypedRegion *Base = isa<ElementRegion>(TR) ?
cast<TypedRegion>(TR->getSuperRegion()) : TR;
- ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base);
+ ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base,
+ StateMgr.getContext());
return CastResult(state, ER);
}
}