You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[analyzer] Update undefined assignment diagnostics to not use 'garbage'
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
Copy file name to clipboardExpand all lines: clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2578,17 +2578,17 @@
2578
2578
</array>
2579
2579
<key>depth</key><integer>0</integer>
2580
2580
<key>extended_message</key>
2581
-
<string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
2581
+
<string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
2582
2582
<key>message</key>
2583
-
<string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
2583
+
<string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
2584
2584
</dict>
2585
2585
</array>
2586
-
<key>description</key><string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
2586
+
<key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
2587
2587
<key>category</key><string>Logic error</string>
2588
-
<key>type</key><string>Assigned value is garbage or undefined</string>
2588
+
<key>type</key><string>Assigned value is undefined and not meaningful</string>
Copy file name to clipboardExpand all lines: clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5864,17 +5864,17 @@
5864
5864
</array>
5865
5865
<key>depth</key><integer>0</integer>
5866
5866
<key>extended_message</key>
5867
-
<string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
5867
+
<string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
5868
5868
<key>message</key>
5869
-
<string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
5869
+
<string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
5870
5870
</dict>
5871
5871
</array>
5872
-
<key>description</key><string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
5872
+
<key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
5873
5873
<key>category</key><string>Logic error</string>
5874
-
<key>type</key><string>Assigned value is garbage or undefined</string>
5874
+
<key>type</key><string>Assigned value is undefined and not meaningful</string>
0 commit comments