[libcxx] r304105 - Fix use of uninitialized memory

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun May 28 13:49:13 PDT 2017


Author: ericwf
Date: Sun May 28 15:49:13 2017
New Revision: 304105

URL: http://llvm.org/viewvc/llvm-project?rev=304105&view=rev
Log:
Fix use of uninitialized memory

Modified:
    libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp

Modified: libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp?rev=304105&r1=304104&r2=304105&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp (original)
+++ libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/expected.sh.cpp Sun May 28 15:49:13 2017
@@ -41,7 +41,7 @@ struct expected {
 
   struct promise_type {
     Data* data;
-    DataPtr get_return_object() { data = new Data; return {data}; }
+    DataPtr get_return_object() { data = new Data{}; return {data}; }
     suspend_never initial_suspend() { return {}; }
     suspend_never final_suspend() { return {}; }
     void return_value(T v) { data->val = std::move(v); data->error = {};}




More information about the cfe-commits mailing list