summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
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