-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler parts
Description
This is not the same issue as #102583 - that issue is saying that -Wall works the same way as /-Wall, which is likely intentional
This issue is that the documented behavior 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 ?
vszakats, JonnyPtn and Poldraunic
Metadata
Metadata
Assignees
Labels
clang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler parts