From 00c0a30acd5a5c6a1ef837b9bdd2c4c086b70204 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 26 Sep 2008 18:17:07 +0000 Subject: [PATCH] Do not create CFGs for functions/methods using blocks (need to add control-flow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56672 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/CFG.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/AST/CFG.cpp b/lib/AST/CFG.cpp index c0b1b96967..41ae454d44 100644 --- a/lib/AST/CFG.cpp +++ b/lib/AST/CFG.cpp @@ -165,6 +165,10 @@ public: return NYS(); } + // Blocks. + CFGBlock* VisitBlockExpr(BlockExpr* E) { return NYS(); } + CFGBlock* VisitBlockDeclRefExpr(BlockDeclRefExpr* E) { return NYS(); } + private: CFGBlock* createBlock(bool add_successor = true); CFGBlock* addStmt(Stmt* Terminator); @@ -455,6 +459,11 @@ CFGBlock* CFGBuilder::WalkAST(Stmt* Terminator, bool AlwaysAddStmt = false) { break; } + + // Blocks: No support for blocks ... yet + case Stmt::BlockExprClass: + case Stmt::BlockDeclRefExprClass: + return NYS(); case Stmt::ParenExprClass: return WalkAST(cast(Terminator)->getSubExpr(), AlwaysAddStmt);