contrib / coccinelle / strbuf.coccion commit Merge branch 'cc/perf-aggregate' (9b6734e)
   1@ strbuf_addf_with_format_only @
   2expression E;
   3constant fmt;
   4@@
   5  strbuf_addf(E,
   6(
   7  fmt
   8|
   9  _(fmt)
  10)
  11  );
  12
  13@ script:python @
  14fmt << strbuf_addf_with_format_only.fmt;
  15@@
  16cocci.include_match("%" not in fmt)
  17
  18@ extends strbuf_addf_with_format_only @
  19@@
  20- strbuf_addf
  21+ strbuf_addstr
  22  (E,
  23(
  24  fmt
  25|
  26  _(fmt)
  27)
  28  );
  29
  30@@
  31expression E1, E2;
  32format F =~ "s";
  33@@
  34- strbuf_addf(E1, "%@F@", E2);
  35+ strbuf_addstr(E1, E2);
  36
  37@@
  38expression E1, E2, E3;
  39@@
  40- strbuf_addstr(E1, find_unique_abbrev(E2, E3));
  41+ strbuf_add_unique_abbrev(E1, E2, E3);
  42
  43@@
  44expression E1, E2;
  45@@
  46- strbuf_addstr(E1, real_path(E2));
  47+ strbuf_add_real_path(E1, E2);