diff options
Diffstat (limited to 'test/FixIt/format-darwin.m')
-rw-r--r-- | test/FixIt/format-darwin.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/FixIt/format-darwin.m b/test/FixIt/format-darwin.m index cfaac29e90..f520564348 100644 --- a/test/FixIt/format-darwin.m +++ b/test/FixIt/format-darwin.m @@ -23,6 +23,8 @@ typedef long SInt32; typedef unsigned long UInt32; #endif +typedef SInt32 OSStatus; + NSInteger getNSInteger(); NSUInteger getNSUInteger(); SInt32 getSInt32(); @@ -210,3 +212,9 @@ void testCapitals() { // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:13-[[@LINE-3]]:14}:"d" // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:14}:"%D" } + +void testLayeredTypedefs(OSStatus i) { + printf("%s", i); // expected-warning {{values of type 'OSStatus' should not be used as format arguments}} + // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%d" +} + |