From b9a8adf57b30611951e72e140b61ecc7caee3564 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 31 Jul 2011 01:06:41 +0000 Subject: [PATCH] Remove dead code flagged by GCC's -Wunused-but-set-variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136581 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 3 --- lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 2 -- lib/StaticAnalyzer/Core/ExprEngine.cpp | 7 ------- 3 files changed, 12 deletions(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 48a32caad3..ec45a87fa0 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1705,9 +1705,6 @@ protected: MacroBuilder &Builder) const { // RTEMS defines; list based off of gcc output - // FIXME: Move version number handling to llvm::Triple. - StringRef Release = Triple.getOSName().substr(strlen("rtems"), 1); - Builder.defineMacro("__rtems__"); Builder.defineMacro("__ELF__"); } diff --git a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp index 961600a6e3..162dba890b 100644 --- a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp @@ -111,8 +111,6 @@ void PthreadLockChecker::AcquireLock(CheckerContext &C, const CallExpr *CE, DefinedSVal retVal = cast(X); - llvm::ImmutableList LS = state->get(); - if (state->contains(lockR)) { if (!BT_doublelock) BT_doublelock.reset(new BugType("Double locking", "Lock checker")); diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index fb7bf9e246..c34e6887d7 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1661,13 +1661,6 @@ bool ExprEngine::InlineCall(ExplodedNodeSet &Dst, const CallExpr *CE, void ExprEngine::VisitCallExpr(const CallExpr* CE, ExplodedNode* Pred, ExplodedNodeSet& dst) { - - // Determine the type of function we're calling (if available). - const FunctionProtoType *Proto = NULL; - QualType FnType = CE->getCallee()->IgnoreParens()->getType(); - if (const PointerType *FnTypePtr = FnType->getAs()) - Proto = FnTypePtr->getPointeeType()->getAs(); - // Perform the previsit of the CallExpr. ExplodedNodeSet dstPreVisit; getCheckerManager().runCheckersForPreStmt(dstPreVisit, Pred, CE, *this); -- 2.40.0