We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isPrototyped
1 parent f0ffd4d commit faf222eCopy full SHA for faf222e
c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql
@@ -48,11 +48,9 @@ where
48
msg = "Function " + f + " does not specify void for no parameters present."
49
or
50
//parameters declared in declaration list (not in function signature)
51
- //have placeholder file location associated only
52
- exists(Parameter p |
53
- p.getFunction() = f and
54
- not p.getFile() = f.getFile() and
55
- msg = "Function " + f + " declares parameter in unsupported declaration list."
56
- )
+ //have no prototype
+ not f.isPrototyped() and
+ not hasZeroParamDecl(f) and
+ msg = "Function " + f + " declares parameter in unsupported declaration list."
57
)
58
select f, msg
0 commit comments