Skip to content

Commit

Permalink
[analyzer][NFC] Inline ExprEngine::evalComplement
Browse files Browse the repository at this point in the history
Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126124
  • Loading branch information
Balazs Benics committed May 27, 2022
1 parent d6708b7 commit 7a2d6de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -590,10 +590,6 @@ class ExprEngine {
return X.isValid() ? svalBuilder.evalMinus(X.castAs<NonLoc>()) : X;
}

SVal evalComplement(SVal X) {
return X.isValid() ? svalBuilder.evalComplement(X.castAs<NonLoc>()) : X;
}

ProgramStateRef handleLValueBitCast(ProgramStateRef state, const Expr *Ex,
const LocationContext *LCtx, QualType T,
QualType ExTy, const CastExpr *CastE,
Expand Down
3 changes: 2 additions & 1 deletion clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
Expand Up @@ -1029,7 +1029,8 @@ void ExprEngine::VisitUnaryOperator(const UnaryOperator* U, ExplodedNode *Pred,
llvm_unreachable("Invalid Opcode.");
case UO_Not:
// FIXME: Do we need to handle promotions?
state = state->BindExpr(U, LCtx, evalComplement(V.castAs<NonLoc>()));
state = state->BindExpr(
U, LCtx, svalBuilder.evalComplement(V.castAs<NonLoc>()));
break;
case UO_Minus:
// FIXME: Do we need to handle promotions?
Expand Down

0 comments on commit 7a2d6de

Please sign in to comment.