forked from OSchip/llvm-project
parent
4e424b85e3
commit
6a65819ba3
|
@ -279,7 +279,6 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
|
|||
case CK_Dependent:
|
||||
case CK_ArrayToPointerDecay:
|
||||
case CK_BitCast:
|
||||
case CK_LValueBitCast:
|
||||
case CK_IntegralCast:
|
||||
case CK_NullToPointer:
|
||||
case CK_IntegralToPointer:
|
||||
|
@ -378,7 +377,8 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
|
|||
case CK_UserDefinedConversion:
|
||||
case CK_ConstructorConversion:
|
||||
case CK_VectorSplat:
|
||||
case CK_MemberPointerToBoolean: {
|
||||
case CK_MemberPointerToBoolean:
|
||||
case CK_LValueBitCast: {
|
||||
// Recover some path-sensitivty by conjuring a new value.
|
||||
QualType resultType = CastE->getType();
|
||||
if (CastE->isGLValue())
|
||||
|
|
|
@ -57,3 +57,10 @@ void testRadar11487525_1(){
|
|||
bool s[25];
|
||||
addressof(s);
|
||||
}
|
||||
|
||||
// radar://11487525 Don't crash on CK_LValueBitCast.
|
||||
bool begin(double *it) {
|
||||
typedef bool type[25];
|
||||
bool *a = reinterpret_cast<type &>(*( reinterpret_cast<char *>( it )));
|
||||
return *a;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue