I think it is normal to give a Null type in this case:
The CallExpr refers to an overloaded function and that is not resolved yet, because the overload resolution has not happened yet at this point.
However, this could happen only if the enclosing class template (the generic lambda) is not yet instantiated. But I'd expect that the lambda class template is instantiated since for_each is instantiated with a concrete type (the iterator of std::vector<unsigned char>). Could you please check if the lambda class template is instantiated?
On Wed, Jan 20, 2021 at 4:43 PM Balázs Kéri via cfe-dev <[hidden email]> wrote:
I encountered a case when function CallExpr::getCallReturnType is called and crashes because a null type pointer. Should this function return a value in any case and not crash?