[PATCH] D79511: [ObjC] Add compatibility mode for type checking of qualified id block parameters.
James Y Knight via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 13:35:17 PDT 2020
jyknight added inline comments.
================
Comment at: clang/test/SemaObjC/block-type-safety.m:170
+ genericBlockWithParam = blockWithParam;
+ blockWithParam = genericBlockWithParam; // expected-error {{incompatible block pointer types assigning to 'void (^)(NSAllArray *)' from 'void (^)(id<Foo>)'}}
+ return 0;
----------------
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.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79511/new/
https://reviews.llvm.org/D79511
More information about the cfe-commits
mailing list