// }
assert(Loc::isLocType(originalTy) || originalTy->isFunctionType() ||
- originalTy->isBlockPointerType());
+ originalTy->isBlockPointerType() || castTy->isReferenceType());
StoreManager &storeMgr = StateMgr.getStoreManager();
// Now assume we are casting from pointer to pointer. Other cases should
// already be handled.
- QualType PointeeTy = CastToTy->getAs<PointerType>()->getPointeeType();
+ QualType PointeeTy = CastToTy->getPointeeType();
QualType CanonPointeeTy = Ctx.getCanonicalType(PointeeTy);
// Handle casts to void*. We just pass the region through.
return !false;
}
+void *f4(int* w) {
+ return reinterpret_cast<void*&>(w);
+}
+
namespace {
struct A { };
}
}
+
+namespace {
+
+struct S {
+ void *p;
+};
+
+void *f(S* w) {
+ return &reinterpret_cast<void*&>(*w);
+}
+
+}