Skip to content

Commit 6309dbc

Browse files
committed
Declarations4: address review comments
1 parent aa6742e commit 6309dbc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ where
4747
hasZeroParamDecl(f) and
4848
msg = "Function " + f + " does not specifiy void for no parameters present."
4949
or
50+
//parameters declared in declaration list (not in function signature)
51+
//have placeholder file location associated only
5052
exists(Parameter p |
5153
p.getFunction() = f and
5254
not p.getFile() = f.getFile() and
5355
msg = "Function " + f + " declares parameter in unsupported declaration list."
5456
)
55-
) and
56-
not f.isInMacroExpansion()
57+
)
5758
select f, msg
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| function2.c:5:6:5:7 | definition of f3 | |
2-
| function2.c:7:6:7:7 | definition of f4 | |
1+
| function2.c:5:6:5:7 | definition of f3 | No separate compatible declaration found for this definition. |
2+
| function2.c:7:6:7:7 | definition of f4 | No separate compatible declaration found for this definition. |

0 commit comments

Comments
 (0)