fix(clang-cl): reduce warnings#900
Closed
Nerixyz wants to merge 2 commits intocppalliance:developfrom
Closed
Conversation
|
An automated preview of the documentation is available at https://900.mrdocs.prtest2.cppalliance.org/index.html |
| $<$<CXX_COMPILER_ID:MSVC>:/MP> # multi-processor compilation | ||
| /EHs # C++ Exception handling | ||
| $<$<CONFIG:Debug>:/Oy-> # Disable frame pointer omission | ||
| $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-parameter> # ClangCL warning enabled with /W4 |
Collaborator
There was a problem hiding this comment.
Shouldn't we fix the code triggering the warning instead of disabling the warning?
Contributor
Author
There was a problem hiding this comment.
I made a separate commit now. I initially added this because the warnings weren't present in the output of GCC and Clang on macOS/Linux.
Collaborator
There was a problem hiding this comment.
Yes. At some point we have to enable all these warnings there too. It's just that the project started without the these warnings and we always have higher priority stuff to work on.
| on the type is returned instead. | ||
| */ | ||
| std::string_view | ||
| std::string |
|
An automated preview of the documentation is available at https://900.mrdocs.prtest2.cppalliance.org/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When compiling with clang-cl, there are warnings not present with MSVC
/MPisn't a thing in clang-cl./W4enables-Wunused-parameterin clang-cl (or this might be enabled by default) - either way, it's not enabled in MSVC and generates some warnings here.getRawUnqualifiedreturned astd::string_viewto a temporarystd::stringand clang warned about it.-Wself-movewas ignored when__GNUC__was defined. This isn't defined with clang-cl, so ignore it in the clang block.