There appear to a be semantic difference between GCC and clang with the current version of this patch which results in a lot of additional warnings in the Linux kernel: https://godbolt.org/z/eHFJd8
Warning about casting to an enum seems clearly correct and in scope for this warning. Warning about casting to _Bool seems clearly incorrect and should not be warned about at all.
Sun, Feb 16
Thanks for the quick review!
This revision caused issue for the MSVC build bot. I created a followup patch D74694.
Thanks for the review.
Phab registered the commit, but didn't close this review.
Tue, Feb 4
- Enabled the warning by default
- Added an Microsoft extension, the unit tests already expected this behaviour
Sat, Feb 1
Created D73834 to cherry-pick the changes to the release branch and updates the release notes.
Sun, Jan 26
So if I understand correctly:
- getParamNameAsWritten will become getArgText
- The getParamName will do the translation from the name in the documentation to the name in the current function declaration. If the parameter index is invalid the function will fail (with an assertion error) and not fallback to call getArgText.
Tue, Jan 21
Would it make sense to also allow wmain with wchar_t? https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?view=vs-2019
LGTM! Do you think this should also be pushed onto the release branch?
Yes, but minimal fix is better for release branch, so @hans should merge it.
Handling your case probably needs more work and patches..
Jan 19 2020
I proposed D73007 as fix.
Jan 18 2020
Thanks for your report. I think it's similar to https://bugs.llvm.org/show_bug.cgi?id=44556. I'll look for a fix.
Thanks for the review!
Jan 12 2020
Jan 11 2020
Thanks for the review!
I only have some naming nits
- incriment -> increment
- decriment -> decrement
Friendly ping, it would be nice to get this in the next release.
Adding Depends on D72284 would add the patches to the stack.
I like the patch!
Jan 7 2020
While looking at the test failures I noticed the tests pointer_to_integral_type_conv in clang/test/Sema/MicrosoftExtensions.c were not tested. Will look into it later.
You're welcome. It would be nice if we can get this one in the release.
Jan 6 2020
Thanks for the feedback!
Jan 5 2020
The diagnostic is not enabled by default
But GCC enables it for C even without "-Wall or -Wextra". Clang should follow it..
Made some improvements based on feedback of @craig.topper:
- Adds a not
- Implements an example of the maximum string length when using -Wpedantic
Nice to see this patch! I intended to look at a similar patch, but that's no longer required.
Rebased on master. This adds one new fix and removes the ones done by others.
Jan 4 2020
@eugene Please don't use auto when type is spelled in same statement or iterator. do you mean type is not spelled ?
I like this change, but I don't feel qualified to fully review the patch.
You can drop changes to lld. I've fixed lld -Wrange-loop-analysis a few days ago in 681b1be774964a804beabfb7c5e3bdab8f979e4a . (Archive::Child c was also deleted).
For mlir, only mlir/lib/Dialect/Linalg/Utils/Utils.cpp:117:8 needs a fix. I've fixed others in eeef50b1fee91dbe993187324003d2665ceae331.
I proposed the same change in D72210, but I'll adjust that patch once accepted.
I think there is a false positive.for (const std::pair<ThunkSection *, uint32_t> ts : isd->thunkSections)
Added support for some additional features:
- Allow limits from the C standard, either sharing the C++ constants or separately.
- Allow to document the design choices for the limit.
- Allow to track the status of the limit. (This may become obsolete ones all limits are implemented, but that can take a while.)
Jan 2 2020
However, I am afraid I don't like some of the fixes here. You can replace const auto with const auto & and call that a fix... IMHO if the type is not obvious, const ConcreteType & will be better.
Jan 1 2020
Thanks for the review! I'll commit all the -Wrange-loop-analysis patches later today.
Reviewed the types and added a * for pointers and added a const when applicable.
Dec 29 2019
Fixes the compilation issues with the clang unit tests.
Dec 28 2019
The merge bot noticed I forgot to update clang's unittests. Will look at that.
Thanks for writing this document! I noticed the document contains a lot of long sentences. These may be harder to understand for non-native speakers. I pointed a few out, but for some I don't have better suggestions.
I like the goal of this patch and the simplifications it does. I don't feel qualified to do a full review.