From 7bec8b1343ca1647cf882c15a02cbe02fa3d823e Mon Sep 17 00:00:00 2001 From: markls Date: Mon, 17 Jan 2011 08:07:54 +0000 Subject: [PATCH 1/1] okay, semantic patches mostly doing what is probably the right thing, the next order of business is to work on the #defines... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9415 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/smpi/replace_globals.cocci | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/smpi/replace_globals.cocci b/src/smpi/replace_globals.cocci index a49237c80b..f93cafc4cb 100644 --- a/src/smpi/replace_globals.cocci +++ b/src/smpi/replace_globals.cocci @@ -32,16 +32,14 @@ position p != { localvardecl.p, funcproto.p }; expression E; @@ ( --T -+T* +T b@p -+ = SMPI_INITIALIZE_GLOBAL(T) ++ = SMPI_INITIALIZE_GLOBAL(b, T) ; | --T -+T* +T b@p = -+ SMPI_INITIALIZE_AND_SET_GLOBAL(T, ++ SMPI_INITIALIZE_AND_SET_GLOBAL(b, T, E +) ; @@ -51,6 +49,8 @@ E local idexpression x; identifier globalvardecl.b; @@ +{ +<... ( x | @@ -58,3 +58,5 @@ x b +) ) +...> +} -- 2.20.1