How to identify a Clang QualType is a function pointer?

I am trying to identify a function pointer connected to any expression. I am working in Clang code. Assume, I know the QualType of the value, and now want to know if the value is originally a function pointer type, not any other. Like I want to distinguish between void (*)() and int *. Can anyone suggest what functionality (standard, not want to use getAsString and parse it) I can use?


(bcc clangd-dev, I think you want clang-dev)


Doh, of course I meant cfe-dev.

Thanks, it works. I wonder why this funtion is not listed under document:
is that because it is inline?

Note that it is being called with the ‘->’ operator. QualType’s dereference operator returns a Type*. SO, ‘isFunctionPointerType’ is a part of the Type class:

Thanks. It clears the confusion.