[Linux-kernel-mentees] [PATCH v2 1/2] parsing_c: Align C AST and Cocci AST for pointer

Julia Lawall julia.lawall at inria.fr
Sun Feb 9 07:14:47 UTC 2020


There is a problem with the pretty printing.  For the following semantic
patch:

@@
type t;
symbol x;
@@
void main() {
-	t x;
+	t y;
}

and the following C code:

void main() {
	const char * const * x;
}


The output is:

 void main() {
-	const char * const * x;
+	const char *const *y;
 }

There should be a space between * and const on the + line.

julia


More information about the Linux-kernel-mentees mailing list