[Lldb-commits] [lldb] 1cd78f5 - Revert "[lldb][TypeSystemClang] Format pointers to member functions as eFormatHex"

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 7 03:19:53 PST 2023


Author: Michael Buch
Date: 2023-03-07T11:18:39Z
New Revision: 1cd78f5000d0c05d7f3267e86bb5616cd036a3f3

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

LOG: Revert "[lldb][TypeSystemClang] Format pointers to member functions as eFormatHex"

Reverted because Windows buildbot started failing

This reverts commit b642fd5ee250247ccefb38099169b4ee8ac4112b.

Added: 
    

Modified: 
    lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index fa1984b50a586..4a2ab70c90da4 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -5277,7 +5277,7 @@ lldb::Format TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) {
   case clang::Type::RValueReference:
     return lldb::eFormatHex;
   case clang::Type::MemberPointer:
-    return lldb::eFormatHex;
+    break;
   case clang::Type::Complex: {
     if (qual_type->isComplexType())
       return lldb::eFormatComplex;

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index fb79d1463e5e1..fa9a3f5093d05 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -285,14 +285,3 @@ def cleanup():
             matching=False,
             substrs=['(int) iAmInt = 0x00000001'])
         self.expect("frame variable iAmInt", substrs=['(int) iAmInt = 1'])
-
-        # Check that pointer to members are correctly formatted
-        self.expect(
-            "frame variable member_ptr",
-            substrs=['member_ptr = 0x'])
-        self.expect(
-            "frame variable member_func_ptr",
-            substrs=['member_func_ptr = 0x'])
-        self.expect(
-            "frame variable ref_to_member_func_ptr",
-            substrs=['ref_to_member_func_ptr = 0x'])

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
index f1cf507e47f87..c81a68fd2094a 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp
@@ -57,8 +57,6 @@ struct IUseCharStar
 {
 	const char* pointer;
 	IUseCharStar() : pointer("Hello world") {}
-
-        char const *member_func(int) { return ""; }
 };
 
 int main (int argc, const char * argv[])
@@ -108,12 +106,7 @@ int main (int argc, const char * argv[])
     char* strptr     = "Hello world!";
     
     i_am_cooler the_coolest_guy(1,2,3.14,6.28,'E','G');
-
-    const char *IUseCharStar::*member_ptr = &IUseCharStar::pointer;
-    const char *(IUseCharStar::*member_func_ptr)(int) =
-        &IUseCharStar::member_func;
-    auto &ref_to_member_func_ptr = member_func_ptr;
-
+        
     return 0; // Set break point at this line.
 }
 


        


More information about the lldb-commits mailing list