clang_isDynamicCall always returns true for CallExpr which call virtual methods

Hi,

I’m visiting the AST of this simple code with libclang:

class Base

{

public:

virtual void Print() {}

};

class Derived : public Base

{

public:

virtual void Print() {}

};

void func1( Base * b )

{

b->Print();

}

void func2( Base b )

{

b.Print();

}

void func3( Base & b )

{

b.Print();

}

clang_isDynamicCall returns true for all three CallExpr cursors in the code. I would have expected clang_isDynamicCall to return false for the call in func2 because the call is definitely to the Print method of Base. Is this intended behaviour? If yes, is there another way to determine whether the function call is going to be made polymorphically?

Thanks in advance,

Matt