tools: Add coccinelle script to check if bool expressions use short format

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

View File

@ -0,0 +1,29 @@
@@
bool t;
@@
(
- t == true
+ t
|
- true == t
+ t
|
- t != true
+ !t
|
- true != t
+ !t
|
- t == false
+ !t
|
- false == t
+ !t
|
- t != false
+ t
|
- false != t
+ t
)