diff options
author | Volodymyr Sapsai <vsapsai@apple.com> | 2020-05-05 18:51:28 -0700 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@apple.com> | 2020-05-14 12:08:19 -0700 |
commit | 6a3469f58d0c230e86043f6975f048968334dfa4 (patch) | |
tree | e83305d432645d3ca21229e9d08b6fc4148fe4c6 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8f2cc889b0517c4ad748de1a96f13489e89968a5 (diff) | |
download | llvm-6a3469f58d0c230e86043f6975f048968334dfa4.zip llvm-6a3469f58d0c230e86043f6975f048968334dfa4.tar.gz llvm-6a3469f58d0c230e86043f6975f048968334dfa4.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ff2683c..7e4bb6ea 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3381,6 +3381,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.BranchTargetEnforcement = Args.hasArg(OPT_mbranch_target_enforce); Opts.SpeculativeLoadHardening = Args.hasArg(OPT_mspeculative_load_hardening); + + Opts.CompatibilityQualifiedIdBlockParamTypeChecking = + Args.hasArg(OPT_fcompatibility_qualified_id_block_param_type_checking); } static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { |