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

    <tr>
        <th>Summary</th>
        <td>
            Missing options in `clang -help` and `flang-new -help`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            clang:driver,
            flang:driver
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          banach-space
      </td>
    </tr>
</table>

<pre>
    Clang's driver library doesn't print `-fsyntax-only` or `-O{0|1|2|3}` options when using the `-help` option. This can be reproduced with `clang` as well as `flang-new` (which is built in terms of `clangDriver`):
```
 $ clang  -help | grep syntax
  -objcmt-migrate-property-dot-syntax
                          Enable migration of setter/getter messages to property-dot syntax
$
```
 (`-fsyntax-only` is missing). I suspect that this might affect other options too. Printing happens via [OptTable::printHelp](https://github.com/llvm/llvm-project/blob/e5e93b6130bde96d7e14851e218c5bf055f8a834/llvm/lib/Option/OptTable.cpp#L640-L684), but I don't see any obvious issues with that method.
 
 This isn't that noticeable in Clang as `clang -help | wc -l` gives me ~1200. But for `flang-new` this is ~50. Checked with 333f98b4b688.

Thanks,
-Andrzej
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVNuOozgQ_RryUgIZGwg88JDuzGhHmlXvQ_-ADQW4h9gIm85kv37Lpi8T7c7DRgFTF8qn6hyjbH9rH2dpxoQfHfSrfsUVZq1Wud6gt-gMBTwsqzYekoqlg7sZL3-m1sw3ssGu0f2UHB9YcnzM6eJ0ieR4juHFa2scXCc0sDltRvATxlcmnJfPlAyeJ-2gkwYUworLavutwx6u2k8hv4soKV9SNZznsJI5BHdq8BpCCa-vk-4moEpq07MHbcDjenFgh48i59glWQlvEnFK2Dlhp2Du_2hSqQJiNkBECtQUjIQL9gG8pUFq1Ut38elFj6v0mBLuBVd_S3vr0_vU3_2-GKlmhL0CjSJgdegJd8K_jvEBLuicHNGBt_DrFndoCPPvmqn_izua0kW7QApNIoNv4Da3YOeJIhluMT5OHuQwBLcl6tYPSr21GfwVhBFYneSyIHlftYSkfHha_HPoKsxXnKJ8_gh8l2fCMnm_uBDhX0OHRPCmss5eyJjn1_cljPKFtiVTzVbRgiU2QlW5YKrHpuqPmBd1mSPP665UAyvLoZa1KH6po8N7TxHx_hBRZd2yJFx8rwqWfq_qIgiBP5JkPA2ht7vmHSJIcwOrXrXdHE3LbURA1GMc0AX9ZPvsfcb7ElWs345NTDPW6w4jxaTGeNjetLvr61Ne1w7SORAzkkBp9nROjl9yzlgGDwRt2M_aneL9vl1ILCntccLux_uhEUIMTa0KVdX1G8r9_jxJ88NRx7uZnky__o0vB2zzqmKMBlKJQ9-KvhGNPHjtZ2z_3IXywT61ct9BPJqmv0P4ETls69z-b9r3idNDeWRCHKZW1GUzFIUajqpmXPQ8zyuV19gp1vSc14dZKpxdSwJMOB-t7WHQq_M7d-QKLNOyf0vEaf_effqHf_nL80G3nHHOatbkNTsWPBNSyKpURY6iY0Ulk4LhReo5C_Azu46HtY2dqG10FJy18-4zKGmQo0GMKKm-3EhGa6ukkd2UukV2eIh429j2P77_wiY">