Commit Graph

12 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 c296115cd3 misra; fixed test 2021-09-17 08:08:40 +02:00
Daniel Marjamäki f44a82856f misra; implement rule 8.7 2021-07-17 22:36:03 +02:00
Daniel Marjamäki 77d8b714ea misra; implement rule 8.6 2021-07-17 21:24:53 +02:00
Daniel Marjamäki aa910d3c38 misra; implemented rule 8.5 2021-07-17 19:59:21 +02:00
Daniel Marjamäki 009c144455 misra; implement rule 8.4 2021-07-10 20:10:44 +02:00
Daniel Marjamäki 599a559351 misra; implement rule 5.9 2021-07-10 12:51:40 +02:00
Daniel Marjamäki c77235f12c misra; implement rule 5.8 2021-07-09 09:47:23 +02:00
Daniel Marjamäki e05a9d7e65 misra: implement rule 2.5 2021-07-08 22:03:27 +02:00
Daniel Marjamäki cf049cb759 misra: implement rule 5.7 2021-07-07 21:47:17 +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