[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

David Tarditi via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 23 04:06:31 PST 2025


https://github.com/dtarditi updated https://github.com/llvm/llvm-project/pull/126596

>From 06eb6682196249f4cae9801963380d0881d27296 Mon Sep 17 00:00:00 2001
From: David Tarditi <d_tarditi at apple.com>
Date: Mon, 10 Feb 2025 11:35:45 -0800
Subject: [PATCH 1/3] [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
---
 .../Checkers/UndefinedAssignmentChecker.cpp   | 13 ++++----
 .../Inputs/expected-plists/edges-new.mm.plist | 10 +++----
 .../expected-plists/plist-output.m.plist      | 10 +++----
 clang/test/Analysis/a_flaky_crash.cpp         |  2 +-
 .../analysis-after-multiple-dtors.cpp         |  2 +-
 clang/test/Analysis/array-init-loop.cpp       |  6 ++--
 clang/test/Analysis/array-punned-region.c     |  2 +-
 clang/test/Analysis/builtin_overflow_notes.c  |  4 +--
 clang/test/Analysis/call-invalidation.cpp     |  4 +--
 clang/test/Analysis/ctor-array.cpp            | 22 +++++++-------
 .../diagnostics/no-store-func-path-notes.m    |  4 +--
 clang/test/Analysis/fread.c                   | 20 ++++++-------
 .../Analysis/implicit-ctor-undef-value.cpp    | 12 ++++----
 clang/test/Analysis/initialization.c          | 16 +++++-----
 clang/test/Analysis/initialization.cpp        | 26 ++++++++--------
 clang/test/Analysis/misc-ps.c                 |  4 +--
 clang/test/Analysis/operator-calls.cpp        |  8 ++---
 clang/test/Analysis/stack-addr-ps.cpp         |  2 +-
 clang/test/Analysis/uninit-const.c            | 20 ++++++-------
 clang/test/Analysis/uninit-const.cpp          |  4 +--
 .../uninit-structured-binding-array.cpp       | 30 +++++++++----------
 .../uninit-structured-binding-struct.cpp      | 12 ++++----
 .../uninit-structured-binding-tuple.cpp       |  4 +--
 clang/test/Analysis/uninit-vals.m             |  8 ++---
 .../test/Analysis/zero-size-non-pod-array.cpp |  4 +--
 25 files changed, 125 insertions(+), 124 deletions(-)

diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
index ddc6cc9e8202c..f13de315ed7b5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
@@ -23,7 +23,7 @@ using namespace ento;
 namespace {
 class UndefinedAssignmentChecker
   : public Checker<check::Bind> {
-  const BugType BT{this, "Assigned value is garbage or undefined"};
+  const BugType BT{this, "Assigned value is undefined and not meaningful"};
 
 public:
   void checkBind(SVal location, SVal val, const Stmt *S,
@@ -57,8 +57,8 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
 
   while (StoreE) {
     if (const UnaryOperator *U = dyn_cast<UnaryOperator>(StoreE)) {
-      OS << "The expression is an uninitialized value. "
-            "The computed value will also be garbage";
+      OS << "The expression is an uninitialized value, so the computed value "
+         << "is not meaningful";
 
       ex = U->getSubExpr();
       break;
@@ -68,7 +68,7 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
       if (B->isCompoundAssignmentOp()) {
         if (C.getSVal(B->getLHS()).isUndef()) {
           OS << "The left expression of the compound assignment is an "
-                "uninitialized value. The computed value will also be garbage";
+             << "uninitialized value, so the computed value is not meaningful";
           ex = B->getLHS();
           break;
         }
@@ -88,8 +88,9 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
       if (CD->isImplicit()) {
         for (auto *I : CD->inits()) {
           if (I->getInit()->IgnoreImpCasts() == StoreE) {
-            OS << "Value assigned to field '" << I->getMember()->getName()
-               << "' in implicit constructor is garbage or undefined";
+            OS << "Value assigned to field '"
+               << I->getMember()->getName()
+               << "' in implicit constructor is undefined and not meaningful.";
             break;
           }
         }
diff --git a/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist b/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
index 31b6286b4465e..dd731e705c9b0 100644
--- a/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
+++ b/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
@@ -2578,17 +2578,17 @@
      </array>
      <key>depth</key><integer>0</integer>
      <key>extended_message</key>
-     <string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
      <key>message</key>
-     <string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
     </dict>
    </array>
-   <key>description</key><string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+   <key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
    <key>category</key><string>Logic error</string>
-   <key>type</key><string>Assigned value is garbage or undefined</string>
+   <key>type</key><string>Assigned value is undefined and not meaningful</string>
    <key>check_name</key><string>core.uninitialized.Assign</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>025372576cd3ba6716044f93a51c978c</string>
+   <key>issue_hash_content_of_line_in_context</key><string>936a5fabf36091d0c1e1e1553232d6f5</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>test_objc_fast_enumeration_2</string>
   <key>issue_hash_function_offset</key><string>5</string>
diff --git a/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist b/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
index 8b8cc3239bd4b..392474d24487c 100644
--- a/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
+++ b/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
@@ -5864,17 +5864,17 @@
      </array>
      <key>depth</key><integer>0</integer>
      <key>extended_message</key>
-     <string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
      <key>message</key>
-     <string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
     </dict>
    </array>
-   <key>description</key><string>The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage</string>
+   <key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
    <key>category</key><string>Logic error</string>
-   <key>type</key><string>Assigned value is garbage or undefined</string>
+   <key>type</key><string>Assigned value is undefined and not meaningful</string>
    <key>check_name</key><string>core.uninitialized.Assign</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>21c774309bdfd487c3d09a61a671bbcc</string>
+   <key>issue_hash_content_of_line_in_context</key><string>c1d7b1284317d7e45bda4bfa6b3a281e</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>test_loop_fast_enumeration</string>
   <key>issue_hash_function_offset</key><string>5</string>
diff --git a/clang/test/Analysis/a_flaky_crash.cpp b/clang/test/Analysis/a_flaky_crash.cpp
index f350c1e1280cf..5a3fa25f82baa 100644
--- a/clang/test/Analysis/a_flaky_crash.cpp
+++ b/clang/test/Analysis/a_flaky_crash.cpp
@@ -14,7 +14,7 @@ bool bar(S);
 void foo() {
   int x;
   if (true && bar(S()))
-    ++x; // expected-warning{{The expression is an uninitialized value. The computed value will also be garbage}}
+    ++x; // expected-warning{{The expression is an uninitialized value, so the computed value is not meaningful}}
 }
 
 // 256 copies of the same run-line to make it crash more often when it breaks.
diff --git a/clang/test/Analysis/analysis-after-multiple-dtors.cpp b/clang/test/Analysis/analysis-after-multiple-dtors.cpp
index a8f6d38fbd1bb..c202752ee1a56 100644
--- a/clang/test/Analysis/analysis-after-multiple-dtors.cpp
+++ b/clang/test/Analysis/analysis-after-multiple-dtors.cpp
@@ -23,6 +23,6 @@ int main() {
 
   int x;
   int y = x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
   (void)y;
 }
diff --git a/clang/test/Analysis/array-init-loop.cpp b/clang/test/Analysis/array-init-loop.cpp
index b28468b7f560b..cb26bda95abf8 100644
--- a/clang/test/Analysis/array-init-loop.cpp
+++ b/clang/test/Analysis/array-init-loop.cpp
@@ -19,7 +19,7 @@ void array_uninit() {
 
   auto [a, b, c, d, e] = arr;
 
-  int x = e; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = e; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void lambda_init() {
@@ -168,7 +168,7 @@ struct S3_duplicate {
 void array_uninit_non_pod() {
   S3 arr[1];
 
-  auto [a] = arr; // expected-warning at 159{{ in implicit constructor is garbage or undefined }}
+  auto [a] = arr; // expected-warning at 159{{ in implicit constructor is undefined and not meaningful}}
 }
 
 void lambda_init_non_pod() {
@@ -191,7 +191,7 @@ void lambda_init_non_pod() {
 void lambda_uninit_non_pod() {
   S3_duplicate arr[4];
 
-  int l = [arr] { return arr[3].i; }(); // expected-warning at 164{{ in implicit constructor is garbage or undefined }}
+  int l = [arr] { return arr[3].i; }(); // expected-warning at 164{{ in implicit constructor is undefined and not meaningful }}
 }
 
 // If this struct is being copy/move constructed by the implicit ctors, ArrayInitLoopExpr
diff --git a/clang/test/Analysis/array-punned-region.c b/clang/test/Analysis/array-punned-region.c
index d319fd7367ec5..c997611e2d3a7 100644
--- a/clang/test/Analysis/array-punned-region.c
+++ b/clang/test/Analysis/array-punned-region.c
@@ -20,7 +20,7 @@ void array_struct_bitfield_1() {
 int array_struct_bitfield_2() {
   BITFIELD_CAST ff = {0};
   BITFIELD_CAST *pff = &ff;
-  int a = *((int *)pff + 2); // expected-warning{{Assigned value is garbage or undefined [core.uninitialized.Assign]}}
+  int a = *((int *)pff + 2); // expected-warning{{Assigned value is undefined and not meaningful [core.uninitialized.Assign]}}
   return a;
 }
 
diff --git a/clang/test/Analysis/builtin_overflow_notes.c b/clang/test/Analysis/builtin_overflow_notes.c
index 20f333a4a6cca..e8d0e60ad80b0 100644
--- a/clang/test/Analysis/builtin_overflow_notes.c
+++ b/clang/test/Analysis/builtin_overflow_notes.c
@@ -23,8 +23,8 @@ void test_overflow_note(int a, int b)
 
    if (__builtin_add_overflow(a, b, &res)) { // expected-note {{Assuming overflow}}
                                              // expected-note at -1 {{Taking true branch}}
-     int var = res; // expected-warning{{Assigned value is garbage or undefined}}
-                    // expected-note at -1 {{Assigned value is garbage or undefined}}
+     int var = res; // expected-warning{{Assigned value is undefined and not meaningful}}
+                    // expected-note at -1 {{Assigned value is undefined and not meaningful}}
      return;
    }
 }
diff --git a/clang/test/Analysis/call-invalidation.cpp b/clang/test/Analysis/call-invalidation.cpp
index fb2b892b31a1f..96869c5abeabb 100644
--- a/clang/test/Analysis/call-invalidation.cpp
+++ b/clang/test/Analysis/call-invalidation.cpp
@@ -197,7 +197,7 @@ int testStdCtorDoesNotInvalidateParentObject() {
 int testStdCtorDoesNotInvalidateParentObjectSwapped() {
   StdWrappingOpaqueSwapped obj;
   int x = obj.o.nested_member; // no-garbage: std::Opaque::ctor might initialized this
-  int y = obj.uninit; // expected-warning {{Assigned value is garbage or undefined}}
+  int y = obj.uninit; // expected-warning {{Assigned value is undefined and not meaningful}}
   return x + y;
 }
 
@@ -277,6 +277,6 @@ struct StdWrappingFancyOpaque {
 int testNestedStdNamespacesAndRecords() {
   StdWrappingFancyOpaque obj;
   int x = obj.o.nested_member; // no-garbage: ctor
-  int y = obj.uninit; // expected-warning {{Assigned value is garbage or undefined}}
+  int y = obj.uninit; // expected-warning {{Assigned value is undefined and not meaningful}}
   return x + y;
 }
diff --git a/clang/test/Analysis/ctor-array.cpp b/clang/test/Analysis/ctor-array.cpp
index 52600b314b010..4a35df7834d6a 100644
--- a/clang/test/Analysis/ctor-array.cpp
+++ b/clang/test/Analysis/ctor-array.cpp
@@ -12,19 +12,19 @@ struct s {
 void a1(void) {
   s arr[3];
   int x = arr[0].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void a2(void) {
   s arr[3];
   int x = arr[1].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void a3(void) {
   s arr[3];
   int x = arr[2].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 struct s2 {
@@ -37,7 +37,7 @@ void b1(void) {
 
   clang_analyzer_eval(arr[0].y == 2); // expected-warning{{TRUE}}
   int x = arr[0].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void b2(void) {
@@ -45,7 +45,7 @@ void b2(void) {
 
   clang_analyzer_eval(arr[1].y == 2); // expected-warning{{TRUE}}
   int x = arr[1].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void b3(void) {
@@ -53,7 +53,7 @@ void b3(void) {
 
   clang_analyzer_eval(arr[2].y == 2); // expected-warning{{TRUE}}
   int x = arr[2].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void c1(void) {
@@ -70,7 +70,7 @@ void c1(void) {
 
     clang_analyzer_eval(arr[1].y == 2); // expected-warning{{TRUE}}
     int x = arr[1].x;
-    // expected-warning at -1{{Assigned value is garbage or undefined}}
+    // expected-warning at -1{{Assigned value is undefined and not meaningful}}
   }
 }
 
@@ -100,7 +100,7 @@ void e1(void) {
   clang_analyzer_eval(arr[1].arr[1].y == 2); // expected-warning{{TRUE}}
 
   int x = arr[1].sarr[1].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void f1(void) {
@@ -108,7 +108,7 @@ void f1(void) {
 
   clang_analyzer_eval(arr[1][1].y == 2); // expected-warning{{TRUE}}
   int x = arr[1][1].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 struct s5 {
@@ -168,14 +168,14 @@ void h2(void) {
   s a[2][2], b[2][2];
 
   int x = a[1][1].x;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 void h3(void) {
   s a[2][2], b[2][2];
 
   int x = b[1][1].y;
-  // expected-warning at -1{{Assigned value is garbage or undefined}}
+  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
 }
 
 struct Base {
diff --git a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
index 4826b38b98a56..c972b85771e53 100644
--- a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
+++ b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
@@ -47,8 +47,8 @@ int initFromBlock(void) {
     int p;               // expected-note{{'p' declared without an initial value}}
     initializer1(&p, 0); // expected-note{{Calling 'initializer1'}}
                          // expected-note at -1{{Returning from 'initializer1'}}
-    z = p;               // expected-warning{{Assigned value is garbage or undefined}}
-                         // expected-note at -1{{Assigned value is garbage or undefined}}
+    z = p;               // expected-warning{{Assigned value is undefined and not meaningful}}
+                         // expected-note at -1{{Assigned value is undefined and not meaningful}}
   }();
   return z;
 }
diff --git a/clang/test/Analysis/fread.c b/clang/test/Analysis/fread.c
index 8dc998ea1e899..61b72122d328e 100644
--- a/clang/test/Analysis/fread.c
+++ b/clang/test/Analysis/fread.c
@@ -113,9 +113,9 @@ void random_access_read1(int index) {
     case 0:
       // c[0] is not mutated by fread.
       if (success) {
-        char p = c[0]; // expected-warning {{Assigned value is garbage or undefined}} We kept the first byte intact.
+        char p = c[0]; // expected-warning {{Assigned value is undefined and not meaningful}} We kept the first byte intact.
       } else {
-        char p = c[0]; // expected-warning {{Assigned value is garbage or undefined}} We kept the first byte intact.
+        char p = c[0]; // expected-warning {{Assigned value is undefined and not meaningful}} We kept the first byte intact.
       }
       break;
 
@@ -147,9 +147,9 @@ void random_access_read1(int index) {
     case 3:
       // c[3] is not mutated by fread.
       if (success) {
-        long p = c[3]; // expected-warning {{Assigned value is garbage or undefined}}
+        long p = c[3]; // expected-warning {{Assigned value is undefined and not meaningful}}
       } else {
-        long p = c[3]; // expected-warning {{Assigned value is garbage or undefined}}
+        long p = c[3]; // expected-warning {{Assigned value is undefined and not meaningful}}
       }
       break;
     }
@@ -169,10 +169,10 @@ void random_access_read2(int b) {
         clang_analyzer_isTainted(p); // expected-warning {{YES}}
         clang_analyzer_dump(p); // expected-warning {{conj_}}
       } else {
-        int p = buffer[0]; // expected-warning {{Assigned value is garbage or undefined}}
+        int p = buffer[0]; // expected-warning {{Assigned value is undefined and not meaningful}}
       }
     } else {
-      int p = buffer[0]; // expected-warning {{Assigned value is garbage or undefined}}
+      int p = buffer[0]; // expected-warning {{Assigned value is undefined and not meaningful}}
     }
     fclose(fp);
   }
@@ -283,9 +283,9 @@ void compound_read2(void) {
   if (fp) {
     struct S s; // s.a is not touched by fread.
     if (1 == fread(&s.b, sizeof(s.b), 1, fp)) {
-      long p = s.a; // expected-warning {{Assigned value is garbage or undefined}}
+      long p = s.a; // expected-warning {{Assigned value is undefined and not meaningful}}
     } else {
-      long p = s.a; // expected-warning {{Assigned value is garbage or undefined}}
+      long p = s.a; // expected-warning {{Assigned value is undefined and not meaningful}}
     }
     fclose(fp);
   }
@@ -296,9 +296,9 @@ void var_read(void) {
   if (fp) {
     int a, b; // 'a' is not touched by fread.
     if (1 == fread(&b, sizeof(b), 1, fp)) {
-      long p = a; // expected-warning{{Assigned value is garbage or undefined}}
+      long p = a; // expected-warning{{Assigned value is undefined and not meaningful}}
     } else {
-      long p = a; // expected-warning{{Assigned value is garbage or undefined}}
+      long p = a; // expected-warning{{Assigned value is undefined and not meaningful}}
     }
     fclose(fp);
   }
diff --git a/clang/test/Analysis/implicit-ctor-undef-value.cpp b/clang/test/Analysis/implicit-ctor-undef-value.cpp
index 87824c0533a0a..f5d805609e5cc 100644
--- a/clang/test/Analysis/implicit-ctor-undef-value.cpp
+++ b/clang/test/Analysis/implicit-ctor-undef-value.cpp
@@ -9,8 +9,8 @@ struct S {
 
 // Warning is in a weird position because the body of the constructor is
 // missing. Specify which field is being assigned.
-class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is garbage or undefined}}
-          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is garbage or undefined}}
+class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
+          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
   int x, y;
   S s;
 
@@ -34,8 +34,8 @@ class C {
   // It is not necessary to specify which field is being assigned to.
   C(const C &c):
     x(c.x),
-    y(c.y) // expected-warning{{Assigned value is garbage or undefined}}
-           // expected-note at -1{{Assigned value is garbage or undefined}}
+    y(c.y) // expected-warning{{Assigned value is undefined and not meaningful}}
+           // expected-note at -1{{Assigned value is undefined and not meaningful}}
   {}
 };
 
@@ -53,8 +53,8 @@ struct S {
   S(const S &) {}
 };
 
-class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is garbage or undefined}}
-          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is garbage or undefined}}
+class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
+          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
   int x, y;
   S s;
 
diff --git a/clang/test/Analysis/initialization.c b/clang/test/Analysis/initialization.c
index d394a902ffeb7..daa40662477d9 100644
--- a/clang/test/Analysis/initialization.c
+++ b/clang/test/Analysis/initialization.c
@@ -49,13 +49,13 @@ void glob_array_index2(void) {
 
 void glob_invalid_index1(void) {
   int x = -42;
-  int res = glob_arr1[x]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr1[x]; // expected-warning{{undefined and not meaningful}}
 }
 
 void glob_invalid_index2(void) {
   const int *ptr = glob_arr1;
   int x = 42;
-  int res = ptr[x]; // expected-warning{{garbage or undefined}}
+  int res = ptr[x]; // expected-warning{{undefined and not meaningful}}
 }
 
 const int glob_arr2[3][3] = {[0][0] = 1, [1][1] = 5, [2][0] = 7};
@@ -81,12 +81,12 @@ void negative_index(void) {
 
 void glob_invalid_index3(void) {
   int x = -1, y = -1;
-  int res = glob_arr2[x][y]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr2[x][y]; // expected-warning{{undefined and not meaningful}}
 }
 
 void glob_invalid_index4(void) {
   int x = 3, y = 2;
-  int res = glob_arr2[x][y]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr2[x][y]; // expected-warning{{undefined and not meaningful}}
 }
 
 const int glob_arr_no_init[10];
@@ -106,12 +106,12 @@ void glob_arr_index5(void) {
 
 void glob_invalid_index5(void) {
   int x = 42;
-  int res = glob_arr3[x]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr3[x]; // expected-warning{{undefined and not meaningful}}
 }
 
 void glob_invalid_index6(void) {
   int x = -42;
-  int res = glob_arr3[x]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr3[x]; // expected-warning{{undefined and not meaningful}}
 }
 
 const int glob_arr4[];              // IncompleteArrayType
@@ -126,10 +126,10 @@ void glob_arr_index6(void) {
 
 void glob_invalid_index7(void) {
   int x = 42;
-  int res = glob_arr4[x]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr4[x]; // expected-warning{{undefined and not meaningful}}
 }
 
 void glob_invalid_index8(void) {
   int x = -42;
-  int res = glob_arr4[x]; // expected-warning{{garbage or undefined}}
+  int res = glob_arr4[x]; // expected-warning{{undefined and not meaningful}}
 }
diff --git a/clang/test/Analysis/initialization.cpp b/clang/test/Analysis/initialization.cpp
index e624ef5bae9e9..4de98b7a189f7 100644
--- a/clang/test/Analysis/initialization.cpp
+++ b/clang/test/Analysis/initialization.cpp
@@ -24,7 +24,7 @@ void glob_array_index1() {
 void glob_invalid_index1() {
   const int *ptr = glob_arr1;
   int idx = -42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_symbolic_index1(int idx) {
@@ -44,13 +44,13 @@ void glob_ptr_index1() {
 void glob_invalid_index2() {
   const int *ptr = glob_arr2;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 const float glob_arr3[] = {
     0.0000, 0.0235, 0.0470, 0.0706, 0.0941, 0.1176};
 float no_warn_garbage_value() {
-  return glob_arr3[0]; // no-warning (garbage or undefined)
+  return glob_arr3[0]; // no-warning (not meaningful)
 }
 
 int const glob_arr4[4][2] = {};
@@ -62,13 +62,13 @@ void glob_array_index2() {
 
 void glob_invalid_index3() {
   int idx = -42;
-  auto x = glob_arr4[1][idx]; // expected-warning{{garbage or undefined}}
+  auto x = glob_arr4[1][idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_invalid_index4() {
   const int *ptr = glob_arr4[1];
   int idx = -42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 int const glob_arr5[4][2] = {{1}, 3, 4, 5};
@@ -94,13 +94,13 @@ void glob_ptr_index2() {
 
 void glob_invalid_index5() {
   int idx = -42;
-  auto x = glob_arr5[1][idx]; // expected-warning{{garbage or undefined}}
+  auto x = glob_arr5[1][idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_invalid_index6() {
   int const *ptr = &glob_arr5[1][0];
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 extern const int glob_arr_no_init[10];
@@ -138,13 +138,13 @@ void glob_ptr_index3() {
 
 void glob_invalid_index7() {
   int idx = -42;
-  auto x = glob_arr6[idx]; // expected-warning{{garbage or undefined}}
+  auto x = glob_arr6[idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_invalid_index8() {
   const char *ptr = glob_arr6;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 char const glob_arr7[5] = {"123"};
@@ -158,13 +158,13 @@ void glob_array_index6() {
 
 void glob_invalid_index9() {
   int idx = -42;
-  auto x = glob_arr7[idx]; // expected-warning{{garbage or undefined}}
+  auto x = glob_arr7[idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_invalid_index10() {
   const char *ptr = glob_arr7;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{garbage or undefined}}
+  auto x = ptr[idx]; // expected-warning{{not meaningful}}
 }
 
 char const *const glob_ptr8 = "123";
@@ -180,12 +180,12 @@ void glob_ptr_index4() {
 
 void glob_invalid_index11() {
   int idx = -42;
-  auto x = glob_ptr8[idx]; // expected-warning{{garbage or undefined}}
+  auto x = glob_ptr8[idx]; // expected-warning{{not meaningful}}
 }
 
 void glob_invalid_index12() {
   int idx = 42;
-  // FIXME: Should warn {{garbage or undefined}}
+  // FIXME: Should warn {{not meaningful}}
   // We should take into account a declaration in which the literal is used.
   auto x = glob_ptr8[idx]; // no-warning
 }
diff --git a/clang/test/Analysis/misc-ps.c b/clang/test/Analysis/misc-ps.c
index d2f73ecb23082..7521c077a8517 100644
--- a/clang/test/Analysis/misc-ps.c
+++ b/clang/test/Analysis/misc-ps.c
@@ -15,7 +15,7 @@ int rdar93730392(void) {
   int extra = (2 + foo_rdar9373039 ("Clang") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("Clang")) % 4)) % 4)) + (2 + foo_rdar9373039 ("1.0") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("1.0")) % 4)) % 4)); // expected-warning {{never read}}
 
   for (int i = 0 ; i < size_rdar9373039 ; ++i)
-    j += x; // expected-warning {{garbage}}
+    j += x; // expected-warning {{undefined and not meaningful}}
 
   return j;
 }
@@ -156,7 +156,7 @@ int rdar_12075238_(unsigned long count) {
 // Test that we handle an uninitialized value within a logical expression.
 void PR14635(int *p) {
   int a = 0, b;
-  *p = a || b; // expected-warning {{Assigned value is garbage or undefined}}
+  *p = a || b; // expected-warning {{Assigned value is undefined and not meaningful}}
 }
 
 // Test handling floating point values with unary '!'.
diff --git a/clang/test/Analysis/operator-calls.cpp b/clang/test/Analysis/operator-calls.cpp
index 64abda150c5a1..b8d50974026d6 100644
--- a/clang/test/Analysis/operator-calls.cpp
+++ b/clang/test/Analysis/operator-calls.cpp
@@ -121,16 +121,16 @@ namespace SynthesizedAssignment {
   void testNoWarning() {
 
     B v, u;
-    u = v; // expected-warning at 110{{Assigned value is garbage or undefined}}
+    u = v; // expected-warning at 110{{Assigned value is undefined and not meaningful}}
     // expected-note at -1{{Calling defaulted copy assignment operator for 'B'}}
-    // expected-note at 110{{Assigned value is garbage or undefined}}
+    // expected-note at 110{{Assigned value is undefined and not meaningful}}
   }
 
   void testNoWarningMove() {
     B v, u;
-    u = static_cast<B &&>(v); // expected-warning at 111{{Assigned value is garbage or undefined}}
+    u = static_cast<B &&>(v); // expected-warning at 111{{Assigned value is undefined and not meaningful}}
     // expected-note at -1{{Calling defaulted move assignment operator for 'B'}}
-    // expected-note at 111{{Assigned value is garbage or undefined}}
+    // expected-note at 111{{Assigned value is undefined and not meaningful}}
   }
 
   void testConsistency() {
diff --git a/clang/test/Analysis/stack-addr-ps.cpp b/clang/test/Analysis/stack-addr-ps.cpp
index 73e9dbeca460f..6a325450dd2e8 100644
--- a/clang/test/Analysis/stack-addr-ps.cpp
+++ b/clang/test/Analysis/stack-addr-ps.cpp
@@ -106,7 +106,7 @@ struct TS {
 };
 
 int* f5() {
-  int& i = i; // expected-warning {{Assigned value is garbage or undefined}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}}
+  int& i = i; // expected-warning {{Assigned value is undefined and not meaningful}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}}
   return &i;
 }
 
diff --git a/clang/test/Analysis/uninit-const.c b/clang/test/Analysis/uninit-const.c
index 06fca22c83c6d..381e78f94eff0 100644
--- a/clang/test/Analysis/uninit-const.c
+++ b/clang/test/Analysis/uninit-const.c
@@ -94,8 +94,8 @@ void f_6_1(void) {
 
 void f_7(void) {
       int z;        // expected-note {{'z' declared without an initial value}}
-      int y=z;      // expected-warning {{Assigned value is garbage or undefined}}
-                    // expected-note at -1 {{Assigned value is garbage or undefined}}
+      int y=z;      // expected-warning {{Assigned value is undefined and not meaningful}}
+                    // expected-note at -1 {{Assigned value is undefined and not meaningful}}
       doStuff3(y);
 }
 
@@ -133,26 +133,26 @@ void f_12(void) {
 // https://bugs.llvm.org/show_bug.cgi?id=35419
 void f11_0(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  x++; // expected-warning {{The expression is an uninitialized value. The computed value will also be garbage}}
-       // expected-note at -1 {{The expression is an uninitialized value. The computed value will also be garbage}}
+  x++; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
+       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_1(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  ++x; // expected-warning {{The expression is an uninitialized value. The computed value will also be garbage}}
-       // expected-note at -1 {{The expression is an uninitialized value. The computed value will also be garbage}}
+  ++x; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
+       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_2(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  x--; // expected-warning {{The expression is an uninitialized value. The computed value will also be garbage}}
-       // expected-note at -1 {{The expression is an uninitialized value. The computed value will also be garbage}}
+  x--; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
+       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_3(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  --x; // expected-warning {{The expression is an uninitialized value. The computed value will also be garbage}}
-       // expected-note at -1 {{The expression is an uninitialized value. The computed value will also be garbage}}
+  --x; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
+       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 
diff --git a/clang/test/Analysis/uninit-const.cpp b/clang/test/Analysis/uninit-const.cpp
index 3ffcda1294abb..b57ce0c1f90af 100644
--- a/clang/test/Analysis/uninit-const.cpp
+++ b/clang/test/Analysis/uninit-const.cpp
@@ -68,11 +68,11 @@ int& f6_1_sub(int &p) {
 
 void f6_1(void) {
   int t;               // expected-note{{'t' declared without an initial value}}
-  int p = f6_1_sub(t); //expected-warning {{Assigned value is garbage or undefined}}
+  int p = f6_1_sub(t); //expected-warning {{Assigned value is undefined and not meaningful}}
                        //expected-note at -1 {{Passing value via 1st parameter 'p'}}
                        //expected-note at -2 {{Calling 'f6_1_sub'}}
                        //expected-note at -3 {{Returning from 'f6_1_sub'}}
-                       //expected-note at -4 {{Assigned value is garbage or undefined}}
+                       //expected-note at -4 {{Assigned value is undefined and not meaningful}}
   int q = p;
   doStuff6(q);
 }
diff --git a/clang/test/Analysis/uninit-structured-binding-array.cpp b/clang/test/Analysis/uninit-structured-binding-array.cpp
index ed5439492818b..ca8d9206c0f04 100644
--- a/clang/test/Analysis/uninit-structured-binding-array.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-array.cpp
@@ -7,7 +7,7 @@ void array_value_a(void) {
   auto [a, b] = arr;
   arr[0] = 0;
 
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_value_b(void) {
@@ -30,7 +30,7 @@ void array_value_c(void) {
   clang_analyzer_eval(b == arr[1]); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_value_d(void) {
@@ -43,7 +43,7 @@ void array_value_d(void) {
   clang_analyzer_eval(b == arr[1]); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_value_e(void) {
@@ -72,13 +72,13 @@ void array_value_f(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is garbage or undefined}}
+  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_lref_a(void) {
   int arr[2];
   auto &[a, b] = arr;
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_lref_b(void) {
@@ -100,7 +100,7 @@ void array_lref_c(void) {
   clang_analyzer_eval(a == 1); // expected-warning{{TRUE}}
 
   int x = a; // no-warning
-  int y = b; // expected-warning{{Assigned value is garbage or undefined}}
+  int y = b; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_lref_d(void) {
@@ -113,7 +113,7 @@ void array_lref_d(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_lref_e(void) {
@@ -126,7 +126,7 @@ void array_lref_e(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_lref_f(void) {
@@ -155,13 +155,13 @@ void array_lref_g(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is garbage or undefined}}
+  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_rref_a(void) {
   int arr[2];
   auto &&[a, b] = arr;
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_rref_b(void) {
@@ -183,7 +183,7 @@ void array_rref_c(void) {
   clang_analyzer_eval(a == 1); // expected-warning{{TRUE}}
 
   int x = a; // no-warning
-  int y = b; // expected-warning{{Assigned value is garbage or undefined}}
+  int y = b; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_rref_d(void) {
@@ -196,7 +196,7 @@ void array_rref_d(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_rref_e(void) {
@@ -209,7 +209,7 @@ void array_rref_e(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_rref_f(void) {
@@ -238,7 +238,7 @@ void array_rref_g(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is garbage or undefined}}
+  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_change_a(void) {
@@ -276,7 +276,7 @@ void array_small_a(void) {
 
   auto [a, b, c, d, e] = arr;
 
-  int x = e; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = e; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void array_big_a(void) {
diff --git a/clang/test/Analysis/uninit-structured-binding-struct.cpp b/clang/test/Analysis/uninit-structured-binding-struct.cpp
index fec82c0d8589d..e2e601f9a16e7 100644
--- a/clang/test/Analysis/uninit-structured-binding-struct.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-struct.cpp
@@ -12,7 +12,7 @@ void a(void) {
 
   auto [i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void b(void) {
@@ -22,7 +22,7 @@ void b(void) {
   auto [i, j] = tst;
 
   clang_analyzer_eval(i == 1); // expected-warning{{TRUE}}
-  int y = j;                   // expected-warning{{Assigned value is garbage or undefined}}
+  int y = j;                   // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void c(void) {
@@ -30,7 +30,7 @@ void c(void) {
 
   auto &[i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void d(void) {
@@ -43,7 +43,7 @@ void d(void) {
   i = 2;
   clang_analyzer_eval(tst.a == 2); // expected-warning{{TRUE}}
 
-  int y = j; // expected-warning{{Assigned value is garbage or undefined}}
+  int y = j; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void e(void) {
@@ -63,7 +63,7 @@ void f(void) {
 
   auto &&[i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void g(void) {
@@ -73,7 +73,7 @@ void g(void) {
   auto &&[i, j] = tst;
 
   clang_analyzer_eval(i == 1); // expected-warning{{TRUE}}
-  int y = j;                   // expected-warning{{Assigned value is garbage or undefined}}
+  int y = j;                   // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 struct s2 {
diff --git a/clang/test/Analysis/uninit-structured-binding-tuple.cpp b/clang/test/Analysis/uninit-structured-binding-tuple.cpp
index bc5644474fc98..e7edf78b01011 100644
--- a/clang/test/Analysis/uninit-structured-binding-tuple.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-tuple.cpp
@@ -525,7 +525,7 @@ void uninit_a(void) {
 
   auto [a, b] = u;
 
-  int x = a; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 void uninit_b(void) {
@@ -533,7 +533,7 @@ void uninit_b(void) {
 
   auto [a, b] = u;
 
-  int x = b; // expected-warning{{Assigned value is garbage or undefined}}
+  int x = b; // expected-warning{{Assigned value is undefined and not meaningful}}
 }
 
 GENERATE_TUPLE_LIKE_STRUCT(UninitCall, int);
diff --git a/clang/test/Analysis/uninit-vals.m b/clang/test/Analysis/uninit-vals.m
index a6ec4fb74e128..af1638245863f 100644
--- a/clang/test/Analysis/uninit-vals.m
+++ b/clang/test/Analysis/uninit-vals.m
@@ -34,8 +34,8 @@ void test_uninit_pos(void) {
   struct TestUninit v1 = { 0, 0 };
   struct TestUninit v2 = test_uninit_aux();
   int z; // expected-note{{'z' declared without an initial value}}
-  v1.y = z; // expected-warning{{Assigned value is garbage or undefined}}
-            // expected-note at -1{{Assigned value is garbage or undefined}}
+  v1.y = z; // expected-warning{{Assigned value is undefined and not meaningful}}
+            // expected-note at -1{{Assigned value is undefined and not meaningful}}
   test_unit_aux2(v2.x + v1.y);
 }
 void test_uninit_pos_2(void) {
@@ -78,8 +78,8 @@ void testFoo(Foo *o) {
 void rdar_7780304(void) {
   typedef struct s_r7780304 { int x; } s_r7780304;
   s_r7780304 b;
-  b.x |= 1; // expected-warning{{The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage}}
-            // expected-note at -1{{The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage}}
+  b.x |= 1; // expected-warning{{The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful}}
+            // expected-note at -1{{The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful}}
 }
 
 
diff --git a/clang/test/Analysis/zero-size-non-pod-array.cpp b/clang/test/Analysis/zero-size-non-pod-array.cpp
index a2117bc80eac8..f897264e08f8e 100644
--- a/clang/test/Analysis/zero-size-non-pod-array.cpp
+++ b/clang/test/Analysis/zero-size-non-pod-array.cpp
@@ -124,7 +124,7 @@ void zeroSizeArrayLambdaCaptureUndefined1() {
     int n;
 
     auto l = [arr, n]{
-        int x = n; //expected-warning{{Assigned value is garbage or undefined}}
+        int x = n; //expected-warning{{Assigned value is undefined and not meaningful}}
         (void) x;
     };
 
@@ -137,7 +137,7 @@ void zeroSizeArrayLambdaCaptureUndefined2() {
     int n;
 
     [arr, n]{
-        int x = n; //expected-warning{{Assigned value is garbage or undefined}}
+        int x = n; //expected-warning{{Assigned value is undefined and not meaningful}}
         (void) x;
     }();
 }

>From ec0b49ad499493f65f6496088efb09ea5831b54f Mon Sep 17 00:00:00 2001
From: David Tarditi <d_tarditi at apple.com>
Date: Mon, 10 Feb 2025 12:04:11 -0800
Subject: [PATCH 2/3] Fix clang format issue.

---
 .../lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
index f13de315ed7b5..bdf7052793514 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
@@ -88,8 +88,7 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
       if (CD->isImplicit()) {
         for (auto *I : CD->inits()) {
           if (I->getInit()->IgnoreImpCasts() == StoreE) {
-            OS << "Value assigned to field '"
-               << I->getMember()->getName()
+            OS << "Value assigned to field '" << I->getMember()->getName()
                << "' in implicit constructor is undefined and not meaningful.";
             break;
           }

>From f38159046cfdce6c3c6d22855acd0081fa083613 Mon Sep 17 00:00:00 2001
From: David Tarditi <d_tarditi at apple.com>
Date: Sat, 22 Feb 2025 16:07:34 -0800
Subject: [PATCH 3/3] [analyzer] Change warnings to use the term uninitialized
 instead.

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.
---
 .../Checkers/UndefinedAssignmentChecker.cpp   | 11 ++++---
 .../Inputs/expected-plists/edges-new.mm.plist | 10 +++----
 .../expected-plists/plist-output.m.plist      | 10 +++----
 clang/test/Analysis/a_flaky_crash.cpp         |  2 +-
 .../analysis-after-multiple-dtors.cpp         |  2 +-
 clang/test/Analysis/array-init-loop.cpp       |  6 ++--
 clang/test/Analysis/array-punned-region.c     |  2 +-
 clang/test/Analysis/builtin_overflow_notes.c  |  4 +--
 clang/test/Analysis/call-invalidation.cpp     |  4 +--
 clang/test/Analysis/ctor-array.cpp            | 22 +++++++-------
 clang/test/Analysis/ctor.mm                   | 16 +++++-----
 .../diagnostics/no-store-func-path-notes.m    |  4 +--
 clang/test/Analysis/fread.c                   | 20 ++++++-------
 .../Analysis/implicit-ctor-undef-value.cpp    | 12 ++++----
 clang/test/Analysis/initialization.c          | 16 +++++-----
 clang/test/Analysis/initialization.cpp        | 24 +++++++--------
 clang/test/Analysis/kmalloc-linux.c           |  8 ++---
 clang/test/Analysis/malloc-annotations.c      |  2 +-
 clang/test/Analysis/malloc.c                  |  2 +-
 clang/test/Analysis/misc-ps.c                 |  4 +--
 clang/test/Analysis/operator-calls.cpp        |  8 ++---
 clang/test/Analysis/stack-addr-ps.cpp         |  2 +-
 clang/test/Analysis/undef-buffers.c           |  4 +--
 clang/test/Analysis/uninit-const.c            | 20 ++++++-------
 clang/test/Analysis/uninit-const.cpp          |  4 +--
 .../uninit-structured-binding-array.cpp       | 30 +++++++++----------
 .../uninit-structured-binding-struct.cpp      | 12 ++++----
 .../uninit-structured-binding-tuple.cpp       |  4 +--
 clang/test/Analysis/uninit-vals.m             |  8 ++---
 .../test/Analysis/zero-size-non-pod-array.cpp |  4 +--
 30 files changed, 138 insertions(+), 139 deletions(-)

diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
index bdf7052793514..e98de333f8dd3 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
@@ -23,7 +23,7 @@ using namespace ento;
 namespace {
 class UndefinedAssignmentChecker
   : public Checker<check::Bind> {
-  const BugType BT{this, "Assigned value is undefined and not meaningful"};
+  const BugType BT{this, "Assigned value is uninitialized"};
 
 public:
   void checkBind(SVal location, SVal val, const Stmt *S,
@@ -57,8 +57,7 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
 
   while (StoreE) {
     if (const UnaryOperator *U = dyn_cast<UnaryOperator>(StoreE)) {
-      OS << "The expression is an uninitialized value, so the computed value "
-         << "is not meaningful";
+      OS << "The expression uses uninitialized memory";
 
       ex = U->getSubExpr();
       break;
@@ -67,8 +66,8 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
     if (const BinaryOperator *B = dyn_cast<BinaryOperator>(StoreE)) {
       if (B->isCompoundAssignmentOp()) {
         if (C.getSVal(B->getLHS()).isUndef()) {
-          OS << "The left expression of the compound assignment is an "
-             << "uninitialized value, so the computed value is not meaningful";
+          OS << "The left expression of the compound assignment uses "
+             << "uninitialized memory";
           ex = B->getLHS();
           break;
         }
@@ -89,7 +88,7 @@ void UndefinedAssignmentChecker::checkBind(SVal location, SVal val,
         for (auto *I : CD->inits()) {
           if (I->getInit()->IgnoreImpCasts() == StoreE) {
             OS << "Value assigned to field '" << I->getMember()->getName()
-               << "' in implicit constructor is undefined and not meaningful.";
+               << "' in implicit constructor is uninitialized";
             break;
           }
         }
diff --git a/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist b/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
index dd731e705c9b0..04f9d3e41ebf0 100644
--- a/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
+++ b/clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
@@ -2578,17 +2578,17 @@
      </array>
      <key>depth</key><integer>0</integer>
      <key>extended_message</key>
-     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+     <string>The left expression of the compound assignment uses uninitialized memory</string>
      <key>message</key>
-     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+     <string>The left expression of the compound assignment uses uninitialized memory</string>
     </dict>
    </array>
-   <key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+   <key>description</key><string>The left expression of the compound assignment uses uninitialized memory</string>
    <key>category</key><string>Logic error</string>
-   <key>type</key><string>Assigned value is undefined and not meaningful</string>
+   <key>type</key><string>Assigned value is uninitialized</string>
    <key>check_name</key><string>core.uninitialized.Assign</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>936a5fabf36091d0c1e1e1553232d6f5</string>
+   <key>issue_hash_content_of_line_in_context</key><string>324827600c298776167cd9562f71bda6</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>test_objc_fast_enumeration_2</string>
   <key>issue_hash_function_offset</key><string>5</string>
diff --git a/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist b/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
index 392474d24487c..d8ed8d49e3ac7 100644
--- a/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
+++ b/clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
@@ -5864,17 +5864,17 @@
      </array>
      <key>depth</key><integer>0</integer>
      <key>extended_message</key>
-     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+     <string>The left expression of the compound assignment uses uninitialized memory</string>
      <key>message</key>
-     <string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+     <string>The left expression of the compound assignment uses uninitialized memory</string>
     </dict>
    </array>
-   <key>description</key><string>The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful</string>
+   <key>description</key><string>The left expression of the compound assignment uses uninitialized memory</string>
    <key>category</key><string>Logic error</string>
-   <key>type</key><string>Assigned value is undefined and not meaningful</string>
+   <key>type</key><string>Assigned value is uninitialized</string>
    <key>check_name</key><string>core.uninitialized.Assign</string>
    <!-- This hash is experimental and going to change! -->
-   <key>issue_hash_content_of_line_in_context</key><string>c1d7b1284317d7e45bda4bfa6b3a281e</string>
+   <key>issue_hash_content_of_line_in_context</key><string>faa8858031ed123ff98cc23cf14d462f</string>
   <key>issue_context_kind</key><string>function</string>
   <key>issue_context</key><string>test_loop_fast_enumeration</string>
   <key>issue_hash_function_offset</key><string>5</string>
diff --git a/clang/test/Analysis/a_flaky_crash.cpp b/clang/test/Analysis/a_flaky_crash.cpp
index 5a3fa25f82baa..1ce6297f5e4e9 100644
--- a/clang/test/Analysis/a_flaky_crash.cpp
+++ b/clang/test/Analysis/a_flaky_crash.cpp
@@ -14,7 +14,7 @@ bool bar(S);
 void foo() {
   int x;
   if (true && bar(S()))
-    ++x; // expected-warning{{The expression is an uninitialized value, so the computed value is not meaningful}}
+    ++x; // expected-warning{{The expression uses uninitialized memory}}
 }
 
 // 256 copies of the same run-line to make it crash more often when it breaks.
diff --git a/clang/test/Analysis/analysis-after-multiple-dtors.cpp b/clang/test/Analysis/analysis-after-multiple-dtors.cpp
index c202752ee1a56..89ac90f976a6d 100644
--- a/clang/test/Analysis/analysis-after-multiple-dtors.cpp
+++ b/clang/test/Analysis/analysis-after-multiple-dtors.cpp
@@ -23,6 +23,6 @@ int main() {
 
   int x;
   int y = x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
   (void)y;
 }
diff --git a/clang/test/Analysis/array-init-loop.cpp b/clang/test/Analysis/array-init-loop.cpp
index cb26bda95abf8..dfd1f9553a108 100644
--- a/clang/test/Analysis/array-init-loop.cpp
+++ b/clang/test/Analysis/array-init-loop.cpp
@@ -19,7 +19,7 @@ void array_uninit() {
 
   auto [a, b, c, d, e] = arr;
 
-  int x = e; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = e; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void lambda_init() {
@@ -168,7 +168,7 @@ struct S3_duplicate {
 void array_uninit_non_pod() {
   S3 arr[1];
 
-  auto [a] = arr; // expected-warning at 159{{ in implicit constructor is undefined and not meaningful}}
+  auto [a] = arr; // expected-warning at 159{{ in implicit constructor is uninitialized}}
 }
 
 void lambda_init_non_pod() {
@@ -191,7 +191,7 @@ void lambda_init_non_pod() {
 void lambda_uninit_non_pod() {
   S3_duplicate arr[4];
 
-  int l = [arr] { return arr[3].i; }(); // expected-warning at 164{{ in implicit constructor is undefined and not meaningful }}
+  int l = [arr] { return arr[3].i; }(); // expected-warning at 164{{ in implicit constructor is uninitialized }}
 }
 
 // If this struct is being copy/move constructed by the implicit ctors, ArrayInitLoopExpr
diff --git a/clang/test/Analysis/array-punned-region.c b/clang/test/Analysis/array-punned-region.c
index c997611e2d3a7..f819aacace6a8 100644
--- a/clang/test/Analysis/array-punned-region.c
+++ b/clang/test/Analysis/array-punned-region.c
@@ -20,7 +20,7 @@ void array_struct_bitfield_1() {
 int array_struct_bitfield_2() {
   BITFIELD_CAST ff = {0};
   BITFIELD_CAST *pff = &ff;
-  int a = *((int *)pff + 2); // expected-warning{{Assigned value is undefined and not meaningful [core.uninitialized.Assign]}}
+  int a = *((int *)pff + 2); // expected-warning{{Assigned value is uninitialized [core.uninitialized.Assign]}}
   return a;
 }
 
diff --git a/clang/test/Analysis/builtin_overflow_notes.c b/clang/test/Analysis/builtin_overflow_notes.c
index e8d0e60ad80b0..5fa2156df925c 100644
--- a/clang/test/Analysis/builtin_overflow_notes.c
+++ b/clang/test/Analysis/builtin_overflow_notes.c
@@ -23,8 +23,8 @@ void test_overflow_note(int a, int b)
 
    if (__builtin_add_overflow(a, b, &res)) { // expected-note {{Assuming overflow}}
                                              // expected-note at -1 {{Taking true branch}}
-     int var = res; // expected-warning{{Assigned value is undefined and not meaningful}}
-                    // expected-note at -1 {{Assigned value is undefined and not meaningful}}
+     int var = res; // expected-warning{{Assigned value is uninitialized}}
+                    // expected-note at -1 {{Assigned value is uninitialized}}
      return;
    }
 }
diff --git a/clang/test/Analysis/call-invalidation.cpp b/clang/test/Analysis/call-invalidation.cpp
index 96869c5abeabb..cb503023a1071 100644
--- a/clang/test/Analysis/call-invalidation.cpp
+++ b/clang/test/Analysis/call-invalidation.cpp
@@ -197,7 +197,7 @@ int testStdCtorDoesNotInvalidateParentObject() {
 int testStdCtorDoesNotInvalidateParentObjectSwapped() {
   StdWrappingOpaqueSwapped obj;
   int x = obj.o.nested_member; // no-garbage: std::Opaque::ctor might initialized this
-  int y = obj.uninit; // expected-warning {{Assigned value is undefined and not meaningful}}
+  int y = obj.uninit; // expected-warning {{Assigned value is uninitialized}}
   return x + y;
 }
 
@@ -277,6 +277,6 @@ struct StdWrappingFancyOpaque {
 int testNestedStdNamespacesAndRecords() {
   StdWrappingFancyOpaque obj;
   int x = obj.o.nested_member; // no-garbage: ctor
-  int y = obj.uninit; // expected-warning {{Assigned value is undefined and not meaningful}}
+  int y = obj.uninit; // expected-warning {{Assigned value is uninitialized}}
   return x + y;
 }
diff --git a/clang/test/Analysis/ctor-array.cpp b/clang/test/Analysis/ctor-array.cpp
index 4a35df7834d6a..9d8190f5feca3 100644
--- a/clang/test/Analysis/ctor-array.cpp
+++ b/clang/test/Analysis/ctor-array.cpp
@@ -12,19 +12,19 @@ struct s {
 void a1(void) {
   s arr[3];
   int x = arr[0].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void a2(void) {
   s arr[3];
   int x = arr[1].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void a3(void) {
   s arr[3];
   int x = arr[2].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 struct s2 {
@@ -37,7 +37,7 @@ void b1(void) {
 
   clang_analyzer_eval(arr[0].y == 2); // expected-warning{{TRUE}}
   int x = arr[0].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void b2(void) {
@@ -45,7 +45,7 @@ void b2(void) {
 
   clang_analyzer_eval(arr[1].y == 2); // expected-warning{{TRUE}}
   int x = arr[1].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void b3(void) {
@@ -53,7 +53,7 @@ void b3(void) {
 
   clang_analyzer_eval(arr[2].y == 2); // expected-warning{{TRUE}}
   int x = arr[2].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void c1(void) {
@@ -70,7 +70,7 @@ void c1(void) {
 
     clang_analyzer_eval(arr[1].y == 2); // expected-warning{{TRUE}}
     int x = arr[1].x;
-    // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+    // expected-warning at -1{{Assigned value is uninitialized}}
   }
 }
 
@@ -100,7 +100,7 @@ void e1(void) {
   clang_analyzer_eval(arr[1].arr[1].y == 2); // expected-warning{{TRUE}}
 
   int x = arr[1].sarr[1].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void f1(void) {
@@ -108,7 +108,7 @@ void f1(void) {
 
   clang_analyzer_eval(arr[1][1].y == 2); // expected-warning{{TRUE}}
   int x = arr[1][1].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 struct s5 {
@@ -168,14 +168,14 @@ void h2(void) {
   s a[2][2], b[2][2];
 
   int x = a[1][1].x;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 void h3(void) {
   s a[2][2], b[2][2];
 
   int x = b[1][1].y;
-  // expected-warning at -1{{Assigned value is undefined and not meaningful}}
+  // expected-warning at -1{{Assigned value is uninitialized}}
 }
 
 struct Base {
diff --git a/clang/test/Analysis/ctor.mm b/clang/test/Analysis/ctor.mm
index 6ac9050fc29f7..d2665ced82d95 100644
--- a/clang/test/Analysis/ctor.mm
+++ b/clang/test/Analysis/ctor.mm
@@ -145,24 +145,24 @@ void test() {
 
     NonPOD() {}
     NonPOD(const NonPOD &Other)
-      : x(Other.x), y(Other.y) // expected-warning {{undefined}}
+      : x(Other.x), y(Other.y) // expected-warning {{uninitialized}}
     {
     }
     NonPOD(NonPOD &&Other)
-    : x(Other.x), y(Other.y) // expected-warning {{undefined}}
+    : x(Other.x), y(Other.y) // expected-warning {{uninitialized}}
     {
     }
 
     NonPOD &operator=(const NonPOD &Other)
     {
       x = Other.x;
-      y = Other.y; // expected-warning {{undefined}}
+      y = Other.y; // expected-warning {{uninitialized}}
       return *this;
     }
     NonPOD &operator=(NonPOD &&Other)
     {
       x = Other.x;
-      y = Other.y; // expected-warning {{undefined}}
+      y = Other.y; // expected-warning {{uninitialized}}
       return *this;
     }
   };
@@ -175,23 +175,23 @@ void test() {
 
       Inner() {}
       Inner(const Inner &Other)
-        : x(Other.x), y(Other.y) // expected-warning {{undefined}}
+        : x(Other.x), y(Other.y) // expected-warning {{uninitialized}}
       {
       }
       Inner(Inner &&Other)
-      : x(Other.x), y(Other.y) // expected-warning {{undefined}}
+      : x(Other.x), y(Other.y) // expected-warning {{uninitialized}}
       {
       }
 
       Inner &operator=(const Inner &Other)
       {
-        x = Other.x; // expected-warning {{undefined}}
+        x = Other.x; // expected-warning {{uninitialized}}
         y = Other.y;
         return *this;
       }
       Inner &operator=(Inner &&Other)
       {
-        x = Other.x; // expected-warning {{undefined}}
+        x = Other.x; // expected-warning {{uninitialized}}
         y = Other.y;
         return *this;
       }
diff --git a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
index c972b85771e53..623c7e23853de 100644
--- a/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
+++ b/clang/test/Analysis/diagnostics/no-store-func-path-notes.m
@@ -47,8 +47,8 @@ int initFromBlock(void) {
     int p;               // expected-note{{'p' declared without an initial value}}
     initializer1(&p, 0); // expected-note{{Calling 'initializer1'}}
                          // expected-note at -1{{Returning from 'initializer1'}}
-    z = p;               // expected-warning{{Assigned value is undefined and not meaningful}}
-                         // expected-note at -1{{Assigned value is undefined and not meaningful}}
+    z = p;               // expected-warning{{Assigned value is uninitialized}}
+                         // expected-note at -1{{Assigned value is uninitialized}}
   }();
   return z;
 }
diff --git a/clang/test/Analysis/fread.c b/clang/test/Analysis/fread.c
index 61b72122d328e..e3463bce3de47 100644
--- a/clang/test/Analysis/fread.c
+++ b/clang/test/Analysis/fread.c
@@ -113,9 +113,9 @@ void random_access_read1(int index) {
     case 0:
       // c[0] is not mutated by fread.
       if (success) {
-        char p = c[0]; // expected-warning {{Assigned value is undefined and not meaningful}} We kept the first byte intact.
+        char p = c[0]; // expected-warning {{Assigned value is uninitialized}} We kept the first byte intact.
       } else {
-        char p = c[0]; // expected-warning {{Assigned value is undefined and not meaningful}} We kept the first byte intact.
+        char p = c[0]; // expected-warning {{Assigned value is uninitialized}} We kept the first byte intact.
       }
       break;
 
@@ -147,9 +147,9 @@ void random_access_read1(int index) {
     case 3:
       // c[3] is not mutated by fread.
       if (success) {
-        long p = c[3]; // expected-warning {{Assigned value is undefined and not meaningful}}
+        long p = c[3]; // expected-warning {{Assigned value is uninitialized}}
       } else {
-        long p = c[3]; // expected-warning {{Assigned value is undefined and not meaningful}}
+        long p = c[3]; // expected-warning {{Assigned value is uninitialized}}
       }
       break;
     }
@@ -169,10 +169,10 @@ void random_access_read2(int b) {
         clang_analyzer_isTainted(p); // expected-warning {{YES}}
         clang_analyzer_dump(p); // expected-warning {{conj_}}
       } else {
-        int p = buffer[0]; // expected-warning {{Assigned value is undefined and not meaningful}}
+        int p = buffer[0]; // expected-warning {{Assigned value is uninitialized}}
       }
     } else {
-      int p = buffer[0]; // expected-warning {{Assigned value is undefined and not meaningful}}
+      int p = buffer[0]; // expected-warning {{Assigned value is uninitialized}}
     }
     fclose(fp);
   }
@@ -283,9 +283,9 @@ void compound_read2(void) {
   if (fp) {
     struct S s; // s.a is not touched by fread.
     if (1 == fread(&s.b, sizeof(s.b), 1, fp)) {
-      long p = s.a; // expected-warning {{Assigned value is undefined and not meaningful}}
+      long p = s.a; // expected-warning {{Assigned value is uninitialized}}
     } else {
-      long p = s.a; // expected-warning {{Assigned value is undefined and not meaningful}}
+      long p = s.a; // expected-warning {{Assigned value is uninitialized}}
     }
     fclose(fp);
   }
@@ -296,9 +296,9 @@ void var_read(void) {
   if (fp) {
     int a, b; // 'a' is not touched by fread.
     if (1 == fread(&b, sizeof(b), 1, fp)) {
-      long p = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+      long p = a; // expected-warning{{Assigned value is uninitialized}}
     } else {
-      long p = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+      long p = a; // expected-warning{{Assigned value is uninitialized}}
     }
     fclose(fp);
   }
diff --git a/clang/test/Analysis/implicit-ctor-undef-value.cpp b/clang/test/Analysis/implicit-ctor-undef-value.cpp
index f5d805609e5cc..3ef363b74b571 100644
--- a/clang/test/Analysis/implicit-ctor-undef-value.cpp
+++ b/clang/test/Analysis/implicit-ctor-undef-value.cpp
@@ -9,8 +9,8 @@ struct S {
 
 // Warning is in a weird position because the body of the constructor is
 // missing. Specify which field is being assigned.
-class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
-          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
+class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is uninitialized}}
+          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is uninitialized}}
   int x, y;
   S s;
 
@@ -34,8 +34,8 @@ class C {
   // It is not necessary to specify which field is being assigned to.
   C(const C &c):
     x(c.x),
-    y(c.y) // expected-warning{{Assigned value is undefined and not meaningful}}
-           // expected-note at -1{{Assigned value is undefined and not meaningful}}
+    y(c.y) // expected-warning{{Assigned value is uninitialized}}
+           // expected-note at -1{{Assigned value is uninitialized}}
   {}
 };
 
@@ -53,8 +53,8 @@ struct S {
   S(const S &) {}
 };
 
-class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
-          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is undefined and not meaningful}}
+class C { // expected-warning{{Value assigned to field 'y' in implicit constructor is uninitialized}}
+          // expected-note at -1{{Value assigned to field 'y' in implicit constructor is uninitialized}}
   int x, y;
   S s;
 
diff --git a/clang/test/Analysis/initialization.c b/clang/test/Analysis/initialization.c
index daa40662477d9..bd003b721d91d 100644
--- a/clang/test/Analysis/initialization.c
+++ b/clang/test/Analysis/initialization.c
@@ -49,13 +49,13 @@ void glob_array_index2(void) {
 
 void glob_invalid_index1(void) {
   int x = -42;
-  int res = glob_arr1[x]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr1[x]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index2(void) {
   const int *ptr = glob_arr1;
   int x = 42;
-  int res = ptr[x]; // expected-warning{{undefined and not meaningful}}
+  int res = ptr[x]; // expected-warning{{uninitialized}}
 }
 
 const int glob_arr2[3][3] = {[0][0] = 1, [1][1] = 5, [2][0] = 7};
@@ -81,12 +81,12 @@ void negative_index(void) {
 
 void glob_invalid_index3(void) {
   int x = -1, y = -1;
-  int res = glob_arr2[x][y]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr2[x][y]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index4(void) {
   int x = 3, y = 2;
-  int res = glob_arr2[x][y]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr2[x][y]; // expected-warning{{uninitialized}}
 }
 
 const int glob_arr_no_init[10];
@@ -106,12 +106,12 @@ void glob_arr_index5(void) {
 
 void glob_invalid_index5(void) {
   int x = 42;
-  int res = glob_arr3[x]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr3[x]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index6(void) {
   int x = -42;
-  int res = glob_arr3[x]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr3[x]; // expected-warning{{uninitialized}}
 }
 
 const int glob_arr4[];              // IncompleteArrayType
@@ -126,10 +126,10 @@ void glob_arr_index6(void) {
 
 void glob_invalid_index7(void) {
   int x = 42;
-  int res = glob_arr4[x]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr4[x]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index8(void) {
   int x = -42;
-  int res = glob_arr4[x]; // expected-warning{{undefined and not meaningful}}
+  int res = glob_arr4[x]; // expected-warning{{uninitialized}}
 }
diff --git a/clang/test/Analysis/initialization.cpp b/clang/test/Analysis/initialization.cpp
index 4de98b7a189f7..e5e19daad0895 100644
--- a/clang/test/Analysis/initialization.cpp
+++ b/clang/test/Analysis/initialization.cpp
@@ -24,7 +24,7 @@ void glob_array_index1() {
 void glob_invalid_index1() {
   const int *ptr = glob_arr1;
   int idx = -42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_symbolic_index1(int idx) {
@@ -44,7 +44,7 @@ void glob_ptr_index1() {
 void glob_invalid_index2() {
   const int *ptr = glob_arr2;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 const float glob_arr3[] = {
@@ -62,13 +62,13 @@ void glob_array_index2() {
 
 void glob_invalid_index3() {
   int idx = -42;
-  auto x = glob_arr4[1][idx]; // expected-warning{{not meaningful}}
+  auto x = glob_arr4[1][idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index4() {
   const int *ptr = glob_arr4[1];
   int idx = -42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 int const glob_arr5[4][2] = {{1}, 3, 4, 5};
@@ -94,13 +94,13 @@ void glob_ptr_index2() {
 
 void glob_invalid_index5() {
   int idx = -42;
-  auto x = glob_arr5[1][idx]; // expected-warning{{not meaningful}}
+  auto x = glob_arr5[1][idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index6() {
   int const *ptr = &glob_arr5[1][0];
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 extern const int glob_arr_no_init[10];
@@ -138,13 +138,13 @@ void glob_ptr_index3() {
 
 void glob_invalid_index7() {
   int idx = -42;
-  auto x = glob_arr6[idx]; // expected-warning{{not meaningful}}
+  auto x = glob_arr6[idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index8() {
   const char *ptr = glob_arr6;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 char const glob_arr7[5] = {"123"};
@@ -158,13 +158,13 @@ void glob_array_index6() {
 
 void glob_invalid_index9() {
   int idx = -42;
-  auto x = glob_arr7[idx]; // expected-warning{{not meaningful}}
+  auto x = glob_arr7[idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index10() {
   const char *ptr = glob_arr7;
   int idx = 42;
-  auto x = ptr[idx]; // expected-warning{{not meaningful}}
+  auto x = ptr[idx]; // expected-warning{{uninitialized}}
 }
 
 char const *const glob_ptr8 = "123";
@@ -180,12 +180,12 @@ void glob_ptr_index4() {
 
 void glob_invalid_index11() {
   int idx = -42;
-  auto x = glob_ptr8[idx]; // expected-warning{{not meaningful}}
+  auto x = glob_ptr8[idx]; // expected-warning{{uninitialized}}
 }
 
 void glob_invalid_index12() {
   int idx = 42;
-  // FIXME: Should warn {{not meaningful}}
+  // FIXME: Should warn {{uninitialized}}
   // We should take into account a declaration in which the literal is used.
   auto x = glob_ptr8[idx]; // no-warning
 }
diff --git a/clang/test/Analysis/kmalloc-linux.c b/clang/test/Analysis/kmalloc-linux.c
index 0114c4ef000e2..83181c15447a9 100644
--- a/clang/test/Analysis/kmalloc-linux.c
+++ b/clang/test/Analysis/kmalloc-linux.c
@@ -40,7 +40,7 @@ void test_nonzero(void) {
     return;
 
   for (i = 0; i < 10; i++) {
-    t = list[i]; // expected-warning{{undefined}}
+    t = list[i]; // expected-warning{{uninitialized}}
     foo(t);
   }
   kfree(list);
@@ -55,7 +55,7 @@ void test_indeterminate(int flags) {
     return;
 
   for (i = 0; i < 10; i++) {
-    t = list[i]; // expected-warning{{undefined}}
+    t = list[i]; // expected-warning{{uninitialized}}
     foo(t);
   }
   kfree(list);
@@ -93,7 +93,7 @@ void test_3arg_malloc_nonzero(struct malloc_type *mtp) {
     return;
 
   for (i = 0; i < 10; i++) {
-    t = list[i]; // expected-warning{{undefined}}
+    t = list[i]; // expected-warning{{uninitialized}}
     foo(t);
   }
   kfree(list);
@@ -108,7 +108,7 @@ void test_3arg_malloc_indeterminate(struct malloc_type *mtp, int flags) {
     return;
 
   for (i = 0; i < 10; i++) {
-    t = list[i]; // expected-warning{{undefined}}
+    t = list[i]; // expected-warning{{uninitialized}}
     foo(t);
   }
   kfree(list);
diff --git a/clang/test/Analysis/malloc-annotations.c b/clang/test/Analysis/malloc-annotations.c
index c601a0383d221..3a8b1b2842d07 100644
--- a/clang/test/Analysis/malloc-annotations.c
+++ b/clang/test/Analysis/malloc-annotations.c
@@ -244,7 +244,7 @@ void mallocCastToFP(void) {
 // This tests that malloc() buffers are undefined by default
 char mallocGarbage (void) {
   char *buf = malloc(2);
-  char result = buf[1]; // expected-warning{{undefined}}
+  char result = buf[1]; // expected-warning{{uninitialized}}
   free(buf);
   return result;
 }
diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c
index 0dc667bc1ed50..27a04ff873521 100644
--- a/clang/test/Analysis/malloc.c
+++ b/clang/test/Analysis/malloc.c
@@ -735,7 +735,7 @@ void mallocCastToFP(void) {
 // This tests that 'malloc()' buffers are undefined by default
 char mallocGarbage (void) {
 	char *buf = malloc(2);
-	char result = buf[1]; // expected-warning{{undefined}}
+	char result = buf[1]; // expected-warning{{uninitialized}}
 	free(buf);
 	return result;
 }
diff --git a/clang/test/Analysis/misc-ps.c b/clang/test/Analysis/misc-ps.c
index 7521c077a8517..02d11eab0619e 100644
--- a/clang/test/Analysis/misc-ps.c
+++ b/clang/test/Analysis/misc-ps.c
@@ -15,7 +15,7 @@ int rdar93730392(void) {
   int extra = (2 + foo_rdar9373039 ("Clang") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("Clang")) % 4)) % 4)) + (2 + foo_rdar9373039 ("1.0") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("1.0")) % 4)) % 4)); // expected-warning {{never read}}
 
   for (int i = 0 ; i < size_rdar9373039 ; ++i)
-    j += x; // expected-warning {{undefined and not meaningful}}
+    j += x; // expected-warning {{uninitialized}}
 
   return j;
 }
@@ -156,7 +156,7 @@ int rdar_12075238_(unsigned long count) {
 // Test that we handle an uninitialized value within a logical expression.
 void PR14635(int *p) {
   int a = 0, b;
-  *p = a || b; // expected-warning {{Assigned value is undefined and not meaningful}}
+  *p = a || b; // expected-warning {{Assigned value is uninitialized}}
 }
 
 // Test handling floating point values with unary '!'.
diff --git a/clang/test/Analysis/operator-calls.cpp b/clang/test/Analysis/operator-calls.cpp
index b8d50974026d6..a89624d44ac42 100644
--- a/clang/test/Analysis/operator-calls.cpp
+++ b/clang/test/Analysis/operator-calls.cpp
@@ -121,16 +121,16 @@ namespace SynthesizedAssignment {
   void testNoWarning() {
 
     B v, u;
-    u = v; // expected-warning at 110{{Assigned value is undefined and not meaningful}}
+    u = v; // expected-warning at 110{{Assigned value is uninitialized}}
     // expected-note at -1{{Calling defaulted copy assignment operator for 'B'}}
-    // expected-note at 110{{Assigned value is undefined and not meaningful}}
+    // expected-note at 110{{Assigned value is uninitialized}}
   }
 
   void testNoWarningMove() {
     B v, u;
-    u = static_cast<B &&>(v); // expected-warning at 111{{Assigned value is undefined and not meaningful}}
+    u = static_cast<B &&>(v); // expected-warning at 111{{Assigned value is uninitialized}}
     // expected-note at -1{{Calling defaulted move assignment operator for 'B'}}
-    // expected-note at 111{{Assigned value is undefined and not meaningful}}
+    // expected-note at 111{{Assigned value is uninitialized}}
   }
 
   void testConsistency() {
diff --git a/clang/test/Analysis/stack-addr-ps.cpp b/clang/test/Analysis/stack-addr-ps.cpp
index 6a325450dd2e8..c281dd8b1631e 100644
--- a/clang/test/Analysis/stack-addr-ps.cpp
+++ b/clang/test/Analysis/stack-addr-ps.cpp
@@ -106,7 +106,7 @@ struct TS {
 };
 
 int* f5() {
-  int& i = i; // expected-warning {{Assigned value is undefined and not meaningful}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}}
+  int& i = i; // expected-warning {{Assigned value is uninitialized}} expected-warning{{reference 'i' is not yet bound to a value when used within its own initialization}}
   return &i;
 }
 
diff --git a/clang/test/Analysis/undef-buffers.c b/clang/test/Analysis/undef-buffers.c
index 993b08e8e5fd7..2cb8538321b48 100644
--- a/clang/test/Analysis/undef-buffers.c
+++ b/clang/test/Analysis/undef-buffers.c
@@ -34,7 +34,7 @@ char stackBased3 (int *x) {
 char heapBased1 (void) {
   char *buf = malloc(2);
   buf[0] = 'a';
-  char result = buf[1]; // expected-warning{{undefined}}
+  char result = buf[1]; // expected-warning{{uninitialized}}
   free(buf);
   return result;
 }
@@ -42,7 +42,7 @@ char heapBased1 (void) {
 char heapBased2 (void) {
   char *buf = malloc(2);
   buf[1] = 'a';
-  char result = buf[0]; // expected-warning{{undefined}}
+  char result = buf[0]; // expected-warning{{uninitialized}}
   free(buf);
   return result;
 }
diff --git a/clang/test/Analysis/uninit-const.c b/clang/test/Analysis/uninit-const.c
index 381e78f94eff0..1ddf2c89ae59a 100644
--- a/clang/test/Analysis/uninit-const.c
+++ b/clang/test/Analysis/uninit-const.c
@@ -94,8 +94,8 @@ void f_6_1(void) {
 
 void f_7(void) {
       int z;        // expected-note {{'z' declared without an initial value}}
-      int y=z;      // expected-warning {{Assigned value is undefined and not meaningful}}
-                    // expected-note at -1 {{Assigned value is undefined and not meaningful}}
+      int y=z;      // expected-warning {{Assigned value is uninitialized}}
+                    // expected-note at -1 {{Assigned value is uninitialized}}
       doStuff3(y);
 }
 
@@ -133,26 +133,26 @@ void f_12(void) {
 // https://bugs.llvm.org/show_bug.cgi?id=35419
 void f11_0(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  x++; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
-       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
+  x++; // expected-warning {{The expression uses uninitialized memory}}
+       // expected-note at -1 {{The expression uses uninitialized memory}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_1(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  ++x; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
-       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
+  ++x; // expected-warning {{The expression uses uninitialized memory}}
+       // expected-note at -1 {{The expression uses uninitialized memory}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_2(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  x--; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
-       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
+  x--; // expected-warning {{The expression uses uninitialized memory}}
+       // expected-note at -1 {{The expression uses uninitialized memory}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 void f11_3(void) {
   int x; // expected-note {{'x' declared without an initial value}}
-  --x; // expected-warning {{The expression is an uninitialized value, so the computed value is not meaningful}}
-       // expected-note at -1 {{The expression is an uninitialized value, so the computed value is not meaningful}}
+  --x; // expected-warning {{The expression uses uninitialized memory}}
+       // expected-note at -1 {{The expression uses uninitialized memory}}
   clang_analyzer_warnIfReached(); // no-warning
 }
 
diff --git a/clang/test/Analysis/uninit-const.cpp b/clang/test/Analysis/uninit-const.cpp
index b57ce0c1f90af..2ad833b3613fb 100644
--- a/clang/test/Analysis/uninit-const.cpp
+++ b/clang/test/Analysis/uninit-const.cpp
@@ -68,11 +68,11 @@ int& f6_1_sub(int &p) {
 
 void f6_1(void) {
   int t;               // expected-note{{'t' declared without an initial value}}
-  int p = f6_1_sub(t); //expected-warning {{Assigned value is undefined and not meaningful}}
+  int p = f6_1_sub(t); //expected-warning {{Assigned value is uninitialized}}
                        //expected-note at -1 {{Passing value via 1st parameter 'p'}}
                        //expected-note at -2 {{Calling 'f6_1_sub'}}
                        //expected-note at -3 {{Returning from 'f6_1_sub'}}
-                       //expected-note at -4 {{Assigned value is undefined and not meaningful}}
+                       //expected-note at -4 {{Assigned value is uninitialized}}
   int q = p;
   doStuff6(q);
 }
diff --git a/clang/test/Analysis/uninit-structured-binding-array.cpp b/clang/test/Analysis/uninit-structured-binding-array.cpp
index ca8d9206c0f04..b7bfed9eac8b7 100644
--- a/clang/test/Analysis/uninit-structured-binding-array.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-array.cpp
@@ -7,7 +7,7 @@ void array_value_a(void) {
   auto [a, b] = arr;
   arr[0] = 0;
 
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_value_b(void) {
@@ -30,7 +30,7 @@ void array_value_c(void) {
   clang_analyzer_eval(b == arr[1]); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_value_d(void) {
@@ -43,7 +43,7 @@ void array_value_d(void) {
   clang_analyzer_eval(b == arr[1]); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = c; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_value_e(void) {
@@ -72,13 +72,13 @@ void array_value_f(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int b = j; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_lref_a(void) {
   int arr[2];
   auto &[a, b] = arr;
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_lref_b(void) {
@@ -100,7 +100,7 @@ void array_lref_c(void) {
   clang_analyzer_eval(a == 1); // expected-warning{{TRUE}}
 
   int x = a; // no-warning
-  int y = b; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int y = b; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_lref_d(void) {
@@ -113,7 +113,7 @@ void array_lref_d(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_lref_e(void) {
@@ -126,7 +126,7 @@ void array_lref_e(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = c; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_lref_f(void) {
@@ -155,13 +155,13 @@ void array_lref_g(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int b = j; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_rref_a(void) {
   int arr[2];
   auto &&[a, b] = arr;
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_rref_b(void) {
@@ -183,7 +183,7 @@ void array_rref_c(void) {
   clang_analyzer_eval(a == 1); // expected-warning{{TRUE}}
 
   int x = a; // no-warning
-  int y = b; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int y = b; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_rref_d(void) {
@@ -196,7 +196,7 @@ void array_rref_d(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_rref_e(void) {
@@ -209,7 +209,7 @@ void array_rref_e(void) {
   clang_analyzer_eval(b == 1); // expected-warning{{TRUE}}
 
   int y = b; // no-warning
-  int x = c; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = c; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_rref_f(void) {
@@ -238,7 +238,7 @@ void array_rref_g(void) {
   clang_analyzer_eval(i == 0); // expected-warning{{TRUE}}
 
   int a = i; // no-warning
-  int b = j; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int b = j; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_change_a(void) {
@@ -276,7 +276,7 @@ void array_small_a(void) {
 
   auto [a, b, c, d, e] = arr;
 
-  int x = e; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = e; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void array_big_a(void) {
diff --git a/clang/test/Analysis/uninit-structured-binding-struct.cpp b/clang/test/Analysis/uninit-structured-binding-struct.cpp
index e2e601f9a16e7..19bc7b2034d3b 100644
--- a/clang/test/Analysis/uninit-structured-binding-struct.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-struct.cpp
@@ -12,7 +12,7 @@ void a(void) {
 
   auto [i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = i; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void b(void) {
@@ -22,7 +22,7 @@ void b(void) {
   auto [i, j] = tst;
 
   clang_analyzer_eval(i == 1); // expected-warning{{TRUE}}
-  int y = j;                   // expected-warning{{Assigned value is undefined and not meaningful}}
+  int y = j;                   // expected-warning{{Assigned value is uninitialized}}
 }
 
 void c(void) {
@@ -30,7 +30,7 @@ void c(void) {
 
   auto &[i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = i; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void d(void) {
@@ -43,7 +43,7 @@ void d(void) {
   i = 2;
   clang_analyzer_eval(tst.a == 2); // expected-warning{{TRUE}}
 
-  int y = j; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int y = j; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void e(void) {
@@ -63,7 +63,7 @@ void f(void) {
 
   auto &&[i, j] = tst;
 
-  int x = i; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = i; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void g(void) {
@@ -73,7 +73,7 @@ void g(void) {
   auto &&[i, j] = tst;
 
   clang_analyzer_eval(i == 1); // expected-warning{{TRUE}}
-  int y = j;                   // expected-warning{{Assigned value is undefined and not meaningful}}
+  int y = j;                   // expected-warning{{Assigned value is uninitialized}}
 }
 
 struct s2 {
diff --git a/clang/test/Analysis/uninit-structured-binding-tuple.cpp b/clang/test/Analysis/uninit-structured-binding-tuple.cpp
index e7edf78b01011..057d002d4d75e 100644
--- a/clang/test/Analysis/uninit-structured-binding-tuple.cpp
+++ b/clang/test/Analysis/uninit-structured-binding-tuple.cpp
@@ -525,7 +525,7 @@ void uninit_a(void) {
 
   auto [a, b] = u;
 
-  int x = a; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = a; // expected-warning{{Assigned value is uninitialized}}
 }
 
 void uninit_b(void) {
@@ -533,7 +533,7 @@ void uninit_b(void) {
 
   auto [a, b] = u;
 
-  int x = b; // expected-warning{{Assigned value is undefined and not meaningful}}
+  int x = b; // expected-warning{{Assigned value is uninitialized}}
 }
 
 GENERATE_TUPLE_LIKE_STRUCT(UninitCall, int);
diff --git a/clang/test/Analysis/uninit-vals.m b/clang/test/Analysis/uninit-vals.m
index af1638245863f..eef2600b97f56 100644
--- a/clang/test/Analysis/uninit-vals.m
+++ b/clang/test/Analysis/uninit-vals.m
@@ -34,8 +34,8 @@ void test_uninit_pos(void) {
   struct TestUninit v1 = { 0, 0 };
   struct TestUninit v2 = test_uninit_aux();
   int z; // expected-note{{'z' declared without an initial value}}
-  v1.y = z; // expected-warning{{Assigned value is undefined and not meaningful}}
-            // expected-note at -1{{Assigned value is undefined and not meaningful}}
+  v1.y = z; // expected-warning{{Assigned value is uninitialized}}
+            // expected-note at -1{{Assigned value is uninitialized}}
   test_unit_aux2(v2.x + v1.y);
 }
 void test_uninit_pos_2(void) {
@@ -78,8 +78,8 @@ void testFoo(Foo *o) {
 void rdar_7780304(void) {
   typedef struct s_r7780304 { int x; } s_r7780304;
   s_r7780304 b;
-  b.x |= 1; // expected-warning{{The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful}}
-            // expected-note at -1{{The left expression of the compound assignment is an uninitialized value, so the computed value is not meaningful}}
+  b.x |= 1; // expected-warning{{The left expression of the compound assignment uses uninitialized memory}}
+            // expected-note at -1{{The left expression of the compound assignment uses uninitialized memory}}
 }
 
 
diff --git a/clang/test/Analysis/zero-size-non-pod-array.cpp b/clang/test/Analysis/zero-size-non-pod-array.cpp
index f897264e08f8e..628be0d7896e0 100644
--- a/clang/test/Analysis/zero-size-non-pod-array.cpp
+++ b/clang/test/Analysis/zero-size-non-pod-array.cpp
@@ -124,7 +124,7 @@ void zeroSizeArrayLambdaCaptureUndefined1() {
     int n;
 
     auto l = [arr, n]{
-        int x = n; //expected-warning{{Assigned value is undefined and not meaningful}}
+        int x = n; //expected-warning{{Assigned value is uninitialized}}
         (void) x;
     };
 
@@ -137,7 +137,7 @@ void zeroSizeArrayLambdaCaptureUndefined2() {
     int n;
 
     [arr, n]{
-        int x = n; //expected-warning{{Assigned value is undefined and not meaningful}}
+        int x = n; //expected-warning{{Assigned value is uninitialized}}
         (void) x;
     }();
 }



More information about the cfe-commits mailing list