summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-20 23:59:28 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-20 23:59:28 +0000
commitab929bb352925a16cfe1563d168f4fc0fce577db (patch)
tree2058b8bda0bcea8418020c098f360303dff342dd /clang/lib/Analysis/CFG.cpp
parent89e53fddb813633fd53c4decafac222fc08b2495 (diff)
downloadbcm5719-llvm-ab929bb352925a16cfe1563d168f4fc0fce577db.tar.gz
bcm5719-llvm-ab929bb352925a16cfe1563d168f4fc0fce577db.zip
Remove stale comment and tighten code.
llvm-svn: 84697
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r--clang/lib/Analysis/CFG.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 6945c2f376e..31417597f79 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -254,12 +254,7 @@ CFG* CFGBuilder::buildCFG(Stmt* Statement, ASTContext* C) {
// Create an empty entry block that has no predecessors.
cfg->setEntry(createBlock());
- if (badCFG)
- return NULL;
-
- // NULL out cfg so that repeated calls to the builder will fail and that the
- // ownership of the constructed CFG is passed to the caller.
- return cfg.take();
+ return badCFG ? NULL : cfg.take();
}
/// createBlock - Used to lazily create blocks that are connected
OpenPOWER on IntegriCloud