Index: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp =================================================================== --- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -282,22 +282,6 @@ return state; } -ProgramStateRef ExprEngine::handleLVectorSplat( - ProgramStateRef state, const LocationContext* LCtx, const CastExpr* CastE, - StmtNodeBuilder &Bldr, ExplodedNode* Pred) { - // Recover some path sensitivity by conjuring a new value. - QualType resultType = CastE->getType(); - if (CastE->isGLValue()) - resultType = getContext().getPointerType(resultType); - SVal result = svalBuilder.conjureSymbolVal(nullptr, CastE, LCtx, - resultType, - currBldrCtx->blockCount()); - state = state->BindExpr(CastE, LCtx, result); - Bldr.generateNode(CastE, Pred, state); - - return state; -} - void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) { @@ -535,13 +519,25 @@ continue; } // Explicitly proceed with default handler for this case cascade. - state = handleLVectorSplat(state, LCtx, CastE, Bldr, Pred); + QualType resultType = CastE->getType(); + if (CastE->isGLValue()) + resultType = getContext().getPointerType(resultType); + SVal result = svalBuilder.conjureSymbolVal( + nullptr, CastE, LCtx, resultType, currBldrCtx->blockCount()); + state = state->BindExpr(CastE, LCtx, result); + Bldr.generateNode(CastE, Pred, state); continue; } // Various C++ casts that are not handled yet. case CK_ToUnion: case CK_VectorSplat: { - state = handleLVectorSplat(state, LCtx, CastE, Bldr, Pred); + QualType resultType = CastE->getType(); + if (CastE->isGLValue()) + resultType = getContext().getPointerType(resultType); + SVal result = svalBuilder.conjureSymbolVal( + nullptr, CastE, LCtx, resultType, currBldrCtx->blockCount()); + state = state->BindExpr(CastE, LCtx, result); + Bldr.generateNode(CastE, Pred, state); continue; } case CK_MatrixCast: {