Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Function pointers


It should look something like this:

void (*fp) (int);

Should result in a IVariable named fp.  
IVariable.getType() should return an IPointerType.  
IPointerType.getType() should return an IFunctionType

Look for example at the tests:
AST2CPPTests.testPointerToFunction
AST2CPPTests.testFunctionTypes
AST2CPPTests.testFnReturningPtrToFn

-Andrew


"Yuan Zhang" <yuan.capsl@xxxxxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx

12/10/2006 09:46 AM

Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

To
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>
cc
Subject
[cdt-dev] Function pointers





Hi,
 
Does anybody know how to recognize a type as "function pointer type" in CDT AST ?
 
Thank you very much.
 
Yuan_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top