summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* PR35815: Separate out the ns-consumed diagnostic into an error andAlex Lorenz2018-01-032-0/+16
| | | | | | | | | | | | | | | a warning This commit separates out the warn_nsconsumed_attribute_mismatch and warn_nsreturns_retained_attribute_mismatch diagnostic into a warning and error. This is needed to avoid a module import regression introduced by r313717 that turned these errors into warnings and started promoting them only when needed, which caused an error when importing a module as it had different warning settings. rdar://36265651 llvm-svn: 321775
* Determine the attribute subject for diagnostics based on declarative ↵Aaron Ballman2017-11-267-21/+21
| | | | | | | | | | information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the "attribute only applies to" diagnostic needs to be generated manually as part of semantic processing. This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc). Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute). llvm-svn: 319002
* [ObjC][ARC] Honor noescape attribute for -Warc-retain-cyclesAlex Lorenz2017-11-171-0/+12
| | | | | | | | rdar://35409566 Differential Revision: https://reviews.llvm.org/D40141 llvm-svn: 318552
* Remove redundant copy-pasted comment in test file from r317736Alex Lorenz2017-11-081-1/+0
| | | | llvm-svn: 317737
* [ObjC] Fix function signature handling for blocks literals with attributesAlex Lorenz2017-11-081-0/+15
| | | | | | | | | | | | | | Block literals can have a type with attributes in its signature, e.g. ns_returns_retained. The code that inspected the type loc of the block when declaring its parameters didn't account for this fact, and only looked through paren type loc. This commit ensures that getAsAdjusted is used instead of IgnoreParens to find the block's FunctionProtoTypeLoc. This ensures that block parameters are declared correctly in the block and avoids the 'undeclared identifier' error. rdar://35416160 llvm-svn: 317736
* [ObjC] Boxed strings should use the nullability from stringWithUTF8String's ↵Alex Lorenz2017-11-081-0/+28
| | | | | | | | | | | | | | | | | | return type Objective-C NSString has a class method stringWithUTF8String that creates a new NSString from a C string. Objective-C box expression @(...) can be used to create an NSString instead of invoking the stringWithUTF8String method directly (The compiler lowers it down to the invocation though). This commit ensures that the type of @(string-value) gets the same nullability attributes as the return type of stringWithUTF8String to ensure that the diagnostics are consistent between the two. rdar://33847186 Differential Revision: https://reviews.llvm.org/D39762 llvm-svn: 317727
* [Sema] Add support for flexible array members in Obj-C.Volodymyr Sapsai2017-10-233-2/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars that contain a flexible array member to be at the end of class too. It is possible to add in a subclass another ivar at the end but we'll emit a warning in this case. Also we'll emit a warning if a variable sized ivar is declared in class extension or in implementation because subclasses won't know they should avoid adding new ivars. In ARC incomplete array objects are treated as __unsafe_unretained so require them to be marked as such. Prohibit synthesizing ivars with flexible array members because order of synthesized ivars is not obvious and tricky to control. Spelling out ivar explicitly gives control to developers and helps to avoid surprises with unexpected ivar ordering. For C and C++ changed diagnostic to tell explicitly a field is not the last one and point to the next field. It is not as useful as in Obj-C but it is an improvement and it is consistent with Obj-C. For C for unions emit more specific err_flexible_array_union instead of generic err_field_incomplete. rdar://problem/21054495 Reviewers: rjmccall, theraven Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38773 llvm-svn: 316381
* [ObjC] Don't warn on readwrite properties with custom setters thatAlex Lorenz2017-10-061-0/+21
| | | | | | | | override readonly properties from protocols rdar://34192541 llvm-svn: 315093
* [Sema][ObjC] Warn about mismatches in attributes between overriding andAkira Hatanaka2017-09-201-1/+12
| | | | | | | | | | | | | overridden methods when compiling for non-ARC. Previously, clang would error out when compiling for ARC, but didn't print any diagnostics when compiling for non-ARC. This was pointed out in the patch review for attribute noescape: https://reviews.llvm.org/D32210 llvm-svn: 313717
* [Sema] Correct typos in LHS, RHS before building a binop expression.Volodymyr Sapsai2017-09-151-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, typo correction should be done before dispatching between different kinds of binary operations like pseudo-object assignment, overloaded binary operation, etc. Without this change we hit an assertion Assertion failed: (!LHSExpr->hasPlaceholderType(BuiltinType::PseudoObject)), function CheckAssignmentOperands when in Objective-C we reference a property without `self` and there are 2 equally good typo correction candidates: ivar and a class name. In this case LHS expression in `BuildBinOp` is CXXDependentScopeMemberExpr `-TypoExpr and instead of handling Obj-C property assignment as pseudo-object assignment, we call `CreateBuiltinBinOp` which corrects typo to ObjCPropertyRefExpr '<pseudo-object type>' but cannot handle pseudo-objects and asserts about it (indirectly, through `CheckAssignmentOperands`). rdar://problem/33102722 Reviewers: rsmith, ahatanak, majnemer Reviewed By: ahatanak Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37322 llvm-svn: 313323
* [ObjC] Add a -Wobjc-messaging-id warningAlex Lorenz2017-08-251-0/+21
| | | | | | | | | | | | -Wobjc-messaging-id is a new, non-default warning that warns about message sends to unqualified id in Objective-C. This warning is useful for projects that would like to avoid any potential future compiler errors/warnings, as the system frameworks might add a method with the same selector which could make the message send to id ambiguous. rdar://33303354 llvm-svn: 311779
* [ObjC] Check written attributes only when synthesizing ambiguous propertyAlex Lorenz2017-08-221-0/+27
| | | | | | | | | | | | | | | | | This commit fixes a bug introduced in r307903. The attribute ambiguity checker that was introduced in r307903 checked all property attributes, which caused errors for source-compatible properties, like: @property (nonatomic, readonly) NSObject *prop; @property (nonatomic, readwrite) NSObject *prop; because the readwrite property would get implicit 'strong' attribute. The ambiguity checker should be concerned about explicitly specified attributes only. rdar://33748089 llvm-svn: 311443
* [Sema] Don't emit -Wunguarded-availability for switch casesErik Pilkington2017-08-181-0/+24
| | | | | | | | | This made it awkward to switch over an enum where some entries are partial and is unlikley to catch any bugs. Differential revision: https://reviews.llvm.org/D36777 llvm-svn: 311191
* [Sema] Silence -Wobjc-missing-property-synthesis for unavailable propertiesAlex Lorenz2017-08-151-1/+15
| | | | | | rdar://30296911 llvm-svn: 310916
* [Sema] Improve some -Wunguarded-availability diagnosticsErik Pilkington2017-08-143-15/+15
| | | | | | | rdar://33543523 Differential revision: https://reviews.llvm.org/D36200 llvm-svn: 310874
* [Sema][ObjC] Fix spurious -Wcast-qual warnings.Akira Hatanaka2017-08-111-2/+15
| | | | | | | | | | We do not meaningfully track object const-ness of Objective-C object types. Silence the -Wcast-qual warning that is issued when casting to or from Objective-C object types results in losing const qualification. rdar://problem/33807915 llvm-svn: 310672
* Recommit r308327 3rd time: Add a warning for missingAlex Lorenz2017-07-282-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files The second recommit (r309106) was reverted because the "non-default #pragma pack value chages the alignment of struct or union members in the included file" warning proved to be too aggressive for external projects like Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=749197). This recommit makes the problematic warning a non-default one, and gives it the -Wpragma-pack-suspicious-include warning option. The first recommit (r308441) caused a "non-default #pragma pack value might change the alignment of struct or union members in the included file" warning in LLVM itself. This recommit tweaks the added warning to avoid warnings for #includes that don't have any records that are affected by the non-default alignment. This tweak avoids the previously emitted warning in LLVM. Original message: This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 309386
* Revert r309106 "Recommit r308327 2nd time: Add a warning for missing"Hans Wennborg2017-07-262-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning fires on non-suspicious code in Chromium. Reverting until a solution is figured out. > Recommit r308327 2nd time: Add a warning for missing > '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files > > The first recommit (r308441) caused a "non-default #pragma pack value might > change the alignment of struct or union members in the included file" warning > in LLVM itself. This recommit tweaks the added warning to avoid warnings for > #includes that don't have any records that are affected by the non-default > alignment. This tweak avoids the previously emitted warning in LLVM. > > Original message: > > This commit adds a new -Wpragma-pack warning. It warns in the following cases: > > - When a translation unit is missing terminating #pragma pack (pop) directives. > - When entering an included file if the current alignment value as determined > by '#pragma pack' directives is different from the default alignment value. > - When leaving an included file that changed the state of the current alignment > value. > > rdar://10184173 > > Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 309186
* Recommit r308327 2nd time: Add a warning for missingAlex Lorenz2017-07-262-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files The first recommit (r308441) caused a "non-default #pragma pack value might change the alignment of struct or union members in the included file" warning in LLVM itself. This recommit tweaks the added warning to avoid warnings for #includes that don't have any records that are affected by the non-default alignment. This tweak avoids the previously emitted warning in LLVM. Original message: This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 309106
* Revert r308441 "Recommit r308327: Add a warning for missing '#pragma pack ↵Hans Wennborg2017-07-192-7/+0
| | | | | | | | | | | | | | | | | | | | | (pop)' and suspicious uses of '#pragma pack' in included files" This seems to have broken the sanitizer-x86_64-linux buildbot. Reverting until it's fixed, especially since this landed just before the 5.0 branch. > This commit adds a new -Wpragma-pack warning. It warns in the following cases: > > - When a translation unit is missing terminating #pragma pack (pop) directives. > - When entering an included file if the current alignment value as determined > by '#pragma pack' directives is different from the default alignment value. > - When leaving an included file that changed the state of the current alignment > value. > > rdar://10184173 > > Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 308455
* Recommit r308327: Add a warning for missing '#pragma pack (pop)'Alex Lorenz2017-07-192-0/+7
| | | | | | | | | | | | | | | | | | and suspicious uses of '#pragma pack' in included files This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 308441
* Revert r308327Alex Lorenz2017-07-182-7/+0
| | | | | | I forgot to test clang-tools-extra which is now failing. llvm-svn: 308328
* Add a warning for missing '#pragma pack (pop)' and suspicious usesAlex Lorenz2017-07-182-0/+7
| | | | | | | | | | | | | | | | | | of '#pragma pack' in included files This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 308327
* Use ARC parsing rules for ns_returns_retained in MRC so that code canJohn McCall2017-07-151-0/+18
| | | | | | | | be shared without warnings. Build AttributedTypes to leave breadcrumbs for tools like the static analyzer. Warn about attempting to use the attribute with incompatible return types. llvm-svn: 308092
* Extend -Wdeprecated-implementations to warn about unavailable methodsAlex Lorenz2017-07-131-1/+8
| | | | | | rdar://22867595 llvm-svn: 307924
* NFC, Cleanup the code for -Wdeprecated-implementationsAlex Lorenz2017-07-131-5/+5
| | | | | | | | and void capitalization of the warning message rdar://22867595 llvm-svn: 307923
* [ObjC] Pick a 'readwrite' property when synthesizing ambiguousAlex Lorenz2017-07-132-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | property and check for incompatible attributes This commit changes the way ambiguous property synthesis (i.e. when synthesizing a property that's declared in multiple protocols) is performed. Previously, Clang synthesized the first property that was found. This lead to problems when the property was synthesized in a class that conformed to two protocols that declared that property and a second protocols had a 'readwrite' declaration - the setter was not synthesized so the class didn't really conform to the second protocol and user's code would crash at runtime when they would try to set the property. This commit ensures that a first readwrite property is selected. This is a semantic change that changes users code in this manner: ``` @protocol P @property(readonly) int p; @end @protocol P2 @property(readwrite) id p; @end @interface I <P2> @end @implementation I @syntesize p; // Users previously got a warning here, and Clang synthesized // readonly 'int p' here. Now Clang synthesizes readwrite 'id' p.. @end ``` To ensure that this change is safe, the warning about incompatible types is promoted to an error when this kind of readonly/readwrite ambiguity is detected in the @implementation. This will ensure that previous code that had this subtle bug and ignored the warning now will fail to compile with an error, and users should not get suprises at runtime once they resolve the error. The commit also extends the ambiguity checker, and now it can detect conflicts among the different property attributes. An error diagnostic is used for conflicting attributes, to ensure that the user won't get "suprises" at runtime. ProtocolPropertyMap is removed in favour of a a set + vector because the map's order of iteration is non-deterministic, so it couldn't be used to select the readwrite property. rdar://31579994 Differential Revision: https://reviews.llvm.org/D35268 llvm-svn: 307903
* [ObjC] Check that a subscript methods is declared for a qualified id typeAlex Lorenz2017-07-112-3/+21
| | | | | | | | | | | | Objective-C subscript expressions report errors when a subscript method is not declared in the base class. However, prior to this commit, qualified id types were not checked. This commit ensures that an appropriate error is reported when a subscript method is not declared in any of the protocols that are included in the qualified id type. rdar://33213924 llvm-svn: 307642
* [ObjC] Avoid the -Wunguarded-availability warnings for protocolAlex Lorenz2017-07-071-0/+24
| | | | | | | | | | | | | | | requirements in protocol/class/category declarations The unguarded availability warnings in the protocol requirements of a protocol /class/category declaration can be avoided. This matches the behaviour of Swift's diagnostics. The warnings for deprecated/unavailable protocols are preserved. rdar://33156429 Differential Revision: https://reviews.llvm.org/D35061 llvm-svn: 307368
* [Sema] Don't allow -Wunguarded-availability to be silenced with redeclsErik Pilkington2017-07-053-14/+59
| | | | | | Differential revision: https://reviews.llvm.org/D33816 llvm-svn: 307175
* Add a fixit for -Wobjc-protocol-property-synthesisAlex Lorenz2017-07-033-4/+4
| | | | | | | | rdar://32132756 Differential Revision: https://reviews.llvm.org/D34886 llvm-svn: 307014
* [Sema] Add -Wunguarded-availability-newAlex Lorenz2017-06-221-0/+160
| | | | | | | | | | | | | | | The new compiler warning -Wunguarded-availability-new is a subset of -Wunguarded-availability. It is on by default. It only warns about uses of APIs that have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and tvOS >= 11. We decided to use this kind of solution as we didn't want to turn on -Wunguarded-availability by default, because we didn't want our users to get warnings about uses of old APIs in their existing projects. rdar://31054725 Differential Revision: https://reviews.llvm.org/D34264 llvm-svn: 306033
* [Sema][ObjC] Don't emit availability diags for category @implementationsErik Pilkington2017-05-313-7/+14
| | | | | | | | | These diagnostics can't be disabled, and can't actually catch any bugs. rdar://32427296 Differential revision: https://reviews.llvm.org/D33661 llvm-svn: 304306
* Warn about uses of `@available` that can't suppress theAlex Lorenz2017-05-241-1/+11
| | | | | | | | | | -Wunguarded-availability warnings rdar://32306520 Differential Revision: https://reviews.llvm.org/D33450 llvm-svn: 303761
* Change __has_feature(objc_diagnose_if_attr) to ↵Argyrios Kyrtzidis2017-05-241-1/+1
| | | | | | __has_feature(attribute_diagnose_if_objc) for consistency with rest of attribute checks. llvm-svn: 303713
* Enhance the 'diagnose_if' attribute so that we can apply it for ObjC methods ↵Argyrios Kyrtzidis2017-05-241-0/+16
| | | | | | | | and properties as well This is an initial commit to allow using it with constant expressions, a follow-up commit will enable full support for it in ObjC methods. llvm-svn: 303712
* [Sema][ObjC] Fix a bug where -Wunguarded-availability was emitted at the ↵Erik Pilkington2017-05-221-0/+20
| | | | | | | | wrong location Differential revision: https://reviews.llvm.org/D33250 llvm-svn: 303562
* [Sema] Avoid duplicate -Wunguarded-availability warnings in nested functionsAlex Lorenz2017-05-161-1/+16
| | | | | | rdar://31862310 llvm-svn: 303170
* Fix errored return value in CheckFunctionReturnType and add a fixit hintErich Keane2017-05-101-0/+6
| | | | | | | | | | | As discovered by ChenWJ and listed on cfe-dev, the error for Objective C return type ended up being wrong. This fixes that. Additionally, as a "while we're there", the other usages of this error and the usage of the FP above both use a FixItHint, so I'll add it here. Differential Revision: https://reviews.llvm.org/D32759 llvm-svn: 302720
* Add support for pretty platform names to `@available`/Alex Lorenz2017-05-091-2/+2
| | | | | | | | | | | | | `__builtin_available` This commit allows us to use the macOS/iOS/tvOS/watchOS platform names in `@available`/`__builtin_available`. rdar://32067795 Differential Revision: https://reviews.llvm.org/D33000 llvm-svn: 302540
* [ObjC] Don't disallow vector parameters/return values in methodsAlex Lorenz2017-05-051-9/+2
| | | | | | | | | | | whose introduced version is lower than the allowed version. We should just rely on the target version as this introduced version can lead to false positives (e.g. deprecated declarations). rdar://31964333 llvm-svn: 302250
* [ObjC] Disallow vector parameters and return values in Objective-C methodsAlex Lorenz2017-04-271-0/+132
| | | | | | | | | | | | | | | | | for iOS < 9 and OS X < 10.11 X86 targets This commit adds a new error that disallows methods that have parameters/return values with a vector type for some older X86 targets. This diagnostic is needed because objc_msgSend doesn't support SIMD vector registers/return values on X86 in iOS < 9 and OS X < 10.11. Note that we don't necessarily know if the vector argument/return value will use a SIMD register, so instead we chose to be conservative and prohibit all vector types. rdar://21662309 Differential Revision: https://reviews.llvm.org/D28670 llvm-svn: 301532
* -Wunguarded-availability should support if (@available) checks in top-levelAlex Lorenz2017-04-261-3/+15
| | | | | | | | | | | | | blocks and lambdas Prior to this commit Clang emitted the old "partial availability" warning for expressions that referred to declarations that were not yet introduced in blocks and lambdas that were not in a function/method. This commit ensures that top-level blocks and lambdas use the new unguarded availability checks. rdar://31835952 llvm-svn: 301409
* [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.Akira Hatanaka2017-04-191-0/+24
| | | | | | | | rdar://problem/31635406 Differential Revision: https://reviews.llvm.org/D32187 llvm-svn: 300722
* [Sema][ObjC] Avoid the "type of property does not match type of accessor"Alex Lorenz2017-03-301-0/+5
| | | | | | | | warning for methods that resemble the setters of readonly properties rdar://30415679 llvm-svn: 299078
* [Objective-C] Fix "weak-unavailable" warning with -fobjc-weakBrian Kelley2017-03-291-0/+1
| | | | | | | | | | | | | | Summary: clang should produce the same errors Objective-C classes that cannot be assigned to weak pointers under both -fobjc-arc and -fobjc-weak. Check for ObjCWeak along with ObjCAutoRefCount when analyzing pointer conversions. Add an -fobjc-weak pass to the existing arc-unavailable-for-weakref test cases to verify the behavior is the same. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31006 llvm-svn: 299014
* [Objective-C] Fix "repeated use of weak" warning with -fobjc-weakBrian Kelley2017-03-291-3/+7
| | | | | | | | | | | | | | Summary: -Warc-repeated-use-of-weak should produce the same warnings with -fobjc-weak as it does with -objc-arc. Also check for ObjCWeak along with ObjCAutoRefCount when recording the use of an evaluated weak variable. Add a -fobjc-weak run to the existing arc-repeated-weak test case and adapt it slightly to work in both modes. Reviewers: rsmith, doug.gregor, jordan_rose, rjmccall Reviewed By: rjmccall Subscribers: arphaman, rjmccall, cfe-commits Differential Revision: https://reviews.llvm.org/D31005 llvm-svn: 299011
* Correct class-template deprecation behavior-REDUXErich Keane2017-03-233-6/+6
| | | | | | | | | | | | | | | | | | Correct class-template deprecation behavior Based on the comment in the test, and my reading of the standard, a deprecated warning should be issued in the following case: template<typename T> [[deprecated]] class Foo{}; Foo<int> f; This was not the case, because the ClassTemplateSpecializationDecl creation did not also copy the deprecated attribute. Note: I did NOT audit the complete set of attributes to see WHICH ones should be copied, so instead I simply copy ONLY the deprecated attribute. Previous DiffRev: https://reviews.llvm.org/D27486, was reverted. This patch fixes the issues brought up here by the reverter: https://reviews.llvm.org/rL298410 Differential Revision: https://reviews.llvm.org/D31245 llvm-svn: 298634
* Support attributes for Objective-C categoriesAlex Lorenz2017-03-234-3/+39
| | | | | | | | rdar://31095315 Differential Revision: https://reviews.llvm.org/D31179 llvm-svn: 298589
* [ObjC][ARC] Avoid -Warc-performSelector-leaks for performSelector variationsAlex Lorenz2017-03-231-0/+8
| | | | | | | | | | | | | | | | that became supported after r297019 The commit r297019 expanded the performSelector ObjC method family heuristic to ensure that -Wobjc-unsafe-perform-selector covers all performSelector variations. However, this made the -Warc-performSelector-leaks too noisy, as that warning produces mostly false positives since the selector is unknown. This commit reverts the ObjC method family heuristics introduced in r297019. This ensures that -Warc-performSelector-leaks isn't too noisy. The commit still preserves the coverage of -Wobjc-unsafe-perform-selector. rdar://31124629 llvm-svn: 298587
OpenPOWER on IntegriCloud