cpptests/template_test.cocci
raw| 1 | # spatch --c++ |
| 2 | @@ |
| 3 | identifier i1; |
| 4 | type T1; |
| 5 | @@ |
| 6 | T1 i1; |
| 7 | + vector<f(1, 2)> d; |
| 8 | |
| 9 | @@ |
| 10 | identifier i1; |
| 11 | type T1; |
| 12 | typedef xxx; |
| 13 | @@ |
| 14 | T1 i1; |
| 15 | + xxx<g(3, 4)> d; |
| 16 | |
| 17 | @@ |
| 18 | symbol a,b; |
| 19 | identifier foo; |
| 20 | @@ |
| 21 | |
| 22 | - foo<12,a> (3, 4); |
| 23 | + bar<102,b> (30, 40); |
| 24 | |
| 25 | @type@ |
| 26 | type x; |
| 27 | typedef abc; |
| 28 | @@ |
| 29 | |
| 30 | - x<g(...)> |
| 31 | + abc<2 + 2> |