The outer parentheses don't matter when just matching an returning a line.
Eliminating them reduces the complexity of the pattern to match and
gives a small performance improvement in the non-patch cases.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
binary operator cmp = {>, >=};
@@
- (E1 cmp E2 ? E3 : E4)
+ E1 cmp E2 ? E3 : E4
@min_candidate@
expression E1, E2, E3, E4;
binary operator cmp = {<, <=};
@@
- (E1 cmp E2 ? E3 : E4)
+ E1 cmp E2 ? E3 : E4
@rmax depends on !patch && max_candidate@
identifier func;
func(...)
{
<...
-* ((x) cmp@p (y) ? (x) : (y))
+* (x) cmp@p (y) ? (x) : (y)
...>
}
func(...)
{
<...
-* ((x) cmp@p (y) ? (x) : (y))
+* (x) cmp@p (y) ? (x) : (y)
...>
}