Refactor: Simplify boolean conditional return statements in llvm/lib/Support

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
This commit is contained in:
Alexander Kornienko 2015-12-28 15:46:15 +00:00
parent 651ff526af
commit 0062f39972
2 changed files with 3 additions and 8 deletions

View File

@ -345,10 +345,7 @@ static bool CommaSeparateAndAddOccurrence(Option *Handler, unsigned pos,
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 ("")

View File

@ -962,10 +962,8 @@ void Scanner::skip(uint32_t Distance) {
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() {