[Lldb-commits] [lldb] dc848a0 - [lldb][NFC] Fix flaky TestForwardDeclFromStdModule test

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 13 02:41:54 PST 2020


Author: Raphael Isemann
Date: 2020-11-13T11:40:51+01:00
New Revision: dc848a0888f0a14c03ff1e7dd7ab109db7a8c065

URL: https://github.com/llvm/llvm-project/commit/dc848a0888f0a14c03ff1e7dd7ab109db7a8c065
DIFF: https://github.com/llvm/llvm-project/commit/dc848a0888f0a14c03ff1e7dd7ab109db7a8c065.diff

LOG: [lldb][NFC] Fix flaky TestForwardDeclFromStdModule test

"[lldb/DataFormatters] Display null C++ pointers as nullptr" added an assumption
that the member we check for is always a nullptr, but it is actually never
initialized. That causes the test to randomly fail due to the pointer having
some random value that isn't 0.

Added: 
    

Modified: 
    lldb/test/API/commands/expression/import-std-module/forward_decl_from_module/root/usr/include/c++/v1/vector

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/commands/expression/import-std-module/forward_decl_from_module/root/usr/include/c++/v1/vector b/lldb/test/API/commands/expression/import-std-module/forward_decl_from_module/root/usr/include/c++/v1/vector
index c2d77aab0711..b128a2b92353 100644
--- a/lldb/test/API/commands/expression/import-std-module/forward_decl_from_module/root/usr/include/c++/v1/vector
+++ b/lldb/test/API/commands/expression/import-std-module/forward_decl_from_module/root/usr/include/c++/v1/vector
@@ -7,7 +7,7 @@ namespace std {
     // Pretend to be a std::vector template we need to instantiate in LLDB
     // when import-std-module is enabled.
     template<typename T>
-    struct vector { class F; F *f; };
+    struct vector { class F; F *f = nullptr; };
     // The definition of our forward declared nested class.
     template<typename T> class vector<T>::F { int x; };
   }


        


More information about the lldb-commits mailing list