diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index afd4e0e2e022..3011b7f25fad 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -1286,8 +1286,6 @@ bool PointerExprEvaluator::VisitCastExpr(const CastExpr* E) { // Now figure out the necessary offset to add to the baseLV to get from // the derived class to the base class. - CharUnits Offset = CharUnits::Zero(); - QualType Ty = E->getSubExpr()->getType(); const CXXRecordDecl *DerivedDecl = Ty->getAs()->getPointeeType()->getAsCXXRecordDecl(); diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 8ba371452d74..86570cb5d759 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -540,11 +540,9 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U, ExplodedNode *Pred, ExplodedNodeSet &Dst) { StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext); - bool IncDec = false; switch (U->getOpcode()) { default: { Bldr.takeNodes(Pred); - IncDec = true; ExplodedNodeSet Tmp; VisitIncrementDecrementOperator(U, Pred, Tmp); Bldr.addNodes(Tmp);