[analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' by dtarditi · Pull Request #126596 · llvm/llvm-project (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
A clang user pointed out that messages for the static analyzer undefined assignment checker use the term 'garbage'. This is kind of snarky and also imprecise. This change replaces the term 'garbage' in those messages with 'not meaningful'. It moves the term 'undefined' to be first in the messages because of the possible ambiguous parsing of the term 'not meaningful and undefined'. That could be parsed as '(not meaningful) and undefined' or 'not (meaningful and undefined').
The use of the term 'meaningless' was considered, but not chosen because it has two meanings in English. One meaning is 'without meaning'. The other meaning is 'having no point'. The 2nd meaning could be construed as indicating the computation could be deleted.
rdar://133418644
The prior change was using the message 'not meaningful and undefined'. This changes updates it to use the term uninitialized based on PR review feedback and discussion.