From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-6.3 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C1CBE1FAAD for ; Mon, 30 Jan 2017 16:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932465AbdA3QXY (ORCPT ); Mon, 30 Jan 2017 11:23:24 -0500 Received: from mout.gmx.net ([212.227.15.18]:64645 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932474AbdA3QXV (ORCPT ); Mon, 30 Jan 2017 11:23:21 -0500 Received: from virtualbox ([37.201.192.48]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LzLJR-1cTc1G2Utt-014U0Q; Mon, 30 Jan 2017 17:16:15 +0100 Date: Mon, 30 Jan 2017 17:16:14 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: =?UTF-8?Q?Ren=C3=A9_Scharfe?= cc: Git List , Junio C Hamano Subject: Re: [PATCH 5/5] graph: use SWAP macro In-Reply-To: Message-ID: References: <8ef4c833-45bd-6831-0683-6d01f30aa518@web.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-596184923-1485792975=:3469" X-Provags-ID: V03:K0:7SN/mwSWNoF7nZYRTSmJdlKiaZPwTnnIIehQxeZpTHLHjx4aauN NhqwgKK1BO/84FNVTp2D1cb3J0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-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-596184923-1485792975=:3469 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi Ren=C3=A9, On Sat, 28 Jan 2017, Ren=C3=A9 Scharfe wrote: > Exchange the values of graph->columns and graph->new_columns using the > macro SWAP instead of hand-rolled code. The result is shorter and > easier to read. >=20 > This transformation was not done by the semantic patch swap.cocci > because there's an unrelated statement between the second and the last > step of the exchange, so it didn't match the expected pattern. Is it really true that Coccinelle cannot be told to look for a code block that declares a variable that is then used *only* in the lines we want to match and replace? I never used the tool, and a quick web search did not clarify the picture, either... Ciao, Dscho --8323329-596184923-1485792975=:3469--