Home | History | Annotate | Download | only in Edit

Lines Matching refs: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))
605 const NSAPI &NS) {
610 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts()))
613 if (II != NS.getNSClassId(NSAPI::ClassId_NSDictionary))
617 if (Sel == NS.getNSDictionarySelector(
619 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsForKeys)) {
624 if (!getNSArrayObjects(Msg->getArg(0), NS, Vals))
628 if (!getNSArrayObjects(Msg->getArg(1), NS, Keys))
646 const NSAPI &NS, Commit &commit) {
649 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithChar,
657 return rewriteToNumericBoxedExpression(Msg, NS, commit);
662 const NSAPI &NS, Commit &commit) {
663 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithBool,
671 return rewriteToNumericBoxedExpression(Msg, NS, commit);
755 const NSAPI &NS, Commit &commit) {
761 return rewriteToCharLiteral(Msg, CharE, NS, commit);
763 return rewriteToBoolLiteral(Msg, BE, NS, commit);
765 return rewriteToBoolLiteral(Msg, BE, NS, commit);
776 return rewriteToNumericBoxedExpression(Msg, NS, commit);
778 ASTContext &Ctx = NS.getASTContext();
781 MKOpt = NS.getNSNumberLiteralMethodKind(Sel);
796 return rewriteToNumericBoxedExpression(Msg, NS, commit);
838 return rewriteToNumericBoxedExpression(Msg, NS, commit);
845 return rewriteToNumericBoxedExpression(Msg, NS, commit);
856 return rewriteToNumericBoxedExpression(Msg, NS, commit);
860 return rewriteToNumericBoxedExpression(Msg, NS, commit);
974 const NSAPI &NS, Commit &commit) {
982 ASTContext &Ctx = NS.getASTContext();
985 MKOpt = NS.getNSNumberLiteralMethodKind(Sel);
1109 const NSAPI &NS, Commit &commit) {
1114 ASTContext &Ctx = NS.getASTContext();
1147 const NSAPI &NS, Commit &commit) {
1150 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithUTF8String) ||
1151 Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCString)) {
1154 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit);
1157 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCStringEncoding)) {
1162 if (NS.isNSUTF8StringEncodingConstant(encodingArg) ||
1163 NS.isNSASCIIStringEncodingConstant(encodingArg))
1164 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit);