mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-27 13:40:43 +00:00
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:
parent
651ff526af
commit
0062f39972
@ -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 ("")
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user