diff options
Diffstat (limited to 'lib/Checker')
-rw-r--r-- | lib/Checker/IdempotentOperationChecker.cpp | 6 | ||||
-rw-r--r-- | lib/Checker/MallocChecker.cpp | 6 | ||||
-rw-r--r-- | lib/Checker/SimpleSValuator.cpp | 2 | ||||
-rw-r--r-- | lib/Checker/StreamChecker.cpp | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp index f6970de783..6411c790ef 100644 --- a/lib/Checker/IdempotentOperationChecker.cpp +++ b/lib/Checker/IdempotentOperationChecker.cpp @@ -78,8 +78,8 @@ class IdempotentOperationChecker // False positive reduction methods static bool isSelfAssign(const Expr *LHS, const Expr *RHS); static bool isUnused(const Expr *E, AnalysisContext *AC); - static bool isTruncationExtensionAssignment(const Expr *LHS, - const Expr *RHS); + //static bool isTruncationExtensionAssignment(const Expr *LHS, + // const Expr *RHS); static bool PathWasCompletelyAnalyzed(const CFG *C, const CFGBlock *CB, const GRCoreEngine &CE); @@ -500,6 +500,7 @@ bool IdempotentOperationChecker::isUnused(const Expr *E, return true; } +#if 0 // Check for self casts truncating/extending a variable bool IdempotentOperationChecker::isTruncationExtensionAssignment( const Expr *LHS, @@ -522,6 +523,7 @@ bool IdempotentOperationChecker::isTruncationExtensionAssignment( return dyn_cast<DeclRefExpr>(RHS->IgnoreParens()) == NULL; } +#endif // Returns false if a path to this block was not completely analyzed, or true // otherwise. diff --git a/lib/Checker/MallocChecker.cpp b/lib/Checker/MallocChecker.cpp index ac98c89a8d..c9b6d7588b 100644 --- a/lib/Checker/MallocChecker.cpp +++ b/lib/Checker/MallocChecker.cpp @@ -32,10 +32,10 @@ public: RefState(Kind k, const Stmt *s) : K(k), S(s) {} bool isAllocated() const { return K == AllocateUnchecked; } - bool isFailed() const { return K == AllocateFailed; } + //bool isFailed() const { return K == AllocateFailed; } bool isReleased() const { return K == Released; } - bool isEscaped() const { return K == Escaped; } - bool isRelinquished() const { return K == Relinquished; } + //bool isEscaped() const { return K == Escaped; } + //bool isRelinquished() const { return K == Relinquished; } bool operator==(const RefState &X) const { return K == X.K && S == X.S; diff --git a/lib/Checker/SimpleSValuator.cpp b/lib/Checker/SimpleSValuator.cpp index 5b48e7cd03..782cd4f5e6 100644 --- a/lib/Checker/SimpleSValuator.cpp +++ b/lib/Checker/SimpleSValuator.cpp @@ -848,8 +848,6 @@ SVal SimpleSValuator::EvalBinOpLN(const GRState *state, rightI.extOrTrunc(leftI.getBitWidth()); // Offset the increment by the pointer size. - ASTContext &ctx = ValMgr.getContext(); - const PointerType *PT = resultTy->getAs<PointerType>(); llvm::APSInt Multiplicand(rightI.getBitWidth(), /* isUnsigned */ true); rightI *= Multiplicand; diff --git a/lib/Checker/StreamChecker.cpp b/lib/Checker/StreamChecker.cpp index 5bc075f6bf..8553875a24 100644 --- a/lib/Checker/StreamChecker.cpp +++ b/lib/Checker/StreamChecker.cpp @@ -31,8 +31,8 @@ struct StreamState { bool isOpened() const { return K == Opened; } bool isClosed() const { return K == Closed; } - bool isOpenFailed() const { return K == OpenFailed; } - bool isEscaped() const { return K == Escaped; } + //bool isOpenFailed() const { return K == OpenFailed; } + //bool isEscaped() const { return K == Escaped; } bool operator==(const StreamState &X) const { return K == X.K && S == X.S; |