Re: [Cocci] [PATCH] checkpatch: Warn on self-assignments

2020-09-10 Thread Kees Cook
On Sat, Sep 05, 2020 at 10:58:29AM -0700, Joe Perches wrote: > The uninitialized_var() macro was removed recently via > commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") > as it's not a particularly useful warning and its use can > "paper over real bugs". > > Add a checkpatch

Re: [Cocci] [PATCH v2 0/3] parsing_c: Optimize recursive header file parsing

2020-09-10 Thread Jaskaran Singh
On Thu, 2020-09-10 at 11:47 +0530, Jaskaran Singh wrote: > This patch series aims to optimize performance for recursively > parsing > header files in Coccinelle. > > Coccinelle's C parsing subsystem has an option called --recursive- > includes > to recursively parse header files. This is used for

[Cocci] [PATCH v2 0/3] parsing_c: Optimize recursive header file parsing

2020-09-10 Thread Jaskaran Singh
This patch series aims to optimize performance for recursively parsing header files in Coccinelle. Coccinelle's C parsing subsystem has an option called --recursive-includes to recursively parse header files. This is used for type inference/annotation. Previously, using --recursive-includes on

[Cocci] [PATCH v2 2/3] parsing_c: parse_c: Build name cache and includes dependency graph

2020-09-10 Thread Jaskaran Singh
Build the includes dependency graph and name cache while parsing header files. Every header file is parsed only once for name caching and, while parsing these files, an includes dependency graph is built to determine reachability of one header file from another file. Signed-off-by: Jaskaran Singh

[Cocci] [PATCH v2 1/3] parsing_c: includes_cache: Implement a name cache

2020-09-10 Thread Jaskaran Singh
Implement a name cache and includes dependency graph to optimize performance for recursive parsing of header files. The following is a high-level description of what has been implemented: - As header files are recursively parsed, they are scanned for the following: - fields of

[Cocci] [PATCH v2 3/3] parsing_c: type_annoter_c: Use name cache for type annotation

2020-09-10 Thread Jaskaran Singh
Use the name cache for type annotation. On encountering the following which are not stored in the environment, the name cache is looked up and the relevant header file is parsed for type information: - struct field use - typedef - function call - identifier