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: https://clang.llvm.org/doxygen/classclang_1_1QualType.html
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: https://clang.llvm.org/doxygen/classclang_1_1Type.html
Thanks. It clears the confusion.