Skip to content

[CherryPick][clang-tidy] Improve bugprone-infinite-loop check by adding handling for structured bindings #11104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

aviralg
Copy link

@aviralg aviralg commented Aug 2, 2025

Before this patch, this check only handles VarDecl as varaibles declaration in statement, but this will ignore variables in structured bindings (BindingDecl in AST), which leads to false positives.

rdar://152083639

…ding handing for structured bindings (llvm#144213)

Before this patch, this check only handles `VarDecl` as varaibles
declaration in statement, but this will ignore variables in structured
bindings (`BindingDecl` in AST), which leads to false positives.

rdar://152083639
@aviralg aviralg requested a review from a team as a code owner August 2, 2025 03:49
@ziqingluo-90 ziqingluo-90 self-requested a review August 2, 2025 04:10
@ziqingluo-90
Copy link

@swift-ci test

@ziqingluo-90
Copy link

@swift-ci test llvm

@ziqingluo-90 ziqingluo-90 merged commit 5f01da1 into swiftlang:stable/20240723 Aug 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants