Files
llvm-project/lldb/test/Shell/SymbolFile/DWARF/x86/explicit-member-function-quals.cpp
Michael Buch 1bc63265af [lldb][DWARFASTParserClang] Support constant index encoding of DW_AT_object_pointer (#144998)
Starting with https://github.com/llvm/llvm-project/pull/124790, Clang
emits `DW_AT_object_pointer` encoded as integer constants rather than
DIE references. This patch accounts for this.

Depends on https://github.com/llvm/llvm-project/pull/145328 and
https://github.com/llvm/llvm-project/pull/145126
2025-06-23 17:58:17 +01:00

28 lines
975 B
C++

// XFAIL: *
//
// FIXME: Explicit object parameter is not shown in
// type lookup output. This is because we don't attach
// valid source locations to decls in the DWARF AST,
// so the ParmVarDecl::isExplicitObjectParameter fails.
// Tests that we correctly deduce the CV-quals and storage
// class of explicit object member functions.
//
// RUN: %clangxx_host %s -glldb -target 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(this Foo);
// CHECK-NEXT: void cMethod(this const Foo &) const;
// CHECK-NEXT: void vMethod(this volatile Foo &) volatile;
// CHECK-NEXT: void cvMethod(this const volatile Foo &) 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;