All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Jaskaran Singh <jaskaransingh7654321@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org, cocci@systeme.lip6.fr
Subject: Re: [Cocci] [PATCH v2 1/2] parsing_c: Align C AST and Cocci AST for pointer
Date: Sun, 9 Feb 2020 08:14:47 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002090812460.3430@hadrien> (raw)
In-Reply-To: <20200207060938.9531-2-jaskaransingh7654321@gmail.com>

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
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: Jaskaran Singh <jaskaransingh7654321@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org, cocci@systeme.lip6.fr
Subject: Re: [Linux-kernel-mentees] [PATCH v2 1/2] parsing_c: Align C AST and Cocci AST for pointer
Date: Sun, 9 Feb 2020 08:14:47 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002090812460.3430@hadrien> (raw)
In-Reply-To: <20200207060938.9531-2-jaskaransingh7654321@gmail.com>

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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-02-09  7:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 13:03 [Cocci] [PATCH 0/2] cocci: Align the C AST and Cocci AST for pointer Jaskaran Singh
2020-02-05 13:03 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-05 13:03 ` [Cocci] [PATCH 1/2] parsing_c: Align " Jaskaran Singh
2020-02-05 13:03   ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-05 13:03 ` [Cocci] [PATCH 2/2] tests: Add test case for matching ptr to const ptr and variants Jaskaran Singh
2020-02-05 13:03   ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-07  6:09 ` [Cocci] [PATCH v2 0/2] cocci: Align the C AST and Cocci AST for pointer Jaskaran Singh
2020-02-07  6:09   ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-07  6:09   ` [Cocci] [PATCH v2 1/2] parsing_c: Align " Jaskaran Singh
2020-02-07  6:09     ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-09  7:14     ` Julia Lawall [this message]
2020-02-09  7:14       ` Julia Lawall
2020-02-07  6:09   ` [Cocci] [PATCH v2 2/2] tests: Add test case to match const pointer variants Jaskaran Singh
2020-02-07  6:09     ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-09  7:20     ` [Cocci] " Julia Lawall
2020-02-09  7:20       ` [Linux-kernel-mentees] " Julia Lawall
2020-02-09  7:58       ` [Cocci] " Jaskaran Singh
2020-02-09  7:58         ` [Linux-kernel-mentees] " Jaskaran Singh
2020-02-09  8:07         ` [Cocci] " Julia Lawall
2020-02-09  8:07           ` [Linux-kernel-mentees] " Julia Lawall
2020-02-09  8:09           ` [Cocci] " Jaskaran Singh
2020-02-09  8:09             ` [Linux-kernel-mentees] " Jaskaran Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2002090812460.3430@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=jaskaransingh7654321@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.