diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Index/fix-its.m | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Index/fix-its.m')
-rw-r--r-- | test/Index/fix-its.m | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Index/fix-its.m b/test/Index/fix-its.m new file mode 100644 index 0000000..b307cf4 --- /dev/null +++ b/test/Index/fix-its.m @@ -0,0 +1,28 @@ +// RUN: c-index-test -test-load-source all %s -Wno-objc-root-class > %t 2>&1 +// RUN: FileCheck -input-file=%t %s + +@class NSString; +void _rdar_12584554_A (volatile const void * object, volatile const void * selector, const char * functionName, const char * fileName, unsigned int lineNumber, NSString * msgFormat, ...); +#define _rdar_12584554_B(self,_format_and_args_...) \ + do{ _rdar_12584554_A(&self,&_cmd,__PRETTY_FUNCTION__,__FILE__,__LINE__, _format_and_args_); }while(0) +#define _rdar_12584554_C(_format_and_args_...) \ + _rdar_12584554_B(self, _format_and_args_) + +@interface RDar12584554 +@end + +// This test case tests that the "@" is properly inserted before the '"', even in the +// presence of a nested macro chain. +@implementation RDar12584554 +- (void) test:(int)result { + _rdar_12584554_C("ted"); +} +@end + +// CHECK: FIX-IT: Insert "@" at 18:22 +// CHECK: fix-its.m:9:28: note: expanded from macro '_rdar_12584554_C' +// CHECK: Number FIX-ITs = 0 +// CHECK: fix-its.m:7:77: note: expanded from macro '_rdar_12584554_B' +// CHECK: Number FIX-ITs = 0 +// CHECK: fix-its.m:5:172: note: passing argument to parameter 'msgFormat' here +// CHECK: Number FIX-ITs = 0 |