[cfe-commits] r89830 - /cfe/trunk/lib/Analysis/CFG.cpp

Ted Kremenek kremenek at apple.com
Tue Nov 24 17:34:30 PST 2009


Author: kremenek
Date: Tue Nov 24 19:34:30 2009
New Revision: 89830

URL: http://llvm.org/viewvc/llvm-project?rev=89830&view=rev
Log:
Allow building of CFGs for ASTs that contain BlockExprs.

Modified:
    cfe/trunk/lib/Analysis/CFG.cpp

Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=89830&r1=89829&r2=89830&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Tue Nov 24 19:34:30 2009
@@ -461,9 +461,12 @@
   return VisitStmt(B, alwaysAdd);
 }
 
-CFGBlock *CFGBuilder::VisitBlockExpr(BlockExpr* E, bool alwaysAdd) {
-  // FIXME
-  return NYS();
+CFGBlock *CFGBuilder::VisitBlockExpr(BlockExpr *E, bool alwaysAdd) {
+  if (alwaysAdd) {
+    autoCreateBlock();
+    AppendStmt(Block, E);
+  }
+  return Block;
 }
 
 CFGBlock *CFGBuilder::VisitBlockDeclRefExpr(BlockDeclRefExpr* E,





More information about the cfe-commits mailing list