Commit Graph

5 Commits

Author SHA1 Message Date
José Martins b1e92fc399
Misra false positive fixes for rules 8.7 and 5.9 (#3844)
* Fix misra 8.7 false positives on single function usage

When there is a single usage of a function, we should first check if the
file it is used in, is the same one it was defined in. When this is not the
case, there is no violatior to be reported.

* Fix misra rule 5.9 false positives for exception

The exception for rule 5.9 described in the guidelines allows for
multiple definitions of internal linkage obejcts when these regard a
static inlined function defined in the same header file.

* Fix neglecting of inline keyword flag upon simplifications

When the inline keyword is being "simplified" and the inline flag is
degated to the next token. However, this information might be lost if the next
token itself is simplified/deleted in a futher pass. Therefore, we must
propagated the flag to all the next named tokens, so we can make sure the
function name token itself is tagged with this property.

* add tests for misra addon rules 8.7 and 5.9
2022-02-27 19:17:48 +01:00
Daniel Marjamäki e05a9d7e65 misra: implement rule 2.5 2021-07-08 22:03:27 +02:00
Daniel Marjamäki 859e541661 misra: implement rule 2.4 2021-07-07 20:30:52 +02:00
Daniel Marjamäki 13d55c7060 misra; implement rule 2.3 2021-07-07 15:16:53 +02:00
Daniel Marjamäki 9172f2ab3b addons; add CTU infrastructure 2021-07-07 10:58:13 +02:00