<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jdevlieghere@apple.com" title="Jonas Devlieghere <jdevlieghere@apple.com>"> <span class="fn">Jonas Devlieghere</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - LLDB calls wrong C++ method when virtual hides non-virtual"
   href="https://bugs.llvm.org/show_bug.cgi?id=28940">bug 28940</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>CONFIRMED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>jdevlieghere@apple.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - LLDB calls wrong C++ method when virtual hides non-virtual"
   href="https://bugs.llvm.org/show_bug.cgi?id=28940#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - LLDB calls wrong C++ method when virtual hides non-virtual"
   href="https://bugs.llvm.org/show_bug.cgi?id=28940">bug 28940</a>
              from <span class="vcard"><a class="email" href="mailto:jdevlieghere@apple.com" title="Jonas Devlieghere <jdevlieghere@apple.com>"> <span class="fn">Jonas Devlieghere</span></a>
</span></b>
        <pre>This was fixed by r323163.

$ cat /tmp/main.cpp
#include <stdint.h>
#include <stdio.h>

class A {
public:
  A(int a = 0) : m_a(a) {}
  virtual ~A() {}
  virtual void Dump() { puts(__PRETTY_FUNCTION__); }

protected:
  int m_a;
};

class B : public A {
public:
  B(int a = 0, int b = 1) : A(a), m_b(b) {}
  virtual ~B() {}
  virtual void Dump() { puts(__PRETTY_FUNCTION__); }

protected:
  int m_b;
};

int main(int argc, char const *argv[], char const *envp[]) {
  B b(11, 22);
  A *a = &b;
  a->Dump();
  return 0;
}

$ ./bin/lldb /tmp/a.out
(lldb) target create "/tmp/a.out"
Current executable set to '/tmp/a.out' (x86_64).
(lldb) b main.cpp:28
Breakpoint 1: where = a.out`main + 90 at main.cpp:28:3, address =
0x0000000100000d0a
(lldb) r
Process 34120 launched: '/tmp/a.out' (x86_64)
virtual void B::Dump()
Process 34120 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100000d0a a.out`main(argc=1, argv=0x00007ffeefbff650,
envp=0x00007ffeefbff660) at main.cpp:28:3
   25     B b(11, 22);
   26     A *a = &b;
   27     a->Dump();
-> 28     return 0;
   29   }
(lldb) p b.Dump()
virtual void B::Dump()
(lldb) p a->Dump()
virtual void B::Dump()</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>