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

    <tr>
        <th>Summary</th>
        <td>
            llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h: 3 * redundant condition ?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            code-quality,
            debuginfo
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          dcb314
      </td>
    </tr>
</table>

<pre>
    Static analyser cppcheck says:

llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h:249:29: style: Redundant condition: Parent.Element. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition]

Source code is

 assert((!Parent.Element ||
            (Parent.Element && static_cast<LVElement *>(Parent.Element))) &&
           "Invalid element");

Duplicates with the scope and the symbol a few lines later.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysU11vozoQ_TXDy6gIxoCTBx7yUaRKle7VrdTXK2NPgncdnGLTKv9-ZZpus-3rImsAe86cOZpjFYI9jswt1Fuo95ma4-Cn1uhelFXWe3Npn6KKVqMalbsEnlCfz3pg_RODugQQGyj2UFyjc68noM6O2s2Ggbrrxp77-fgwHjxQ9-iPViv3bPkNqNv5KeU9Pv_T_2Ad8wHEhqp1iilgiBfH6eM_NvNo1BhR-9HYaP2Ytv9VE48xv3d8Sm8EkkDlBkHuQO4QaLVBoAaowS3QGkiiDcgvs31VjseI0X_FbFMS1Nvpg3H3m7De36p98vOkGbU3jDbcnqAKgacItFpW-WeXV6Jr6s0DtPqa-d56WGbwv1Yhgtg9Pn8eb0Dcf4MtQtO64r8xAdHD-KqcNcgfEEoQsb2VsZ_PzmoVOeCbjQPGgTFof2ZUo3n_u5x671Dhgd_Q2ZEDOhV5yt8LZKYVZi3WKuO2lGVFRdMImQ1tL9WBDJFqTNnrlWyUqmQvhaqZC1XLzLZUUFVUJIuVKITMJdFBGLMmWZd9uWKoCj4p6_JksdxPx8yGMHO7LgQ1mVM9u7C4migN6O5lVs7Gy6JzB0QmWdIulqTk_KlNhe76-RigKpwNMXyWjjY6bv-Ou1GkseH03c8IosvmybVDjOflalEH1B1tHOY-1_70Sbn0ep58qppaStIDULeo_xUAAP__DlsqeQ">