Author: Balazs Benics Date: 2022-05-27T10:07:06+02:00 New Revision: 813acb12972eceabd2b5b06f2c11d3a1f34579bd
URL: https://github.com/llvm/llvm-project/commit/813acb12972eceabd2b5b06f2c11d3a1f34579bd DIFF: https://github.com/llvm/llvm-project/commit/813acb12972eceabd2b5b06f2c11d3a1f34579bd.diff LOG: [analyzer][NFC] Remove unused SVal::hasConjuredSymbol Reviewed By: martong Differential Revision: https://reviews.llvm.org/D126130 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 30fe5f78a828..f153e97d2d44 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -154,9 +154,6 @@ class SVal { bool isZeroConstant() const; - /// hasConjuredSymbol - If this SVal wraps a conjured symbol, return true; - bool hasConjuredSymbol() const; - /// getAsFunctionDecl - If this SVal is a MemRegionVal and wraps a /// CodeTextRegion wrapping a FunctionDecl, return that FunctionDecl. /// Otherwise return 0. diff --git a/clang/lib/StaticAnalyzer/Core/SVals.cpp b/clang/lib/StaticAnalyzer/Core/SVals.cpp index 96bc2bbed98b..963861c136c3 100644 --- a/clang/lib/StaticAnalyzer/Core/SVals.cpp +++ b/clang/lib/StaticAnalyzer/Core/SVals.cpp @@ -43,25 +43,6 @@ using namespace ento; // Utility methods. //===----------------------------------------------------------------------===// -bool SVal::hasConjuredSymbol() const { - if (Optional<nonloc::SymbolVal> SV = getAs<nonloc::SymbolVal>()) { - SymbolRef sym = SV->getSymbol(); - if (isa<SymbolConjured>(sym)) - return true; - } - - if (Optional<loc::MemRegionVal> RV = getAs<loc::MemRegionVal>()) { - const MemRegion *R = RV->getRegion(); - if (const auto *SR = dyn_cast<SymbolicRegion>(R)) { - SymbolRef sym = SR->getSymbol(); - if (isa<SymbolConjured>(sym)) - return true; - } - } - - return false; -} - const FunctionDecl *SVal::getAsFunctionDecl() const { if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { const MemRegion* R = X->getRegion(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits