[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 08:12:35 PST 2017

arphaman added inline comments.

Comment at: lib/Sema/SemaDeclObjC.cpp:4337
+  VersionTuple MethodVersion = Method->getVersionIntroduced();
+  if (SemaRef.getASTContext().getTargetInfo().getPlatformMinVersion() >=
+          AcceptedInVersion &&
erik.pilkington wrote:
> I wonder if this is the right place to check this. If we're compiling using a new SDK, but deploying back before vector types were supported we will diagnose a method declared in a header even if it is never called. We should probably hook this into DiagnoseAvailabilityOfDecl (in SemaExpr.cpp), which is called whenever a method is actually used, and diagnose it then.
I'm not sure I get your argument.. We don't diagnose on method declarations, just method definitions, so I don't see how the header stuff is relevant here. We definitely don't want to diagnose on method uses either.



More information about the cfe-commits mailing list