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

2020-01-21 Thread Markus Elfring
> A case in parsing_hacks.ml sometimes mislabels as a > typedef ident. Can a wording like “as a type definition identifier” be nicer for this description of a software situation? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr

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

2020-01-20 Thread Julia Lawall
On Sun, 19 Jan 2020, Jaskaran Singh wrote: > 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. OK, I see

[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:

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. > >

[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