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

Jiri Slaby jirislaby at gmail.com
Wed Apr 27 14:59:47 PDT 2011


On 04/07/2011 09: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.

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

> 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;
>   }
>
>

thanks,
-- 
js



More information about the cfe-dev mailing list