[P0615R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0615r0.html)
changed the term "decomposition" to "structured binding". Some
diagnostic messages were created before this paper. These messages
should be updated using "structured binding" to avoid making users
confused.
Closes#157880
---------
Co-authored-by: foxfromabyss <foxfromabyss@foxfromabyss.com>
Co-authored-by: Sirraide <aeternalmail@gmail.com>
A clang user pointed out that messages for the static analyzer undefined
assignment checker use the term ‘garbage’, which might have a negative
connotation to some users. This change updates the messages to use the
term ‘uninitialized’. This is the usual reason why a value is undefined
in the static analyzer and describes the logical error that a programmer
should take action to fix.
Out-of-bounds reads can also produce undefined values in the static
analyzer. The right long-term design is to have to the array bounds
checker cover out-of-bounds reads, so we do not cover that case in the
updated messages. The recent improvements to the array bounds checker
make it a candidate to add to the core set of checkers.
rdar://133418644
Prior to this patch when the analyzer encountered a non-POD 0 length array,
it still invoked the constructor for 1 element, which lead to false positives.
This patch makes sure that we no longer construct any elements when we see a
0 length array.
Differential Revision: https://reviews.llvm.org/D131501