3 Commits

Author SHA1 Message Date
foxfromabyss
32cb4b2c6d
[Clang][Diagnostics] Use "structured binding" instead of "decomposition" (#163101)
[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>
2025-10-16 18:28:38 +02:00
David Tarditi
8138d85f63
[analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (#126596)
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
2025-02-26 13:57:33 +01:00
isuckatcs
e3e9082b01 [analyzer] Fix for incorrect handling of 0 length non-POD array construction
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
2022-08-25 12:42:02 +02:00