summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-11-06 01:26:37 +0000
committerAlexander Kornienko <alexfh@google.com>2015-11-06 01:26:37 +0000
commitad98885be175b537c839b88785bb463e90c3873e (patch)
tree83dbce2021690098b35472d4f2426e4c806dc27f /clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
parent339464228d8496647e152217c2d978cb28b0077b (diff)
downloadbcm5719-llvm-ad98885be175b537c839b88785bb463e90c3873e.tar.gz
bcm5719-llvm-ad98885be175b537c839b88785bb463e90c3873e.zip
Refactor: Simplify boolean conditional return statements in lib/ARCMigrate
Patch by Richard Thomson! (+a couple of modifications to address comments) Differential revision: http://reviews.llvm.org/D10009 llvm-svn: 252261
Diffstat (limited to 'clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp')
-rw-r--r--clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp b/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
index 9689f40760c..d45d5d60b78 100644
--- a/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
+++ b/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
@@ -104,9 +104,7 @@ public:
return false;
if (!S->getThen() || !Visit(S->getThen()))
return false;
- if (S->getElse() && !Visit(S->getElse()))
- return false;
- return true;
+ return !S->getElse() || Visit(S->getElse());
}
bool VisitWhileStmt(WhileStmt *S) {
if (S->getConditionVariable())
OpenPOWER on IntegriCloud