Skip to content

Commit 99281e6

Browse files
committed
Fix code formatting
1 parent 58010d4 commit 99281e6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,10 @@ void SimplifyBooleanExprCheck::replaceWithThenStatement(
721721
const ASTContext &Context, const IfStmt *IfStatement,
722722
const Expr *BoolLiteral) {
723723
// Added .str() below
724-
std::string Replacement = getText(Context, *IfStatement->getThen()).str();
724+
std::string Replacement = getText(Context, *IfStatement->getThen()).str();
725725
if (const Stmt *Init = IfStatement->getInit()) {
726-
Replacement = (Twine("{ ") + getText(Context, *Init) + Replacement + " }").str();
726+
Replacement =
727+
(Twine("{ ") + getText(Context, *Init) + Replacement + " }").str();
727728
}
728729
issueDiag(Context, BoolLiteral->getBeginLoc(), SimplifyConditionDiagnostic,
729730
IfStatement->getSourceRange(), Replacement);
@@ -734,14 +735,18 @@ void SimplifyBooleanExprCheck::replaceWithElseStatement(
734735
const Expr *BoolLiteral) {
735736
const Stmt *ElseStatement = IfStatement->getElse();
736737
// Added .str() below
737-
std::string Replacement = ElseStatement ? getText(Context, *ElseStatement).str() : "";
738+
std::string Replacement =
739+
ElseStatement ? getText(Context, *ElseStatement).str() : "";
738740
if (const Stmt *Init = IfStatement->getInit()) {
739-
Replacement = (Twine("{ ") + getText(Context, *Init) + Replacement + " }").str();
741+
Replacement =
742+
(Twine("{ ") + getText(Context, *Init) + Replacement + " }").str();
740743
}
741744
issueDiag(Context, BoolLiteral->getBeginLoc(), SimplifyConditionDiagnostic,
742745
IfStatement->getSourceRange(), Replacement);
743746
}
744747

748+
749+
745750
void SimplifyBooleanExprCheck::replaceWithCondition(
746751
const ASTContext &Context, const ConditionalOperator *Ternary,
747752
bool Negated) {

0 commit comments

Comments
 (0)