Lines Matching refs:NS
60 const NSAPI &NS, Commit &commit) { in rewriteObjCRedundantCallWithLiteral() argument
62 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts())) in rewriteObjCRedundantCallWithLiteral()
71 NS.getNSClassId(NSAPI::ClassId_NSString) == II && in rewriteObjCRedundantCallWithLiteral()
72 (NS.getNSStringSelector(NSAPI::NSStr_stringWithString) == Sel || in rewriteObjCRedundantCallWithLiteral()
73 NS.getNSStringSelector(NSAPI::NSStr_initWithString) == Sel)) || in rewriteObjCRedundantCallWithLiteral()
76 NS.getNSClassId(NSAPI::ClassId_NSArray) == II && in rewriteObjCRedundantCallWithLiteral()
77 (NS.getNSArraySelector(NSAPI::NSArr_arrayWithArray) == Sel || in rewriteObjCRedundantCallWithLiteral()
78 NS.getNSArraySelector(NSAPI::NSArr_initWithArray) == Sel)) || in rewriteObjCRedundantCallWithLiteral()
81 NS.getNSClassId(NSAPI::ClassId_NSDictionary) == II && in rewriteObjCRedundantCallWithLiteral()
82 (NS.getNSDictionarySelector( in rewriteObjCRedundantCallWithLiteral()
84 NS.getNSDictionarySelector(NSAPI::NSDict_initWithDictionary) == Sel))) { in rewriteObjCRedundantCallWithLiteral()
205 const NSAPI &NS, in rewriteToArraySubscriptGet() argument
207 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(), in rewriteToArraySubscriptGet()
208 NS.getObjectAtIndexedSubscriptSelector())) in rewriteToArraySubscriptGet()
215 const NSAPI &NS, in rewriteToDictionarySubscriptGet() argument
217 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(), in rewriteToDictionarySubscriptGet()
218 NS.getObjectForKeyedSubscriptSelector())) in rewriteToDictionarySubscriptGet()
225 const NSAPI &NS, in rewriteToArraySubscriptSet() argument
227 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(), in rewriteToArraySubscriptSet()
228 NS.getSetObjectAtIndexedSubscriptSelector())) in rewriteToArraySubscriptSet()
259 const NSAPI &NS, in rewriteToDictionarySubscriptSet() argument
261 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(), in rewriteToDictionarySubscriptSet()
262 NS.getSetObjectForKeyedSubscriptSelector())) in rewriteToDictionarySubscriptSet()
291 const NSAPI &NS, Commit &commit) { in rewriteToObjCSubscriptSyntax() argument
300 NS.getASTContext().getObjContainingInterface(Method); in rewriteToObjCSubscriptSyntax()
305 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_objectAtIndex)) in rewriteToObjCSubscriptSyntax()
306 return rewriteToArraySubscriptGet(IFace, Msg, NS, commit); in rewriteToObjCSubscriptSyntax()
308 if (Sel == NS.getNSDictionarySelector(NSAPI::NSDict_objectForKey)) in rewriteToObjCSubscriptSyntax()
309 return rewriteToDictionarySubscriptGet(IFace, Msg, NS, commit); in rewriteToObjCSubscriptSyntax()
314 if (Sel == NS.getNSArraySelector(NSAPI::NSMutableArr_replaceObjectAtIndex)) in rewriteToObjCSubscriptSyntax()
315 return rewriteToArraySubscriptSet(IFace, Msg, NS, commit); in rewriteToObjCSubscriptSyntax()
317 if (Sel == NS.getNSDictionarySelector(NSAPI::NSMutableDict_setObjectForKey)) in rewriteToObjCSubscriptSyntax()
318 return rewriteToDictionarySubscriptSet(IFace, Msg, NS, commit); in rewriteToObjCSubscriptSyntax()
328 const NSAPI &NS, Commit &commit,
331 const NSAPI &NS, Commit &commit);
333 const NSAPI &NS, Commit &commit);
335 const NSAPI &NS, Commit &commit);
337 const NSAPI &NS, Commit &commit);
340 const NSAPI &NS, Commit &commit, in rewriteToObjCLiteralSyntax() argument
343 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts())) in rewriteToObjCLiteralSyntax()
346 if (II == NS.getNSClassId(NSAPI::ClassId_NSArray)) in rewriteToObjCLiteralSyntax()
347 return rewriteToArrayLiteral(Msg, NS, commit, PMap); in rewriteToObjCLiteralSyntax()
348 if (II == NS.getNSClassId(NSAPI::ClassId_NSDictionary)) in rewriteToObjCLiteralSyntax()
349 return rewriteToDictionaryLiteral(Msg, NS, commit); in rewriteToObjCLiteralSyntax()
350 if (II == NS.getNSClassId(NSAPI::ClassId_NSNumber)) in rewriteToObjCLiteralSyntax()
351 return rewriteToNumberLiteral(Msg, NS, commit); in rewriteToObjCLiteralSyntax()
352 if (II == NS.getNSClassId(NSAPI::ClassId_NSString)) in rewriteToObjCLiteralSyntax()
353 return rewriteToStringBoxedExpression(Msg, NS, commit); in rewriteToObjCLiteralSyntax()
369 const NSAPI &NS);
379 const NSAPI &NS, Commit &commit, in rewriteToArrayLiteral() argument
384 if (shouldNotRewriteImmediateMessageArgs(ParentMsg, NS)) in rewriteToArrayLiteral()
391 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_array)) { in rewriteToArrayLiteral()
398 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObject)) { in rewriteToArrayLiteral()
408 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObjects) || in rewriteToArrayLiteral()
409 Sel == NS.getNSArraySelector(NSAPI::NSArr_initWithObjects)) { in rewriteToArrayLiteral()
413 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr)) in rewriteToArrayLiteral()
440 static bool getNSArrayObjects(const Expr *E, const NSAPI &NS, in getNSArrayObjects() argument
451 if (!checkForLiteralCreation(Msg, Cls, NS.getASTContext().getLangOpts())) in getNSArrayObjects()
454 if (Cls != NS.getNSClassId(NSAPI::ClassId_NSArray)) in getNSArrayObjects()
458 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_array)) in getNSArrayObjects()
461 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObject)) { in getNSArrayObjects()
468 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObjects) || in getNSArrayObjects()
469 Sel == NS.getNSArraySelector(NSAPI::NSArr_initWithObjects)) { in getNSArrayObjects()
473 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr)) in getNSArrayObjects()
491 const NSAPI &NS, Commit &commit) { in rewriteToDictionaryLiteral() argument
495 if (Sel == NS.getNSDictionarySelector(NSAPI::NSDict_dictionary)) { in rewriteToDictionaryLiteral()
502 if (Sel == NS.getNSDictionarySelector( in rewriteToDictionaryLiteral()
523 if (Sel == NS.getNSDictionarySelector( in rewriteToDictionaryLiteral()
525 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsAndKeys)) { in rewriteToDictionaryLiteral()
530 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr)) in rewriteToDictionaryLiteral()
560 if (Sel == NS.getNSDictionarySelector( in rewriteToDictionaryLiteral()
562 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsForKeys)) { in rewriteToDictionaryLiteral()
567 if (!getNSArrayObjects(Msg->getArg(0), NS, Vals)) in rewriteToDictionaryLiteral()
571 if (!getNSArrayObjects(Msg->getArg(1), NS, Keys)) in rewriteToDictionaryLiteral()
604 const NSAPI &NS) { in shouldNotRewriteImmediateMessageArgs() argument
609 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts())) in shouldNotRewriteImmediateMessageArgs()
612 if (II != NS.getNSClassId(NSAPI::ClassId_NSDictionary)) in shouldNotRewriteImmediateMessageArgs()
616 if (Sel == NS.getNSDictionarySelector( in shouldNotRewriteImmediateMessageArgs()
618 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsForKeys)) { in shouldNotRewriteImmediateMessageArgs()
623 if (!getNSArrayObjects(Msg->getArg(0), NS, Vals)) in shouldNotRewriteImmediateMessageArgs()
627 if (!getNSArrayObjects(Msg->getArg(1), NS, Keys)) in shouldNotRewriteImmediateMessageArgs()
645 const NSAPI &NS, Commit &commit) { in rewriteToCharLiteral() argument
648 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithChar, in rewriteToCharLiteral()
656 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToCharLiteral()
661 const NSAPI &NS, Commit &commit) { in rewriteToBoolLiteral() argument
662 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithBool, in rewriteToBoolLiteral()
670 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToBoolLiteral()
750 const NSAPI &NS, Commit &commit) { in rewriteToNumberLiteral() argument
756 return rewriteToCharLiteral(Msg, CharE, NS, commit); in rewriteToNumberLiteral()
758 return rewriteToBoolLiteral(Msg, BE, NS, commit); in rewriteToNumberLiteral()
760 return rewriteToBoolLiteral(Msg, BE, NS, commit); in rewriteToNumberLiteral()
771 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
773 ASTContext &Ctx = NS.getASTContext(); in rewriteToNumberLiteral()
776 NS.getNSNumberLiteralMethodKind(Sel); in rewriteToNumberLiteral()
791 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
837 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
844 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
855 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
859 return rewriteToNumericBoxedExpression(Msg, NS, commit); in rewriteToNumberLiteral()
973 const NSAPI &NS, Commit &commit) { in rewriteToNumericBoxedExpression() argument
981 ASTContext &Ctx = NS.getASTContext(); in rewriteToNumericBoxedExpression()
984 NS.getNSNumberLiteralMethodKind(Sel); in rewriteToNumericBoxedExpression()
1128 const NSAPI &NS, Commit &commit) { in doRewriteToUTF8StringBoxedExpressionHelper() argument
1133 ASTContext &Ctx = NS.getASTContext(); in doRewriteToUTF8StringBoxedExpressionHelper()
1166 const NSAPI &NS, Commit &commit) { in rewriteToStringBoxedExpression() argument
1169 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithUTF8String) || in rewriteToStringBoxedExpression()
1170 Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCString) || in rewriteToStringBoxedExpression()
1171 Sel == NS.getNSStringSelector(NSAPI::NSStr_initWithUTF8String)) { in rewriteToStringBoxedExpression()
1174 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit); in rewriteToStringBoxedExpression()
1177 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCStringEncoding)) { in rewriteToStringBoxedExpression()
1182 if (NS.isNSUTF8StringEncodingConstant(encodingArg) || in rewriteToStringBoxedExpression()
1183 NS.isNSASCIIStringEncodingConstant(encodingArg)) in rewriteToStringBoxedExpression()
1184 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit); in rewriteToStringBoxedExpression()