1*f4a2713aSLionel Sambuc// RUN: c-index-test -test-load-source all %s -Wno-objc-root-class > %t 2>&1 2*f4a2713aSLionel Sambuc// RUN: FileCheck -input-file=%t %s 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@class NSString; 5*f4a2713aSLionel Sambucvoid _rdar_12584554_A (volatile const void * object, volatile const void * selector, const char * functionName, const char * fileName, unsigned int lineNumber, NSString * msgFormat, ...); 6*f4a2713aSLionel Sambuc#define _rdar_12584554_B(self,_format_and_args_...) \ 7*f4a2713aSLionel Sambuc do{ _rdar_12584554_A(&self,&_cmd,__PRETTY_FUNCTION__,__FILE__,__LINE__, _format_and_args_); }while(0) 8*f4a2713aSLionel Sambuc#define _rdar_12584554_C(_format_and_args_...) \ 9*f4a2713aSLionel Sambuc _rdar_12584554_B(self, _format_and_args_) 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@interface RDar12584554 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc// This test case tests that the "@" is properly inserted before the '"', even in the 15*f4a2713aSLionel Sambuc// presence of a nested macro chain. 16*f4a2713aSLionel Sambuc@implementation RDar12584554 17*f4a2713aSLionel Sambuc- (void) test:(int)result { 18*f4a2713aSLionel Sambuc _rdar_12584554_C("ted"); 19*f4a2713aSLionel Sambuc} 20*f4a2713aSLionel Sambuc@end 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc// CHECK: FIX-IT: Insert "@" at 18:22 23*f4a2713aSLionel Sambuc// CHECK: fix-its.m:9:28: note: expanded from macro '_rdar_12584554_C' 24*f4a2713aSLionel Sambuc// CHECK: Number FIX-ITs = 0 25*f4a2713aSLionel Sambuc// CHECK: fix-its.m:7:77: note: expanded from macro '_rdar_12584554_B' 26*f4a2713aSLionel Sambuc// CHECK: Number FIX-ITs = 0 27