Author: Balazs Benics Date: 2022-05-27T10:07:06+02:00 New Revision: 81066603a8b91ec3edf59622d153ba40f0b4a169
URL: https://github.com/llvm/llvm-project/commit/81066603a8b91ec3edf59622d153ba40f0b4a169 DIFF: https://github.com/llvm/llvm-project/commit/81066603a8b91ec3edf59622d153ba40f0b4a169.diff LOG: [analyzer][NFC] Remove unused nonloc::ConcreteInt::evalBinOp Reviewed By: martong Differential Revision: https://reviews.llvm.org/D126129 Added: Modified: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h clang/lib/StaticAnalyzer/Core/SVals.cpp Removed: ################################################################################ diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index 29840e7cafd9..30fe5f78a828 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -390,10 +390,7 @@ class ConcreteInt : public NonLoc { return *static_cast<const llvm::APSInt *>(Data); } - // Transfer functions for binary/unary operations on ConcreteInts. - SVal evalBinOp(SValBuilder &svalBuilder, BinaryOperator::Opcode Op, - const ConcreteInt& R) const; - + // Transfer functions for unary operations on ConcreteInts. ConcreteInt evalComplement(SValBuilder &svalBuilder) const; ConcreteInt evalMinus(SValBuilder &svalBuilder) const; diff --git a/clang/lib/StaticAnalyzer/Core/SVals.cpp b/clang/lib/StaticAnalyzer/Core/SVals.cpp index cf4927400df9..96bc2bbed98b 100644 --- a/clang/lib/StaticAnalyzer/Core/SVals.cpp +++ b/clang/lib/StaticAnalyzer/Core/SVals.cpp @@ -276,18 +276,6 @@ bool SVal::isZeroConstant() const { // Transfer function dispatch for Non-Locs. //===----------------------------------------------------------------------===// -SVal nonloc::ConcreteInt::evalBinOp(SValBuilder &svalBuilder, - BinaryOperator::Opcode Op, - const nonloc::ConcreteInt& R) const { - const llvm::APSInt* X = - svalBuilder.getBasicValueFactory().evalAPSInt(Op, getValue(), R.getValue()); - - if (X) - return nonloc::ConcreteInt(*X); - else - return UndefinedVal(); -} - nonloc::ConcreteInt nonloc::ConcreteInt::evalComplement(SValBuilder &svalBuilder) const { return svalBuilder.makeIntVal(~getValue()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits