[all-commits] [llvm/llvm-project] b55dd8: [clang][analyzer] Correctly handle structured bind...
flovent via All-commits
all-commits at lists.llvm.org
Wed Mar 26 08:04:04 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b55dd8f607dab5b122e09836022a37ef10c8c653
https://github.com/llvm/llvm-project/commit/b55dd8f607dab5b122e09836022a37ef10c8c653
Author: flovent <144676429+flovent at users.noreply.github.com>
Date: 2025-03-26 (Wed, 26 Mar 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
A clang/test/Analysis/issue-91835.cpp
A clang/test/Analysis/lambda-capture-structured-binding.cpp
Log Message:
-----------
[clang][analyzer] Correctly handle structured bindings captured by lambda (#132579)
this PR fixes #91835.
For `DeclRefExpr` in lambda's function body, it will references to
original variable declaration in AST rather than `FieldDecl` for lambda
class, so it's needed to find the corresponding `FieldDecl` and bind
`DeclRefExpr`'s value to it.
This is already implemented for variables that are not in a structured
binding structure, so I extracted that part of the code so that it can
be used in the structured binding case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list