bool is widely used in the Linux kernel. Certain cases of parsing_hacks.ml would mislabel bool.
Add bool to the list of known typedefs. Stats of --parse-c on Linux v5.5-rc4 are as follows: Before: nb good = 18956150, nb passed = 134062 =========> 0.70% passed After: nb good = 18956150, nb passed = 134073 =========> 0.70% passed The increase in passed tokens is due to functions in kernel/trace/trace_kprobe.c using nokprobe_inline. For instances of nokprobe_inline bool, nokprobe_inline is labeled as a CppMacro. Examples of this in the --parse-c diff are as follows: Before: passed:bool passed:bool passed:bool passed:bool passed:bool After: passed:nokprobe_inline passed:nokprobe_inline passed:nokprobe_inline passed:nokprobe_inline passed:nokprobe_inline passed:nokprobe_inline passed:nokprobe_inline Signed-off-by: Jaskaran Singh <jaskaransingh7654...@gmail.com> --- parsing_c/parsing_hacks.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_c/parsing_hacks.ml b/parsing_c/parsing_hacks.ml index 23d675cf..42ad9ccc 100644 --- a/parsing_c/parsing_hacks.ml +++ b/parsing_c/parsing_hacks.ml @@ -61,7 +61,7 @@ let is_known_typdef = | "u_char" | "u_short" | "u_int" | "u_long" | "u8" | "u16" | "u32" | "u64" | "s8" | "s16" | "s32" | "s64" - | "__u8" | "__u16" | "__u32" | "__u64" + | "__u8" | "__u16" | "__u32" | "__u64" | "bool" -> true | "acpi_handle" -- 2.21.1 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci