ahatanak added a comment. I'm not sure how common it is to pass a function that doesn't return an object or void, I think it's OK to allow returning primitive types if you think being too strict would catch too many false positives.
================ Comment at: lib/AST/DeclObjC.cpp:987 unsigned noParams = param_size(); if (noParams < 1 || noParams > 3) family = OMF_None; ---------------- It seems like this code would set "family" to OMF_None for some of the performSelector functions. For example: https://developer.apple.com/reference/objectivec/nsobject/1411637-performselectoronmainthread?language=objc https://developer.apple.com/reference/objectivec/nsobject/1417922-performselector?language=objc Do those functions belong to the performSelector family of methods? ================ Comment at: lib/Sema/SemaExprObjC.cpp:2280 + ImpliedMethod = + OPT->getInterfaceDecl()->lookupInstanceMethod(SE->getSelector()); + } else { ---------------- Do you need to check if OPT->getInterfaceDecl() returns null here? What happens if OPT is id? ================ Comment at: lib/Sema/SemaExprObjC.cpp:2499 checkCocoaAPI(*this, Result); + if (Method) + checkFoundationAPI(*this, SelLoc, Method, makeArrayRef(Args, NumArgs), ---------------- I'm not sure why checkFoundationAPI has to be called inside the else statement. Was there a reason you didn't or couldn't move it outside? Repository: rL LLVM https://reviews.llvm.org/D30174 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits