[Lldb-commits] [lldb] 4b57236 - [lldb][test] Add test for detecting CV-quals of explicit object member functions (#125053)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 30 04:51:01 PST 2025


Author: Michael Buch
Date: 2025-01-30T12:50:57Z
New Revision: 4b57236bace610d3b05dbba0e9f5b11ed3a9fbee

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

LOG: [lldb][test] Add test for detecting CV-quals of explicit object member functions (#125053)

This is XFAILed for now until we find a good way to locate the
DW_AT_object_pointer of function declarations (a possible solution being
https://github.com/llvm/llvm-project/pull/124790).

Made it a shell test because I couldn't find any SBAPIs that i could
query to find the CV-qualifiers/etc. of member functions.

Added: 
    lldb/test/Shell/SymbolFile/DWARF/x86/explicit-member-function-quals.cpp

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/lldb/test/Shell/SymbolFile/DWARF/x86/explicit-member-function-quals.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/explicit-member-function-quals.cpp
new file mode 100644
index 00000000000000..bda9bb99f04a0f
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/explicit-member-function-quals.cpp
@@ -0,0 +1,22 @@
+// XFAIL: *
+
+// Tests that we correctly deduce the CV-quals and storage
+// class of explicit object member functions.
+//
+// RUN: %clangxx_host %s -triple x86_64-pc-linux -g -std=c++23 -c -o %t
+// RUN: %lldb %t -b -o "type lookup Foo" 2>&1 | FileCheck %s
+//
+// CHECK:      (lldb) type lookup Foo
+// CHECK-NEXT: struct Foo {
+// CHECK-NEXT:      void Method(Foo);
+// CHECK-NEXT:      void cMethod(Foo const&);
+// CHECK-NEXT:      void vMethod(Foo volatile&);
+// CHECK-NEXT:      void cvMethod(const Foo volatile&) const volatile;
+// CHECK-NEXT: }
+
+struct Foo {
+  void Method(this Foo) {}
+  void cMethod(this Foo const &) {}
+  void vMethod(this Foo volatile &) {}
+  void cvMethod(this Foo const volatile &) {}
+} f;


        


More information about the lldb-commits mailing list