[cfe-dev] a question regarding clang::Type::isFunctionPointerType()

Farzad Sadeghi via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 9 14:44:06 PST 2016


i have these four function pointer types:
	int ** (*pfunc1)();
	int ** (**pfunc2)();
	int ** (***pfunc3)();
	int *** (**pfunc4)();
when i use isFunctionPointerType() on them, only the first declaration
is recognized as a function pointer.
I'm using C90 and the clang::Type is from a QualType acquired from
QualType::getCanonicalType(). i get the same behavior from a
clang::Type that was acquired from a VarDecl::getType().
Obviouly my getting the wrong QualType and/or clang::Type. which one
should i e getting so that all four of these declarations are
recognized as function pointers?


-- 
Farzad Sadeghi



More information about the cfe-dev mailing list