[libcxxabi] r272824 - Fix [libcxxabi] Fix warning about uninitialized const member.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 12:59:17 PDT 2016


Author: ericwf
Date: Wed Jun 15 14:59:16 2016
New Revision: 272824

URL: http://llvm.org/viewvc/llvm-project?rev=272824&view=rev
Log:
Fix [libcxxabi] Fix warning about uninitialized const member.

Modified:
    libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp

Modified: libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp?rev=272824&r1=272823&r2=272824&view=diff
==============================================================================
--- libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp (original)
+++ libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp Wed Jun 15 14:59:16 2016
@@ -13,6 +13,7 @@
 
 struct A
 {
+    A() : i(0), j(0) {} // explicitly initialize 'i' to prevent warnings
     const int i;
     int j;
 };
@@ -22,7 +23,7 @@ typedef       int A::*md2;
 
 struct B : public A
 {
-    B() : k(42), l(0) {} // explicitly initialize 'k' to prevent warnings.
+    B() : k(0), l(0) {} // explicitly initialize 'k' to prevent warnings.
     const int k;
     int l;
 };




More information about the cfe-commits mailing list