[Cocci] [PATCH] parsing_c: Handle case of macro before typedef

2020-01-19 Thread Jaskaran Singh
For the following case: A case in parsing_hacks.ml sometimes mislabels as a typedef ident. If is a known typedef (such as u8 or *_t), then label as a CppMacro. Subsequent cases will then label correctly. Following is a diff of --parse-c on the Linux Kernel v5.5-rc4: Before --- After nb

Re: [Cocci] [PATCH] parsing_c: Handle case of macro before typedef

2020-01-19 Thread Jaskaran Singh
On Sun, 2020-01-19 at 18:48 +0530, Jaskaran Singh wrote: > For the following case: > > > > A case in parsing_hacks.ml sometimes mislabels as a > typedef ident. > > If is a known typedef (such as u8 or *_t), then label > as a CppMacro. Subsequent cases will then label > correctly. > > Fol

[Cocci] [PATCH] parsing_c: Handle case of macro before typedef

2020-01-19 Thread Jaskaran Singh
For the following case: A case in parsing_hacks.ml sometimes mislabels as a typedef ident. If typedef is a known typedef (such as u8 or *_t), then label as a CppMacro. Subsequent cases will then label correctly. Following are results of --parse-c on the Linux Kernel v5.5-rc4: Before:

[Cocci] [PATCH] parsing_hacks: Add bool to list of known typedefs

2020-01-19 Thread Jaskaran Singh
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,