From: markls Date: Fri, 21 Jan 2011 14:52:10 +0000 (+0000) Subject: made it so that to apply varget for statics we not only have to match the name X-Git-Tag: v3.6_beta2~455 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/359062557ab714a68aff0ab0984e33988af64144 made it so that to apply varget for statics we not only have to match the name of the variable, but also the containing function. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9474 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/replace_globals.cocci b/src/smpi/replace_globals.cocci index da0e6ab73f..00a6ca5fff 100644 --- a/src/smpi/replace_globals.cocci +++ b/src/smpi/replace_globals.cocci @@ -95,10 +95,11 @@ var // starting with the word static (exceptions?) @staticvardecl@ type T; -identifier var; +identifier func, var; expression value; @@ -<... +func(...) { +... ( // default case static T - var @@ -110,13 +111,16 @@ T + *var = SMPI_VARINIT_STATIC_AND_SET(var, T, value) ; ) -...> +... +} // @rewritestaticaccess@ type T; -identifier staticvardecl.var; +identifier staticvardecl.func, staticvardecl.var; @@ +func(...) { +<... ( // declaration T var @@ -126,3 +130,5 @@ var var +) ) +...> +}