@@ -358,7 +358,7 @@ Expr_parser_base::parse_function_call(const cdk::api::Table_ref &func, Scalar_pr
358
358
)
359
359
unsupported (" LEADING, TRAILING or BOTH clause inside function TRIM()" );
360
360
361
- parse (parse_position ? COMP : FULL, aprc ? aprc->list_el () : NULL );
361
+ delete parse (parse_position ? COMP : FULL, aprc ? aprc->list_el () : NULL );
362
362
363
363
if (consume_token (Token::COMMA))
364
364
parse_argslist (aprc);
@@ -404,7 +404,7 @@ Expr_parser_base::parse_special_args(
404
404
{
405
405
if (!consume_token (Keyword::IN))
406
406
parse_error (" Expected IN inside POSITION(... IN ...)" );
407
- parse (FULL, aprc ? aprc->list_el () : NULL );
407
+ delete parse (FULL, aprc ? aprc->list_el () : NULL );
408
408
return ;
409
409
}
410
410
}
@@ -1082,12 +1082,12 @@ Expression* Expr_parser_base::parse_atomic(Processor *prc)
1082
1082
case Token::LPAREN:
1083
1083
{
1084
1084
consume_token ();
1085
- Expression * res = parse (FULL, prc);
1085
+ smart_ptr< Expression> res ( parse (FULL, prc) );
1086
1086
consume_token_throw (
1087
1087
Token::RPAREN,
1088
1088
" Expected ')' to close parenthesized sub-expression"
1089
1089
);
1090
- return res;
1090
+ return res. release () ;
1091
1091
}
1092
1092
1093
1093
default : break ;
@@ -1179,7 +1179,7 @@ Expression* Expr_parser_base::parse_atomic(Processor *prc)
1179
1179
if (argsp)
1180
1180
{
1181
1181
argsp->list_begin ();
1182
- parse (ATOMIC, argsp->list_el ());
1182
+ delete parse (ATOMIC, argsp->list_el ());
1183
1183
argsp->list_end ();
1184
1184
return stored.release ();
1185
1185
}
@@ -1443,7 +1443,7 @@ Expr_parser_base::left_assoc_binary_op(const Op::Set &ops,
1443
1443
1444
1444
// then parse rhs, passing it as 2nd argument
1445
1445
1446
- parse (rhs, aprc->list_el ());
1446
+ delete parse (rhs, aprc->list_el ());
1447
1447
1448
1448
aprc->list_end ();
1449
1449
}
@@ -1493,7 +1493,7 @@ Expression* Expr_parser_base::parse_bit(Processor *prc)
1493
1493
if (argsp)
1494
1494
{
1495
1495
argsp->list_begin ();
1496
- parse (ATOMIC, argsp->list_el ());
1496
+ delete parse (ATOMIC, argsp->list_el ());
1497
1497
argsp->list_end ();
1498
1498
return stored.release ();
1499
1499
}
@@ -1727,7 +1727,7 @@ Expression* Expr_parser_base::parse_ilri(Processor *prc)
1727
1727
}
1728
1728
else
1729
1729
{
1730
- parse (COMP, aprc->list_el ());
1730
+ delete parse (COMP, aprc->list_el ());
1731
1731
}
1732
1732
1733
1733
break ;
@@ -1738,7 +1738,7 @@ Expression* Expr_parser_base::parse_ilri(Processor *prc)
1738
1738
case Op::RLIKE:
1739
1739
case Op::NOT_RLIKE:
1740
1740
{
1741
- parse (COMP, aprc->list_el ());
1741
+ delete parse (COMP, aprc->list_el ());
1742
1742
1743
1743
if (cur_token_type_is (Keyword::ESCAPE))
1744
1744
{
@@ -1750,22 +1750,22 @@ Expression* Expr_parser_base::parse_ilri(Processor *prc)
1750
1750
1751
1751
case Op::REGEXP:
1752
1752
case Op::NOT_REGEXP:
1753
- parse (COMP, aprc->list_el ());
1753
+ delete parse (COMP, aprc->list_el ());
1754
1754
break ;
1755
1755
1756
1756
case Op::OVERLAPS:
1757
1757
case Op::NOT_OVERLAPS:
1758
- parse (COMP, aprc->list_el ());
1758
+ delete parse (COMP, aprc->list_el ());
1759
1759
break ;
1760
1760
1761
1761
case Op::BETWEEN:
1762
1762
case Op::NOT_BETWEEN:
1763
- parse (COMP, aprc->list_el ());
1763
+ delete parse (COMP, aprc->list_el ());
1764
1764
consume_token_throw (
1765
1765
Keyword::AND,
1766
1766
" Expected AND in BETWEEN ... expression"
1767
1767
);
1768
- parse (COMP, aprc->list_el ());
1768
+ delete parse (COMP, aprc->list_el ());
1769
1769
break ;
1770
1770
1771
1771
default : assert (false );
0 commit comments