[analyzer][NFC] Inline ExprEngine::evalComplement
authorBalazs Benics <balazs.benics@sigmatechnology.se>
Fri, 27 May 2022 08:07:06 +0000 (10:07 +0200)
committerBalazs Benics <balazs.benics@sigmatechnology.se>
Fri, 27 May 2022 08:07:06 +0000 (10:07 +0200)
Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D126124

clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp

index fe558fc..c79cd77 100644 (file)
@@ -590,10 +590,6 @@ public:
     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,
index 21fd46e..470a56c 100644 (file)
@@ -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?