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 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
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 uses uninitialized memory</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 uses uninitialized memory</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 uses uninitialized memory</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 uninitialized</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 uses uninitialized memory</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 uses uninitialized memory</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 uses uninitialized memory</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 uninitialized</string>
0 commit comments