[clang] [analyzer] Support pack indexing expressions (PR #173186)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 22 11:53:49 PST 2025
================
@@ -3296,6 +3302,14 @@ void ExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
SVal V = UnknownVal();
+ // For pack indexing expressions. Binding is not available here but through
+ // the expanded expressions in the PackIndexingExpr node.
+ if (BD->isParameterPack()) {
+ Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, V), nullptr,
----------------
isuckatcs wrote:
We should probably add a FIXME here instead of just binding `UnknownVal` to the bind expression. This should eventually be handled.
In this case the binding is a sub-region of the pack (e.g.: only the first/last N elements), right? Can't we model this somehow?
https://github.com/llvm/llvm-project/pull/173186
More information about the cfe-commits
mailing list