[ObjC] Add compatibility mode for type checking of qualified id block parameters.
authorVolodymyr Sapsai <vsapsai@apple.com>
Wed, 6 May 2020 01:51:28 +0000 (18:51 -0700)
committerVolodymyr Sapsai <vsapsai@apple.com>
Thu, 14 May 2020 19:08:19 +0000 (12:08 -0700)
commit6a3469f58d0c230e86043f6975f048968334dfa4
treee83305d432645d3ca21229e9d08b6fc4148fe4c6
parent8f2cc889b0517c4ad748de1a96f13489e89968a5
[ObjC] Add compatibility mode for type checking of qualified id block parameters.

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 and the fixed type checking. This mode is enabled
only on Darwin platforms.

Reviewed By: jyknight, ahatanak

Differential Revision: https://reviews.llvm.org/D79511
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/CC1Options.td
clang/lib/AST/ASTContext.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/darwin-objc-options.m
clang/test/SemaObjC/block-type-safety.m