Commit 73152a2ec20766ac45673a129bf1f5fc97ca9bbe fixed type checking for
blocks with qualified id parameters. But there are existing APIs in
Apple SDKs relying on the old type checking behavior. Specifically,
these are APIs using NSItemProviderCompletionHandler in
Foundation/NSItemProvider.h. To keep existing code working and to allow
developers to use affected APIs introduce a compatibility mode that
enables the previous type checking. This mode is enabled only on Darwin
platforms.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
clang/test/SemaObjC/block-type-safety.m | ||
---|---|---|
170 | It seems a shame to disallow this assignment in the compatibility mode, when it ought to be allowed. Perhaps it would be better to allow both directions for parameters when the compatibility flag is set? (That is: the compat mode flag would only cause the compiler to allow _more_ things than it otherwise should.) |
clang/test/SemaObjC/block-type-safety.m | ||
---|---|---|
170 | Hmm, sounds like an interesting idea. It can make the transitioning to the new compiler version less disruptive. Need to think more if it has any undesirable consequences. So far my only objection is that it makes things less consistent. But given the current state of block type checking that argument isn't particularly compelling. |
It looks like you didn't squash your two commits before uploading, so the diff for review now only includes the changes for the comment, not the complete patch. Other than needing to squash the commits, LGTM.
May want to wait for approval from one of the objc reviewers as well though.
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2380 | Not that I know there is a better place to put this option, this is not really a ClangTarget option. Putting this in addClangTargetOptions will put this onto codegen flags for -fembed-bitcode, but this is just a frontend option that doesn't affect code generation. |
Not that I know there is a better place to put this option, this is not really a ClangTarget option.
Putting this in addClangTargetOptions will put this onto codegen flags for -fembed-bitcode, but this is just a frontend option that doesn't affect code generation.