refactor: remove old TODO comments that aren't relevant anymore (#21144)

This commit is contained in:
dundargoc
2022-11-22 01:09:33 +01:00
committed by GitHub
parent 0cbc23d3cc
commit 7c10774860
4 changed files with 0 additions and 58 deletions

View File

@@ -1236,8 +1236,6 @@ int eval_foldexpr(char *arg, int *cp)
return (int)retval; return (int)retval;
} }
// TODO(ZyX-I): move to eval/executor
/// Get an lvalue /// Get an lvalue
/// ///
/// Lvalue may be /// Lvalue may be
@@ -1622,8 +1620,6 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const
return p; return p;
} }
// TODO(ZyX-I): move to eval/executor
/// Clear lval "lp" that was filled by get_lval(). /// Clear lval "lp" that was filled by get_lval().
void clear_lval(lval_T *lp) void clear_lval(lval_T *lp)
{ {
@@ -1631,8 +1627,6 @@ void clear_lval(lval_T *lp)
xfree(lp->ll_newkey); xfree(lp->ll_newkey);
} }
// TODO(ZyX-I): move to eval/executor
/// Set a variable that was parsed by get_lval() to "rettv". /// Set a variable that was parsed by get_lval() to "rettv".
/// ///
/// @param endp points to just after the parsed name. /// @param endp points to just after the parsed name.
@@ -1840,8 +1834,6 @@ notify:
} }
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Evaluate the expression used in a ":for var in expr" command. /// Evaluate the expression used in a ":for var in expr" command.
/// "arg" points to "var". /// "arg" points to "var".
/// ///
@@ -1917,8 +1909,6 @@ void *eval_for_line(const char *arg, bool *errp, char **nextcmdp, int skip)
return fi; return fi;
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Use the first item in a ":for" list. Advance to the next. /// Use the first item in a ":for" list. Advance to the next.
/// Assign the values to the variable (list). "arg" points to the first one. /// Assign the values to the variable (list). "arg" points to the first one.
/// ///
@@ -1965,8 +1955,6 @@ bool next_for_item(void *fi_void, char *arg)
fi->fi_semicolon, fi->fi_varcount, false, NULL) == OK); fi->fi_semicolon, fi->fi_varcount, false, NULL) == OK);
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Free the structure used to store info used by ":for". /// Free the structure used to store info used by ":for".
void free_for_info(void *fi_void) void free_for_info(void *fi_void)
{ {
@@ -2212,8 +2200,6 @@ char *get_user_var_name(expand_T *xp, int idx)
return NULL; return NULL;
} }
// TODO(ZyX-I): move to eval/expressions
/// Does not use 'cpo' and always uses 'magic'. /// Does not use 'cpo' and always uses 'magic'.
/// ///
/// @return true if "pat" matches "text". /// @return true if "pat" matches "text".
@@ -2293,8 +2279,6 @@ static int eval_func(char **const arg, char *const name, const int name_len, typ
return ret; return ret;
} }
// TODO(ZyX-I): move to eval/expressions
/// The "evaluate" argument: When false, the argument is only parsed but not /// The "evaluate" argument: When false, the argument is only parsed but not
/// executed. The function may return OK, but the rettv will be of type /// executed. The function may return OK, but the rettv will be of type
/// VAR_UNKNOWN. The function still returns FAIL for a syntax error. /// VAR_UNKNOWN. The function still returns FAIL for a syntax error.
@@ -2344,8 +2328,6 @@ int eval0(char *arg, typval_T *rettv, char **nextcmd, int evaluate)
return ret; return ret;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle top level expression: /// Handle top level expression:
/// expr2 ? expr1 : expr1 /// expr2 ? expr1 : expr1
/// ///
@@ -2410,8 +2392,6 @@ int eval1(char **arg, typval_T *rettv, int evaluate)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle first level expression: /// Handle first level expression:
/// expr2 || expr2 || expr2 logical OR /// expr2 || expr2 || expr2 logical OR
/// ///
@@ -2469,8 +2449,6 @@ static int eval2(char **arg, typval_T *rettv, int evaluate)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle second level expression: /// Handle second level expression:
/// expr3 && expr3 && expr3 logical AND /// expr3 && expr3 && expr3 logical AND
/// ///
@@ -2528,8 +2506,6 @@ static int eval3(char **arg, typval_T *rettv, int evaluate)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle third level expression: /// Handle third level expression:
/// var1 == var2 /// var1 == var2
/// var1 =~ var2 /// var1 =~ var2
@@ -2633,8 +2609,6 @@ static int eval4(char **arg, typval_T *rettv, int evaluate)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle fourth level expression: /// Handle fourth level expression:
/// + number addition /// + number addition
/// - number subtraction /// - number subtraction
@@ -2796,8 +2770,6 @@ static int eval5(char **arg, typval_T *rettv, int evaluate)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle fifth level expression: /// Handle fifth level expression:
/// - * number multiplication /// - * number multiplication
/// - / number division /// - / number division
@@ -2913,8 +2885,6 @@ static int eval6(char **arg, typval_T *rettv, int evaluate, int want_string)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/expressions
/// Handle sixth level expression: /// Handle sixth level expression:
/// number number constant /// number number constant
/// 0zFFFFFFFF Blob constant /// 0zFFFFFFFF Blob constant
@@ -3408,8 +3378,6 @@ static int eval_method(char **const arg, typval_T *const rettv, const bool evalu
return ret; return ret;
} }
// TODO(ZyX-I): move to eval/expressions
/// Evaluate an "[expr]" or "[expr:expr]" index. Also "dict.key". /// Evaluate an "[expr]" or "[expr:expr]" index. Also "dict.key".
/// "*arg" points to the '[' or '.'. /// "*arg" points to the '[' or '.'.
/// ///
@@ -3709,8 +3677,6 @@ static int eval_index(char **arg, typval_T *rettv, int evaluate, int verbose)
return OK; return OK;
} }
// TODO(ZyX-I): move to eval/executor
/// Get an option value /// Get an option value
/// ///
/// @param[in,out] arg Points to the '&' or '+' before the option name. Is /// @param[in,out] arg Points to the '&' or '+' before the option name. Is
@@ -3974,8 +3940,6 @@ char *partial_name(partial_T *pt)
return (char *)pt->pt_func->uf_name; return (char *)pt->pt_func->uf_name;
} }
// TODO(ZyX-I): Move to eval/typval.h
static void partial_free(partial_T *pt) static void partial_free(partial_T *pt)
{ {
for (int i = 0; i < pt->pt_argc; i++) { for (int i = 0; i < pt->pt_argc; i++) {
@@ -3992,8 +3956,6 @@ static void partial_free(partial_T *pt)
xfree(pt); xfree(pt);
} }
// TODO(ZyX-I): Move to eval/typval.h
/// Unreference a closure: decrement the reference count and free it when it /// Unreference a closure: decrement the reference count and free it when it
/// becomes zero. /// becomes zero.
void partial_unref(partial_T *pt) void partial_unref(partial_T *pt)

View File

@@ -2960,8 +2960,6 @@ void ex_return(exarg_T *eap)
} }
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// ":1,25call func(arg1, arg2)" function call. /// ":1,25call func(arg1, arg2)" function call.
void ex_call(exarg_T *eap) void ex_call(exarg_T *eap)
{ {

View File

@@ -558,8 +558,6 @@ static const char *list_arg_vars(exarg_T *eap, const char *arg, int *first)
return arg; return arg;
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Set one item of `:let var = expr` or `:let [v1, v2] = list` to its value /// Set one item of `:let var = expr` or `:let [v1, v2] = list` to its value
/// ///
/// @param[in] arg Start of the variable name. /// @param[in] arg Start of the variable name.
@@ -769,8 +767,6 @@ void ex_unlet(exarg_T *eap)
ex_unletlock(eap, eap->arg, 0, do_unlet_var); ex_unletlock(eap, eap->arg, 0, do_unlet_var);
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// ":lockvar" and ":unlockvar" commands /// ":lockvar" and ":unlockvar" commands
void ex_lockvar(exarg_T *eap) void ex_lockvar(exarg_T *eap)
{ {
@@ -787,8 +783,6 @@ void ex_lockvar(exarg_T *eap)
ex_unletlock(eap, arg, deep, do_lock_var); ex_unletlock(eap, arg, deep, do_lock_var);
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Common parsing logic for :unlet, :lockvar and :unlockvar. /// Common parsing logic for :unlet, :lockvar and :unlockvar.
/// ///
/// Invokes `callback` afterwards if successful and `eap->skip == false`. /// Invokes `callback` afterwards if successful and `eap->skip == false`.
@@ -853,8 +847,6 @@ static void ex_unletlock(exarg_T *eap, char *argstart, int deep, ex_unletlock_ca
eap->nextcmd = check_nextcmd(arg); eap->nextcmd = check_nextcmd(arg);
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Unlet a variable indicated by `lp`. /// Unlet a variable indicated by `lp`.
/// ///
/// @param[in] lp The lvalue. /// @param[in] lp The lvalue.
@@ -944,8 +936,6 @@ static int do_unlet_var(lval_T *lp, char *name_end, exarg_T *eap, int deep FUNC_
return ret; return ret;
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// unlet a variable /// unlet a variable
/// ///
/// @param[in] name Variable name to unlet. /// @param[in] name Variable name to unlet.
@@ -1016,8 +1006,6 @@ int do_unlet(const char *const name, const size_t name_len, const bool forceit)
return FAIL; return FAIL;
} }
// TODO(ZyX-I): move to eval/ex_cmds
/// Lock or unlock variable indicated by `lp`. /// Lock or unlock variable indicated by `lp`.
/// ///
/// Locks if `eap->cmdidx == CMD_lockvar`, unlocks otherwise. /// Locks if `eap->cmdidx == CMD_lockvar`, unlocks otherwise.
@@ -1463,8 +1451,6 @@ bool var_check_fixed(const int flags, const char *name, size_t name_len)
return false; return false;
} }
// TODO(ZyX-I): move to eval/expressions
/// Check if name is a valid name to assign funcref to /// Check if name is a valid name to assign funcref to
/// ///
/// @param[in] name Possible function/funcref name. /// @param[in] name Possible function/funcref name.
@@ -1493,8 +1479,6 @@ bool var_wrong_func_name(const char *const name, const bool new_var)
return false; return false;
} }
// TODO(ZyX-I): move to eval/expressions
/// Check if a variable name is valid /// Check if a variable name is valid
/// ///
/// @param[in] varname Variable name to check. /// @param[in] varname Variable name to check.

View File

@@ -1,8 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check // This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// TODO(ZyX-I): move to eval/executor
/// @file ex_eval.c /// @file ex_eval.c
/// ///
/// Functions for Ex command line for the +eval feature. /// Functions for Ex command line for the +eval feature.