tools: Add coccinelle script to check if bool functions return bool type

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2020-03-04 15:02:23 +02:00
parent 1781124916
commit 17fe9bb6e5

View File

@ -0,0 +1,21 @@
@@
identifier fn;
typedef bool;
symbol false;
symbol true;
@@
bool fn ( ... )
{
<...
return
(
- 0
+ false
|
- 1
+ true
)
;
...>
}