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

    <tr>
        <th>Summary</th>
        <td>
            scan-build erroneously calls "clang -v" (compile with verbose logging) to get version instead of "clang --version"
        </td>
    </tr>

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

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

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

<pre>
    The scan-build tool invokes Clang with -v to get the version. The -v option is "--verbose" output, attempting to compile with no inputs. The correct option to get the version is "--version".

https://github.com/llvm/llvm-project/blob/597f9761c3a5ba278fa930d2fac13f156287d505/clang/tools/scan-build-py/lib/libscanbuild/clang.py#L38

Most of the time, it seems that the apparent behavior of --verbose (with  no inputs) vs --version is identical, but we noticed this issue when we had linker (mis)configuration, which the former would trigger.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk8-yqzYMxp_GbDRhHDnhz4LF7bnDqt31BYwR4F5jM7Ygc96-Y9Kck05X3ZgBoU_Sp591Snb2RJ24_ybuPwu98xJi91icPqzXxRDGz-7PhSAZ7S_Dbt0IHIID64_wixJ8OO1neFhe4HIAB5iJgReCg2KywZeQsy8HhI1t8GATCMTL5aA4hEQCEcLO284CP0Az07qx9XNWMmHdrKOnuA9g_bZzegqaECMZfqn-t-57ofwuEEshfwr543kuzFsS6ofAXmA_W172oTRhFdg7d7wely2Gv8iwwH5wYRDY39t6auvqapS-DxrrZtKtkiNO2lzVdL1X2NTjXd4F9iZbI7DPfiWB_beFl-0zF7DD88yB8_srqcxx9btq3jv-IySGMJ1Dsl0pG2YZEtGagBf9HF9vm47kGQZa9GFDzClfdoPA5rTz20-BLRwJvozKxtmRPFujXa4x7AwPAh_YGhqBl_xDSjvBYyGfQ4sewVn_i2LWX23WNMFPdt6j5tP8D3gs1ixni1OIK0V4hD3DFO08UyyLsVNjq1pdUHetZavqa4tNsXQ1NcZUrWmr8abkWLXjTdZmuiHW8irVUNgOJd6kkihbhbIpURkpx0bipOqhbqW4SVq1dWXeaBniXJztd42qqqpweiCXTv4R_1kZ5qsQu5OAYZ-TuElnE6dvBbbsqHu7FBRj8BT25D7BaOdO-k45uByZcoHNv4B-bcSFeba5aPui-GsRPjHpMS_wW-uN52KPrvvfHJ-zZxzP8f8OAAD__20tUoo">