brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 28f057b Raw
73 lines · cpp
1// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o2// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out3// RUN: %test_debuginfo %s %t.out4// XFAIL: !system-darwin && gdb-clang-incompatibility5// Radar 87758346// DEBUGGER: break 637// DEBUGGER: r8// DEBUGGER: p a9// CHECK: ${{[0-9]+}} =10// LLDB does not print artificial members.11// CHECK:  {{(_vptr\$A =)?.*}}m_int = 1212 13class A14{15public:16    A (int i=0);17    A (const A& rhs);18    const A&19    operator= (const A& rhs);20    virtual ~A() {}21 22    int get_int();23 24protected:25    int m_int;26};27 28A::A (int i) :29    m_int(i)30{31}32 33A::A (const A& rhs) :34    m_int (rhs.m_int)35{36}37 38const A &39A::operator =(const A& rhs)40{41    m_int = rhs.m_int;42    return *this;43}44 45int A::get_int()46{47    return m_int;48}49 50class B51{52public:53    B () {}54 55    A AInstance();56};57 58A59B::AInstance()60{61    A a(12);62    return a;63}64 65int main (int argc, char const *argv[])66{67    B b;68    int return_val = b.AInstance().get_int();69 70    A a(b.AInstance());71    return return_val;72}73