Skip to content

Commit 71dc2be

Browse files
committed
Remove comments and update ReleaseNotes.rst
1 parent 349462d commit 71dc2be

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,6 @@ bool SimplifyBooleanExprCheck::issueDiag(const ASTContext &Context,
720720
void SimplifyBooleanExprCheck::replaceWithThenStatement(
721721
const ASTContext &Context, const IfStmt *IfStatement,
722722
const Expr *BoolLiteral) {
723-
// Added .str() below
724723
std::string Replacement = getText(Context, *IfStatement->getThen()).str();
725724
if (const Stmt *Init = IfStatement->getInit()) {
726725
Replacement =
@@ -734,7 +733,6 @@ void SimplifyBooleanExprCheck::replaceWithElseStatement(
734733
const ASTContext &Context, const IfStmt *IfStatement,
735734
const Expr *BoolLiteral) {
736735
const Stmt *ElseStatement = IfStatement->getElse();
737-
// Added .str() below
738736
std::string Replacement =
739737
ElseStatement ? getText(Context, *ElseStatement).str() : "";
740738
if (const Stmt *Init = IfStatement->getInit()) {

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,11 @@ Changes in existing checks
616616
where the check would sometimes suggest deleting not only a redundant
617617
``return`` or ``continue``, but also unrelated lines preceding it.
618618

619+
- Improved :doc:`readability-simplify-boolean-expr
620+
<clang-tidy/checks/readability/simplify-boolean-expr>` check to avoid
621+
invalid code generation when the condition contains an initialization
622+
statement.
623+
619624
- Improved :doc:`readability-uppercase-literal-suffix
620625
<clang-tidy/checks/readability/uppercase-literal-suffix>` check to recognize
621626
literal suffixes added in C++23 and C23.

0 commit comments

Comments
 (0)