Index: components/autofill/ios/browser/credit_card_util.mm |
diff --git a/components/autofill/ios/browser/credit_card_util.mm b/components/autofill/ios/browser/credit_card_util.mm |
index e62b9e82cd8b82acc3615b658fceacd975165fc9..3eaaf6da2aed6c78bc1884610454b9d70a009e0e 100644 |
--- a/components/autofill/ios/browser/credit_card_util.mm |
+++ b/components/autofill/ios/browser/credit_card_util.mm |
@@ -8,6 +8,10 @@ |
#include "components/autofill/core/browser/autofill_type.h" |
#include "components/autofill/core/browser/credit_card.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
namespace autofill { |
NSString* GetCreditCardName(const CreditCard& credit_card, |
@@ -21,8 +25,7 @@ NSString* GetCreditCardObfuscatedNumber(const CreditCard& credit_card) { |
} |
NSDateComponents* GetCreditCardExpirationDate(const CreditCard& credit_card) { |
- NSDateComponents* expiration_date = |
- [[[NSDateComponents alloc] init] autorelease]; |
+ NSDateComponents* expiration_date = [[NSDateComponents alloc] init]; |
expiration_date.year = credit_card.expiration_year(); |
expiration_date.month = credit_card.expiration_month(); |
return expiration_date; |