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

Ted Kremenek kremenek at apple.com
Wed Apr 27 15:22:59 PDT 2011


Hi Jiri,

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

Ted

On Apr 7, 2011, at 12:03 AM, Jiri Slaby wrote:

> 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 at gmail.com>
> Cc: Ted Kremenek <kremenek at 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;
> }
> 
> 
> -- 
> 1.7.4.2
> 
> 




More information about the cfe-dev mailing list