<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58755>58755</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] /Users/hristohristov/Projects/GitHub/nblib-calm/src/data/src/enumerators/ProcessEnumerator.cpp:107:26: warning: variable 'processes' is not initialized [cppcoreguidelines-init-variables]     std::vector<Process> processes;
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          H-G-Hristov
      </td>
    </tr>
</table>

<pre>
    Clang-tidy 15 on macOS reports:

>/Users/hristohristov/Projects/GitHub/nblib-calm/src/data/src/enumerators/ProcessEnumerator.cpp:107:26: warning: variable 'processes' is not initialized [cppcoreguidelines-init-variables]
    std::vector<Process> processes;
                         ^
                                   = 0

The description of the rule:

>cppcoreguidelines-init-variables
>
>Checks whether there are local variables that are declared without an initial value. These may lead to unexpected behavior if there is a code path that reads the variable before assigning to it.
>
>Only integers, booleans, floats, doubles and pointers are checked. The fix option initializes all detected values with the value of zero. An exception is float and double types, which are initialized to NaN.

I would expect that only risky variables are checks like the ones above or structs/classes without default constructors initialising all members, etc.

An empty vector is fine IMO:  `std::vector<Process> processes;` at least there should be an option to skip complex types.

What is causing the above error and why the description doesn't match the behavior? Is it a bug or is it something else?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdVUtz2zYQ_jXkZUccPkw9Djw4thX70LgzbadnEFiKqEGCA4CSlV_fBSDRyqQzaa6hJBAgwMX32IVaLc7Ng2LjYeWkOENRgx5hYPz1DzA4aeNsUt0n-WOSX9vqKSn3f1k0lu69kdbp2B5p_LvR_yB3fuqzdM9zS52xVbJdcaYGGljDqRXMsWWA4zygYU6HiBSBo7VPy8OMTxNhKPINteWaGjgxM8rx4LtHZiRrFUJSbqb4KlKYDUgLo3YgR-kkU_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