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

    <tr>
        <th>Summary</th>
        <td>
            [OpenACC] SemaOpenACC::CheckLinkClauseVarList may need additional checks for Var
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    This was spotted by static anaylsis.

On this line:

https://github.com/llvm/llvm-project/blob/77fe6aaeaaf2b16e021675e92e543dafd18bbc0b/clang/lib/Sema/SemaOpenACCClause.cpp#L2099

`Var` is not being checked even though it is checked here:

https://github.com/llvm/llvm-project/blob/77fe6aaeaaf2b16e021675e92e543dafd18bbc0b/clang/lib/Sema/SemaOpenACCClause.cpp#L2089

and here:

https://github.com/llvm/llvm-project/blob/77fe6aaeaaf2b16e021675e92e543dafd18bbc0b/clang/lib/Sema/SemaOpenACCClause.cpp#L2110

This implies either that the null checks are not necessary or that a null check is missing. Either way one of these should be fixed.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMU72O2zwQfBqqWXwCSf26UOHPF1cHXJHg-qW0EhnTpMGl7uK3D2T7kmvTXbVYcjDYmdlFZrcEokE0_wutKbnRnggDCa1F81Tgmm1MA1uc3akwcboOP6xjeEcGvsScaQJzBc6Y3QgY8OrZcSnkXsj9S4C8gb0LJKr9_dHmfOGt00ehj4vLdjXlGM9CH71_-yj_XVL8SWMW-mh8NEIfu26mFpEQZ21US1Krtmtop6mpqwnnSfXGjHKDjh7DshG5rftOZ3yUlwuF_eFw8LgylePlInT1rOVudx9NtPIVk2glOIYQMxhyYYHR0niiCeiNNkFxXSy4vGE-fiylLy2wfwjE8OVnVUreR7utmTtfvCMGctlSgmwxQ7YEYfX-7j4DJrqFFWgkZkxXiA8kfsJtcZ0dswtLCd_udO94hRgI4ryRMgHbuPoJDMHsftFUFtNQTbtqhwUNqqubupNSNoUddq2qqrHFuu9V29W9mbHqRqMVtormale4QUvdyFrXsq7builVNeNs-h7R1A32naglndH5cjO4jGkpHPNKg6o6pdrCoyHPj6u8W1jt5xRDpjA9bjMNt3DMurCopXec-S9bdtnfrvphs2ie4JPrW-bV_rA58-zC6R7CK6ZnxxnOeIVANAFOk8suBvxj9hwTvGIq1uSHf16em0IW-vgQ-Tbo3wEAAP__Gy5yGg">