<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/102982>102982</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-cl should map `/Wall` to `-Wall`, not `-Weverything`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fredemmott
</td>
</tr>
</table>
<pre>
This is *not* the same issue as https://github.com/llvm/llvm-project/issues/102583 - that issue is saying that `-Wall` works the same way as `/-Wall`, which is likely intentional
This issue is that the documented of `clang-cl` `/Wall` is extremely surprising - *both* `-Wall` and `/Wall` should be mapped to clang's `-Wall`, not `-Weverything`
It was surprising as:
- I had a clean build with MSVC `cl.exe /Wall /WX`
- I had a clean build with `clang++.exe -Wall -Werror`
- I had a failing build with `clang-cl.exe /Wall /WX`
The set of 'everything' is particularly problematic as even if you're passing `/std:c++20`, you still get `-Wc++98-compat` - of *course* my code that targets C++20 is not compatible with C++98.
While it could be argued that `/W4` is closer to clang's `-Wall`, the above makes the current mapping basically unusable for modern code. A potential middle ground would be to map `/Wall` to `-Wall -Wextra` ?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVE2PqzgQ_DXm0iIihkBy4JDJU6R32NOudvZq7A54x9jIH8nw71c28F40GuWylyDFdnVVV3Uz52SvEVtyeCOHHxkLfjC2vVkUOI7G-6wzYm7_GqQD6YDQszae0DP4AcGxEUE6FxCYg8H7yZHyTOiV0Gsv_RC6HTcjoVel7tsnn6z5F7kn9JpeOkKv-4IejiXk4AfmV0DpwLFZ6n75k9RF_s6UInUBD2M_3G8CDzbH8qQuCL1ulwi9wGOQfIhASn6gmkFqj9pLo5kixQ9SnJffVdtaNFWL2MLwMKL2KMDcIjpXTPc5TxSWYhsh6QA_vcUxVnHBTla6yDyP_eqMH2LDnhUwLb5AuMEEJaBDGNk0oQBvIBUktHHPb6MwbdaG4B3t7Aep-3jypOmnhwdzz1xYsiYd5vATBiaAAVfINHRBKgEP6Qf448-_L4vWHX4irATT959fJV6839pE6BuhbwkjEYf8Ha019huMG5MqEvwGJX9JY3MPwaFPHtHmqSG0ib5MzHrJg2JWzTBZ0ykcmZc8JgbvqEHeYDaB0MYiTHEadL9a47wg5ZkvUmix9n42AZyXSkGPqwvrldMx52acmI9-5guhMzfBOoz-jzNwI3ANGLM9egeXDT1yjbYuCLJTuLTismHvnkW_D1IhyHh9TQ2zfYipWWcldqpao8mVcWhfBirmnXXmHtP3gcts8WAtap_ymPxhTnKm1AxBB8ciw5uxMBqBVidpOzjDZNKMMQWjFEIh9NYELeCxEfUmIn5Jvze_GMWkfHrL0pSV10y0pTiVJ5Zhu29oWZ2OdV1lQ9vchKj3TV3W9f5WN8e6KstTcdzXh5NoDl2dyZYWtCqOe0r3ZVNVuwM9FQfaUdEgFwKPpCpwZFLt4lraGdtnaQm0-4KejjRTrEPl0l6kVONjWRGE0rgmbZt2WRd6R6pCSefdbxgvvcL2siZ4G-2Xql8Odhasav_Xdo167i39LwAA___XHtyh">