Fixed: #64545
When TreeTransform, Stmt in constexpr IfStmt will be transform to NullStmt.
This NullStmt has the different beginning token.
This patch add addtional check in checkStmt to handle this case.
Paths
| Differential D158480
[clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression ClosedPublic Authored by HerrCai0907 on Aug 21 2023, 8:24 PM.
Details Summary Fixed: #64545 When TreeTransform, Stmt in constexpr IfStmt will be transform to NullStmt.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Aug 21 2023, 10:38 PM This revision was landed with ongoing or failed builds.Aug 21 2023, 11:22 PM Closed by commit rG9b6859dc89b9: [clang-tidy][readability-braces-around-statements] ignore false-positive for… (authored by HerrCai0907). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 552227 clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/readability/braces-around-statements.cpp
|
if constexpr? Please also enclose it in double back-ticks.