[PATCH] D22926: Static Analyzer - Localizability Checker: New Localizable APIs for macOS Sierra
Kulpreet Chilana via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 28 14:33:45 PDT 2016
kulpreet updated this revision to Diff 66006.
kulpreet added a comment.
Sorry, uploaded the wrong patch. This one should compile with the unique variable names.
https://reviews.llvm.org/D22926
Files:
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
Index: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
+++ lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
@@ -189,6 +189,22 @@
NEW_RECEIVER(NSButton)
ADD_UNARY_METHOD(NSButton, setTitle, 0)
ADD_UNARY_METHOD(NSButton, setAlternateTitle, 0)
+ IdentifierInfo *radioButtonWithTitleNSButton[] = {
+ &Ctx.Idents.get("radioButtonWithTitle"), &Ctx.Idents.get("target"),
+ &Ctx.Idents.get("action")};
+ ADD_METHOD(NSButton, radioButtonWithTitleNSButton, 3, 0)
+ IdentifierInfo *buttonWithTitleNSButtonImage[] = {
+ &Ctx.Idents.get("buttonWithTitle"), &Ctx.Idents.get("image"),
+ &Ctx.Idents.get("target"), &Ctx.Idents.get("action")};
+ ADD_METHOD(NSButton, buttonWithTitleNSButtonImage, 4, 0)
+ IdentifierInfo *checkboxWithTitleNSButton[] = {
+ &Ctx.Idents.get("checkboxWithTitle"), &Ctx.Idents.get("target"),
+ &Ctx.Idents.get("action")};
+ ADD_METHOD(NSButton, checkboxWithTitleNSButton, 3, 0)
+ IdentifierInfo *buttonWithTitleNSButtonTarget[] = {
+ &Ctx.Idents.get("buttonWithTitle"), &Ctx.Idents.get("target"),
+ &Ctx.Idents.get("action")};
+ ADD_METHOD(NSButton, buttonWithTitleNSButtonTarget, 3, 0)
NEW_RECEIVER(NSSavePanel)
ADD_UNARY_METHOD(NSSavePanel, setPrompt, 0)
@@ -271,6 +287,9 @@
ADD_UNARY_METHOD(NSButtonCell, setTitle, 0)
ADD_UNARY_METHOD(NSButtonCell, setAlternateTitle, 0)
+ NEW_RECEIVER(NSDatePickerCell)
+ ADD_UNARY_METHOD(NSDatePickerCell, initTextCell, 0)
+
NEW_RECEIVER(NSSliderCell)
ADD_UNARY_METHOD(NSSliderCell, setTitle, 0)
@@ -336,9 +355,6 @@
ADD_UNARY_METHOD(UIActionSheet, addButtonWithTitle, 0)
ADD_UNARY_METHOD(UIActionSheet, setTitle, 0)
- NEW_RECEIVER(NSURLSessionTask)
- ADD_UNARY_METHOD(NSURLSessionTask, setTaskDescription, 0)
-
NEW_RECEIVER(UIAccessibilityCustomAction)
IdentifierInfo *initWithNameUIAccessibilityCustomAction[] = {
&Ctx.Idents.get("initWithName"), &Ctx.Idents.get("target"),
@@ -363,6 +379,9 @@
NEW_RECEIVER(NSTextField)
ADD_UNARY_METHOD(NSTextField, setPlaceholderString, 0)
+ ADD_UNARY_METHOD(NSTextField, textFieldWithString, 0)
+ ADD_UNARY_METHOD(NSTextField, wrappingLabelWithString, 0)
+ ADD_UNARY_METHOD(NSTextField, labelWithString, 0)
NEW_RECEIVER(NSAttributedString)
ADD_UNARY_METHOD(NSAttributedString, initWithString, 0)
@@ -523,9 +542,6 @@
ADD_METHOD(NSUserNotificationAction,
actionWithIdentifierNSUserNotificationAction, 2, 1)
- NEW_RECEIVER(NSURLSession)
- ADD_UNARY_METHOD(NSURLSession, setSessionDescription, 0)
-
NEW_RECEIVER(UITextField)
ADD_UNARY_METHOD(UITextField, setText, 0)
ADD_UNARY_METHOD(UITextField, setPlaceholder, 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22926.66006.patch
Type: text/x-patch
Size: 2784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160728/59b8560a/attachment-0001.bin>
More information about the cfe-commits
mailing list