Home | History | Annotate | Download | only in Edit

Lines Matching refs:NS

59                                               const NSAPI &NS, Commit &commit) {
61 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts()))
70 NS.getNSClassId(NSAPI::ClassId_NSString) == II &&
71 (NS.getNSStringSelector(NSAPI::NSStr_stringWithString) == Sel ||
72 NS.getNSStringSelector(NSAPI::NSStr_initWithString) == Sel)) ||
75 NS.getNSClassId(NSAPI::ClassId_NSArray) == II &&
76 (NS.getNSArraySelector(NSAPI::NSArr_arrayWithArray) == Sel ||
77 NS.getNSArraySelector(NSAPI::NSArr_initWithArray) == Sel)) ||
80 NS.getNSClassId(NSAPI::ClassId_NSDictionary) == II &&
81 (NS.getNSDictionarySelector(
83 NS.getNSDictionarySelector(NSAPI::NSDict_initWithDictionary) == Sel))) {
204 const NSAPI &NS,
206 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(),
207 NS.getObjectAtIndexedSubscriptSelector()))
214 const NSAPI &NS,
216 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(),
217 NS.getObjectForKeyedSubscriptSelector()))
224 const NSAPI &NS,
226 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(),
227 NS.getSetObjectAtIndexedSubscriptSelector()))
258 const NSAPI &NS,
260 if (!canRewriteToSubscriptSyntax(IFace, Msg, NS.getASTContext(),
261 NS.getSetObjectForKeyedSubscriptSelector()))
290 const NSAPI &NS, Commit &commit) {
299 NS.getASTContext().getObjContainingInterface(Method);
304 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_objectAtIndex))
305 return rewriteToArraySubscriptGet(IFace, Msg, NS, commit);
307 if (Sel == NS.getNSDictionarySelector(NSAPI::NSDict_objectForKey))
308 return rewriteToDictionarySubscriptGet(IFace, Msg, NS, commit);
313 if (Sel == NS.getNSArraySelector(NSAPI::NSMutableArr_replaceObjectAtIndex))
314 return rewriteToArraySubscriptSet(IFace, Msg, NS, commit);
316 if (Sel == NS.getNSDictionarySelector(NSAPI::NSMutableDict_setObjectForKey))
317 return rewriteToDictionarySubscriptSet(IFace, Msg, NS, commit);
327 const NSAPI &NS, Commit &commit,
330 const NSAPI &NS, Commit &commit);
332 const NSAPI &NS, Commit &commit);
334 const NSAPI &NS, Commit &commit);
336 const NSAPI &NS, Commit &commit);
339 const NSAPI &NS, Commit &commit,
342 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts()))
345 if (II == NS.getNSClassId(NSAPI::ClassId_NSArray))
346 return rewriteToArrayLiteral(Msg, NS, commit, PMap);
347 if (II == NS.getNSClassId(NSAPI::ClassId_NSDictionary))
348 return rewriteToDictionaryLiteral(Msg, NS, commit);
349 if (II == NS.getNSClassId(NSAPI::ClassId_NSNumber))
350 return rewriteToNumberLiteral(Msg, NS, commit);
351 if (II == NS.getNSClassId(NSAPI::ClassId_NSString))
352 return rewriteToStringBoxedExpression(Msg, NS, commit);
368 const NSAPI &NS);
378 const NSAPI &NS, Commit &commit,
383 if (shouldNotRewriteImmediateMessageArgs(ParentMsg, NS))
390 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_array)) {
397 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObject)) {
407 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObjects) ||
408 Sel == NS.getNSArraySelector(NSAPI::NSArr_initWithObjects)) {
412 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr))
439 static bool getNSArrayObjects(const Expr *E, const NSAPI &NS,
450 if (!checkForLiteralCreation(Msg, Cls, NS.getASTContext().getLangOpts()))
453 if (Cls != NS.getNSClassId(NSAPI::ClassId_NSArray))
457 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_array))
460 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObject)) {
467 if (Sel == NS.getNSArraySelector(NSAPI::NSArr_arrayWithObjects) ||
468 Sel == NS.getNSArraySelector(NSAPI::NSArr_initWithObjects)) {
472 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr))
490 const NSAPI &NS, Commit &commit) {
494 if (Sel == NS.getNSDictionarySelector(NSAPI::NSDict_dictionary)) {
501 if (Sel == NS.getNSDictionarySelector(
522 if (Sel == NS.getNSDictionarySelector(
524 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsAndKeys)) {
529 if (!NS.getASTContext().isSentinelNullExpr(SentinelExpr))
559 if (Sel == NS.getNSDictionarySelector(
561 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsForKeys)) {
566 if (!getNSArrayObjects(Msg->getArg(0), NS, Vals))
570 if (!getNSArrayObjects(Msg->getArg(1), NS, Keys))
603 const NSAPI &NS) {
608 if (!checkForLiteralCreation(Msg, II, NS.getASTContext().getLangOpts()))
611 if (II != NS.getNSClassId(NSAPI::ClassId_NSDictionary))
615 if (Sel == NS.getNSDictionarySelector(
617 Sel == NS.getNSDictionarySelector(NSAPI::NSDict_initWithObjectsForKeys)) {
622 if (!getNSArrayObjects(Msg->getArg(0), NS, Vals))
626 if (!getNSArrayObjects(Msg->getArg(1), NS, Keys))
644 const NSAPI &NS, Commit &commit) {
647 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithChar,
655 return rewriteToNumericBoxedExpression(Msg, NS, commit);
660 const NSAPI &NS, Commit &commit) {
661 if (NS.isNSNumberLiteralSelector(NSAPI::NSNumberWithBool,
669 return rewriteToNumericBoxedExpression(Msg, NS, commit);
753 const NSAPI &NS, Commit &commit) {
759 return rewriteToCharLiteral(Msg, CharE, NS, commit);
761 return rewriteToBoolLiteral(Msg, BE, NS, commit);
763 return rewriteToBoolLiteral(Msg, BE, NS, commit);
774 return rewriteToNumericBoxedExpression(Msg, NS, commit);
776 ASTContext &Ctx = NS.getASTContext();
779 MKOpt = NS.getNSNumberLiteralMethodKind(Sel);
794 return rewriteToNumericBoxedExpression(Msg, NS, commit);
840 return rewriteToNumericBoxedExpression(Msg, NS, commit);
847 return rewriteToNumericBoxedExpression(Msg, NS, commit);
858 return rewriteToNumericBoxedExpression(Msg, NS, commit);
862 return rewriteToNumericBoxedExpression(Msg, NS, commit);
976 const NSAPI &NS, Commit &commit) {
984 ASTContext &Ctx = NS.getASTContext();
987 MKOpt = NS.getNSNumberLiteralMethodKind(Sel);
1126 const NSAPI &NS, Commit &commit) {
1131 ASTContext &Ctx = NS.getASTContext();
1164 const NSAPI &NS, Commit &commit) {
1167 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithUTF8String) ||
1168 Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCString) ||
1169 Sel == NS.getNSStringSelector(NSAPI::NSStr_initWithUTF8String)) {
1172 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit);
1175 if (Sel == NS.getNSStringSelector(NSAPI::NSStr_stringWithCStringEncoding)) {
1180 if (NS.isNSUTF8StringEncodingConstant(encodingArg) ||
1181 NS.isNSASCIIStringEncodingConstant(encodingArg))
1182 return doRewriteToUTF8StringBoxedExpressionHelper(Msg, NS, commit);