From: markls Date: Mon, 17 Jan 2011 08:07:54 +0000 (+0000) Subject: okay, semantic patches mostly doing what is probably the right thing, the next X-Git-Tag: v3.6_beta2~513 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7bec8b1343ca1647cf882c15a02cbe02fa3d823e?hp=27c7fbea86b5184b440537f27dfc0cfe726c6400 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 --- 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 +) ) +...> +}