From: Ted Kremenek Date: Tue, 28 Aug 2007 16:18:58 +0000 (+0000) Subject: Removed special-casing in CFG construction for ParenExprs. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7926f7c45c53862f516ea9f504ba38fe89eac329;p=clang Removed special-casing in CFG construction for ParenExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41540 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/CFG.cpp b/AST/CFG.cpp index b79bfe519b..64a75b2008 100644 --- a/AST/CFG.cpp +++ b/AST/CFG.cpp @@ -83,7 +83,6 @@ public: CFGBlock* VisitStmt(Stmt* Statement); CFGBlock* VisitNullStmt(NullStmt* Statement); - CFGBlock* VisitParenExpr(ParenExpr* Statement); CFGBlock* VisitCompoundStmt(CompoundStmt* C); CFGBlock* VisitIfStmt(IfStmt* I); CFGBlock* VisitReturnStmt(ReturnStmt* R); @@ -210,10 +209,7 @@ CFGBlock* CFGBuilder::WalkAST(Stmt* S, bool AlwaysAddStmt = false) { Block->setTerminator(C); return addStmt(C->getCond()); } - - case Stmt::ParenExprClass: - return WalkAST(cast(S)->getSubExpr(),AlwaysAddStmt); - + case Stmt::BinaryOperatorClass: { BinaryOperator* B = cast(S); @@ -277,11 +273,6 @@ CFGBlock* CFGBuilder::VisitNullStmt(NullStmt* Statement) { return Block; } -CFGBlock* CFGBuilder::VisitParenExpr(ParenExpr* Statement) { - return Visit(Statement->getSubExpr()); -} - - CFGBlock* CFGBuilder::VisitCompoundStmt(CompoundStmt* C) { // The value returned from this function is the last created CFGBlock // that represents the "entry" point for the translated AST node.