Summary: Use clang-tidy to simplify boolean conditional return statements
Reviewers: rafael, bkramer, ddunbar, Bigcheese, chandlerc, chapuni, nicholas, alexfh
Subscribers: alexfh, craig.topper, llvm-commits
Patch by Richard Thomson!
Differential Revision: http://reviews.llvm.org/D9978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256500
91177308-0d34-0410-b5e6-
96231b3b80d8
Value = Val;
}
- if (Handler->addOccurrence(pos, ArgName, Value, MultiArg))
- return true;
-
- return false;
+ return Handler->addOccurrence(pos, ArgName, Value, MultiArg);
}
/// ProvideOption - For Value, this differentiates between an empty value ("")
bool Scanner::isBlankOrBreak(StringRef::iterator Position) {
if (Position == End)
return false;
- if ( *Position == ' ' || *Position == '\t'
- || *Position == '\r' || *Position == '\n')
- return true;
- return false;
+ return *Position == ' ' || *Position == '\t' || *Position == '\r' ||
+ *Position == '\n';
}
bool Scanner::consumeLineBreakIfPresent() {