C/C++ staic analysis [message #121392] |
Fri, 25 January 2008 07:24 |
Eclipse User |
|
|
|
Originally posted by: Swapna.Pawar.kpitcummins.com
Hi All,
I am extending TPTP C/C++ static analysis to add my own rules for C. But
TPTP C/C++ static analysis work fine with C++, but don't work with C. The
problem was asked on the mailing list, refer
http://dev.eclipse.org/newslists/news.eclipse.tptp/msg03699. html
and there it is told that CDT don't handle C++ and C in the same way. So I
tried a workaround for this. I am using rule filters in my rules like
ASTNodeTypeRuleFilter for the ASTNodeTypes - ICASTFunctionDefinition,
ICASTSimpleDeclaration, ICASTFunctionCallExpression. I found that these
filters do not work. I replaced the values of ICASTFunctionDefinition,
ICASTSimpleDeclaration, ICASTFunctionCallExpression with the values of
ICPPASTFunctionDefinition,ICPPASTSimpleDeclaration,ICPPASTFu nctionCallExpression.
After that the filters worked fine. I don't know the significance of the
values of these variables. Is it the right way to make the rules work for
C?
Please guide.
Regards,
Swapna
|
|
|
Powered by
FUDForum. Page generated in 0.03159 seconds