This is an archive of the discontinued LLVM Phabricator instance.

[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.
This NullStmt has the different beginning token.
This patch add addtional check in checkStmt to handle this case.

Diff Detail

Event Timeline

HerrCai0907 created this revision.Aug 21 2023, 8:24 PM
HerrCai0907 requested review of this revision.Aug 21 2023, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 8:24 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Eugene.Zelenko added inline comments.Aug 21 2023, 8:42 PM
clang-tools-extra/docs/ReleaseNotes.rst
233

if constexpr? Please also enclose it in double back-ticks.

This revision is now accepted and ready to land.Aug 21 2023, 10:38 PM

update release note

This revision was landed with ongoing or failed builds.Aug 21 2023, 11:22 PM
This revision was automatically updated to reflect the committed changes.