[PATCH 1/1] Analysis: CFG, remove useless statements

CFGBlock::hasBinaryBranchTerminator was probably copied from
getTerminatorCondition and the now useless Expr* E computations
remained in place.

Remove them to make the code cleaner.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

CFGBlock::hasBinaryBranchTerminator was probably copied from
getTerminatorCondition and the now useless Expr* E computations
remained in place.

Remove them to make the code cleaner.

Hi, did you receive this email or don't you care about fixes/cleanups?

Signed-off-by: Jiri Slaby<jirislaby@gmail.com>
Cc: Ted Kremenek<kremenek@apple.com>
---
  lib/Analysis/CFG.cpp | 4 ----
  1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index b5930cd..b954fcf 100644
--- a/lib/Analysis/CFG.cpp
+++ b/lib/Analysis/CFG.cpp
@@ -3533,8 +3533,6 @@ bool CFGBlock::hasBinaryBranchTerminator() const {
    if (!Terminator)
      return false;

- Expr* E = NULL;
-
    switch (Terminator->getStmtClass()) {
      default:
        return false;
@@ -3549,8 +3547,6 @@ bool CFGBlock::hasBinaryBranchTerminator() const {
      case Stmt::BinaryOperatorClass:
        return true;
    }
-
- return E ? E->IgnoreParens() : NULL;
  }

thanks,

Hi Jiri,

Thank you for pinging me, but please don't be rude about it. This got buried in my email queue, and I lost track of it. Many of us are very busy, and occasionally individual patches get missed. I'll respond to the original email on cfe-commits.

Ted

Hi Jiri,

Thanks for the patch. It turns out this entire method is never used, so I've removed it entirely in r130336.

Ted