File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3333,7 +3333,9 @@ def misra_17_7(self, data):
33333333 continue
33343334 if token .str != '(' or token .astParent :
33353335 continue
3336- if not token .previous .isName or token .previous .varId :
3336+ if not token .astOperand1 or not token .astOperand1 .isName :
3337+ continue
3338+ if token .astOperand1 .varId and get_function_pointer_type (token .astOperand1 .variable .typeStartToken ) is None :
33373339 continue
33383340 if token .valueType is None :
33393341 continue
Original file line number Diff line number Diff line change @@ -1739,6 +1739,9 @@ static void misra_17_6(int x[static 20]) {(void)x;} // 17.6
17391739static int calculation (int x ) { return x + 1 ; }
17401740static void misra_17_7 (void ) {
17411741 calculation (123 ); // 17.7
1742+ int (* calc_ptr )(int ) = & calculation ;
1743+ calc_ptr (123 ); // 17.7
1744+ int y = calc_ptr (123 );
17421745}
17431746
17441747static void misra_17_8 (int x ) {
You can’t perform that action at this time.
0 commit comments