Lines Matching defs:NS

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