[Static Analyzer] Small array binding policy
authorisuckatcs <65320245+isuckatcs@users.noreply.github.com>
Fri, 17 Jun 2022 14:40:47 +0000 (16:40 +0200)
committerisuckatcs <65320245+isuckatcs@users.noreply.github.com>
Fri, 17 Jun 2022 16:56:13 +0000 (18:56 +0200)
commit92bf652d40740b947de6c41fe09f282ec0530dc5
tree34e7eb3bfcb889ed305afea2a11272f4601149bf
parentad709a752daa6aebf03a3d34fc5b2e24a8a0dbea
[Static Analyzer] Small array binding policy

If a lazyCompoundVal to a struct is bound to the store, there is a policy which decides
whether a copy gets created instead.

This patch introduces a similar policy for arrays, which is required to model structured
binding to arrays without false negatives.

Differential Revision: https://reviews.llvm.org/D128064
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
clang/lib/StaticAnalyzer/Core/RegionStore.cpp
clang/test/Analysis/analyzer-config.c