<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi all,</div>

<div> </div>

<div>suppose I have these classes:</div>

<div> </div>

<div>
<div>
<div>#include <iostream><br/>
struct A {<br/>
virtual void method1() {<br/>
  std::cout << "A::method1()\n";<br/>
}<br/>
};<br/>
struct B: A {<br/>
void method1() {<br/>
  std::cout << "B::method1()\n";<br/>
}<br/>
};<br/>
int main() {<br/>
  A* o = new B();<br/>
  o->method1();       // <-<br/>
  o->A::method1();  // <- Look identical in AST dump.<br/>
  return 0;<br/>
}</div>
</div>
</div>

<div>In the AST-dump this is printed as (fragment):</div>

<div>
<div>    |-CXXMemberCallExpr 0x80560210 <line:14:3, col:14> 'void'<br/>
    | `-MemberExpr 0x805601ec <col:3, col:6> '<bound member function type>' ->method1 0x8055e8b0<br/>
    |   `-ImplicitCastExpr 0x805601e0 <col:3> 'struct A *' <LValueToRValue><br/>
    |     `-DeclRefExpr 0x805601c8 <col:3> 'struct A *' lvalue Var 0x8055fc28 'o' 'struct A *'<br/>
    |-CXXMemberCallExpr 0x805602a0 <line:15:3, col:17> 'void'<br/>
    | `-MemberExpr 0x8056026c <col:3, col:9> '<bound member function type>' ->method1 0x8055e8b0<br/>
    |   `-ImplicitCastExpr 0x80560258 <col:3> 'struct A *' <LValueToRValue><br/>
    |     `-DeclRefExpr 0x8056022c <col:3> 'struct A *' lvalue Var 0x8055fc28 'o' 'struct A *'</div>

<div> </div>

<div>to me both look the same, but clang is able to distinguish them when building the executable. Can you explain how this</div>

<div>is done, or where I have to look to get a clue?</div>

<div> </div>

<div>Your help is very much appreciated.</div>

<div> </div>

<div>Regards,</div>

<div>   Andre</div>

<div> </div>
</div></div></body></html>