diff options
-rw-r--r-- | lib/Checker/IdempotentOperationChecker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp index 3dcbea491e..f392a8da82 100644 --- a/lib/Checker/IdempotentOperationChecker.cpp +++ b/lib/Checker/IdempotentOperationChecker.cpp @@ -364,6 +364,9 @@ void IdempotentOperationChecker::VisitEndAnalysis(ExplodedGraph &G, BugReporter &BR, GRExprEngine &Eng) { BugType *BT = new BugType("Idempotent operation", "Dead code"); + // If a sink is present, we may have not seen the complete path. + BT->setSuppressOnSink(true); + // Iterate over the hash to see if we have any paths with definite // idempotent operations. for (AssumptionMap::const_iterator i = hash.begin(); i != hash.end(); ++i) { |