Skip to content

Commit d506f63

Browse files
committed
Remove braces from if statement
1 parent 61ceb14 commit d506f63

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

clang-tools-extra/clang-tidy/modernize/MinMaxUseInitializerListCheck.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,22 +132,21 @@ generateReplacement(const MatchFinder::MatchResult &Match,
132132
InnerReplacements.end() - 1);
133133

134134
if (InnerResult.Compare) {
135-
const auto Comma =
136-
utils::lexer::findNextTokenSkippingComments(
137-
InnerResult.Last->getEndLoc(), *Match.SourceManager,
138-
Match.Context->getLangOpts());
135+
const auto Comma = utils::lexer::findNextTokenSkippingComments(
136+
InnerResult.Last->getEndLoc(), *Match.SourceManager,
137+
Match.Context->getLangOpts());
139138
if (Comma && Comma->getKind() == tok::comma)
140139
FixItHints.push_back(
141140
FixItHint::CreateRemoval(SourceRange(Comma->getLocation())));
142141

143142
if (utils::lexer::getPreviousToken(
144143
InnerResult.Compare->getExprLoc(), *Match.SourceManager,
145144
Match.Context->getLangOpts(), false)
146-
.getLocation() == Comma->getLocation()) {
145+
.getLocation() == Comma->getLocation())
147146
FixItHints.push_back(
148147
FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
149148
Comma->getLocation(), InnerResult.Compare->getEndLoc())));
150-
} else {
149+
else {
151150
FixItHints.push_back(
152151
FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
153152
InnerResult.Compare->getSourceRange())));

0 commit comments

Comments
 (0)