зеркало из https://github.com/microsoft/clang-1.git
"I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's useful git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
8c465e6494
Коммит
fae962200e
|
@ -78,8 +78,8 @@ class IdempotentOperationChecker
|
||||||
// False positive reduction methods
|
// False positive reduction methods
|
||||||
static bool isSelfAssign(const Expr *LHS, const Expr *RHS);
|
static bool isSelfAssign(const Expr *LHS, const Expr *RHS);
|
||||||
static bool isUnused(const Expr *E, AnalysisContext *AC);
|
static bool isUnused(const Expr *E, AnalysisContext *AC);
|
||||||
static bool isTruncationExtensionAssignment(const Expr *LHS,
|
//static bool isTruncationExtensionAssignment(const Expr *LHS,
|
||||||
const Expr *RHS);
|
// const Expr *RHS);
|
||||||
static bool PathWasCompletelyAnalyzed(const CFG *C,
|
static bool PathWasCompletelyAnalyzed(const CFG *C,
|
||||||
const CFGBlock *CB,
|
const CFGBlock *CB,
|
||||||
const GRCoreEngine &CE);
|
const GRCoreEngine &CE);
|
||||||
|
@ -500,6 +500,7 @@ bool IdempotentOperationChecker::isUnused(const Expr *E,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// Check for self casts truncating/extending a variable
|
// Check for self casts truncating/extending a variable
|
||||||
bool IdempotentOperationChecker::isTruncationExtensionAssignment(
|
bool IdempotentOperationChecker::isTruncationExtensionAssignment(
|
||||||
const Expr *LHS,
|
const Expr *LHS,
|
||||||
|
@ -522,6 +523,7 @@ bool IdempotentOperationChecker::isTruncationExtensionAssignment(
|
||||||
|
|
||||||
return dyn_cast<DeclRefExpr>(RHS->IgnoreParens()) == NULL;
|
return dyn_cast<DeclRefExpr>(RHS->IgnoreParens()) == NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Returns false if a path to this block was not completely analyzed, or true
|
// Returns false if a path to this block was not completely analyzed, or true
|
||||||
// otherwise.
|
// otherwise.
|
||||||
|
|
|
@ -32,10 +32,10 @@ public:
|
||||||
RefState(Kind k, const Stmt *s) : K(k), S(s) {}
|
RefState(Kind k, const Stmt *s) : K(k), S(s) {}
|
||||||
|
|
||||||
bool isAllocated() const { return K == AllocateUnchecked; }
|
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 isReleased() const { return K == Released; }
|
||||||
bool isEscaped() const { return K == Escaped; }
|
//bool isEscaped() const { return K == Escaped; }
|
||||||
bool isRelinquished() const { return K == Relinquished; }
|
//bool isRelinquished() const { return K == Relinquished; }
|
||||||
|
|
||||||
bool operator==(const RefState &X) const {
|
bool operator==(const RefState &X) const {
|
||||||
return K == X.K && S == X.S;
|
return K == X.K && S == X.S;
|
||||||
|
|
|
@ -848,8 +848,6 @@ SVal SimpleSValuator::EvalBinOpLN(const GRState *state,
|
||||||
rightI.extOrTrunc(leftI.getBitWidth());
|
rightI.extOrTrunc(leftI.getBitWidth());
|
||||||
|
|
||||||
// Offset the increment by the pointer size.
|
// Offset the increment by the pointer size.
|
||||||
ASTContext &ctx = ValMgr.getContext();
|
|
||||||
const PointerType *PT = resultTy->getAs<PointerType>();
|
|
||||||
llvm::APSInt Multiplicand(rightI.getBitWidth(), /* isUnsigned */ true);
|
llvm::APSInt Multiplicand(rightI.getBitWidth(), /* isUnsigned */ true);
|
||||||
rightI *= Multiplicand;
|
rightI *= Multiplicand;
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ struct StreamState {
|
||||||
|
|
||||||
bool isOpened() const { return K == Opened; }
|
bool isOpened() const { return K == Opened; }
|
||||||
bool isClosed() const { return K == Closed; }
|
bool isClosed() const { return K == Closed; }
|
||||||
bool isOpenFailed() const { return K == OpenFailed; }
|
//bool isOpenFailed() const { return K == OpenFailed; }
|
||||||
bool isEscaped() const { return K == Escaped; }
|
//bool isEscaped() const { return K == Escaped; }
|
||||||
|
|
||||||
bool operator==(const StreamState &X) const {
|
bool operator==(const StreamState &X) const {
|
||||||
return K == X.K && S == X.S;
|
return K == X.K && S == X.S;
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace {
|
||||||
|
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
static inline bool classof(const DeltaTreeNode *) { return true; }
|
//static inline bool classof(const DeltaTreeNode *) { return true; }
|
||||||
};
|
};
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
|
|
||||||
|
@ -133,12 +133,6 @@ namespace {
|
||||||
public:
|
public:
|
||||||
DeltaTreeInteriorNode() : DeltaTreeNode(false /*nonleaf*/) {}
|
DeltaTreeInteriorNode() : DeltaTreeNode(false /*nonleaf*/) {}
|
||||||
|
|
||||||
DeltaTreeInteriorNode(DeltaTreeNode *FirstChild)
|
|
||||||
: DeltaTreeNode(false /*nonleaf*/) {
|
|
||||||
FullDelta = FirstChild->FullDelta;
|
|
||||||
Children[0] = FirstChild;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeltaTreeInteriorNode(const InsertResult &IR)
|
DeltaTreeInteriorNode(const InsertResult &IR)
|
||||||
: DeltaTreeNode(false /*nonleaf*/) {
|
: DeltaTreeNode(false /*nonleaf*/) {
|
||||||
Children[0] = IR.LHS;
|
Children[0] = IR.LHS;
|
||||||
|
@ -157,7 +151,7 @@ namespace {
|
||||||
return Children[i];
|
return Children[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool classof(const DeltaTreeInteriorNode *) { return true; }
|
//static inline bool classof(const DeltaTreeInteriorNode *) { return true; }
|
||||||
static inline bool classof(const DeltaTreeNode *N) { return !N->isLeaf(); }
|
static inline bool classof(const DeltaTreeNode *N) { return !N->isLeaf(); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1576,7 +1576,6 @@ public:
|
||||||
return t == other.t;
|
return t == other.t;
|
||||||
}
|
}
|
||||||
|
|
||||||
QualType getQualType() const { return t; }
|
|
||||||
CXXCatchStmt *getCatchStmt() const { return stmt; }
|
CXXCatchStmt *getCatchStmt() const { return stmt; }
|
||||||
SourceLocation getTypeSpecStartLoc() const {
|
SourceLocation getTypeSpecStartLoc() const {
|
||||||
return stmt->getExceptionDecl()->getTypeSpecStartLoc();
|
return stmt->getExceptionDecl()->getTypeSpecStartLoc();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче