1// REQUIRES: system-darwin 2// RUN: rm -f %t.log 3// RUN: env RC_DEBUG_OPTIONS=1 \ 4// RUN: CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \ 5// RUN: %clang -target x86_64-apple-darwin -fsyntax-only %s 6// RUN: FileCheck %s < %t.log 7 8#include <stdarg.h> 9int printf(const char *restrict, ...); 10int scanf(const char * restrict, ...); 11@class NSString, Protocol; 12extern void NSLog(NSString *format, ...); 13 14void testInvalidNoPrintable(int *a) { 15 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 16 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 17 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 18 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 19 // CHECK: <string>invalid conversion specifier '\xe2'</string> 20 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 21 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 22 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 23 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 24 // CHECK: <string>invalid conversion specifier '\xe2'</string> 25 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 26 // CHECK: <string>invalid conversion specifier '\u25b9'</string> 27 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 28 // CHECK: <string>invalid conversion specifier '\U00010348'</string> 29 // CHECK: <string>invalid conversion specifier '\xe2'</string> 30 printf("%\u25B9"); 31 printf("%\xE2\x96\xB9"); 32 printf("%\U00010348"); 33 printf("%\xF0\x90\x8D\x88"); 34 printf("%\xe2"); 35 NSLog(@"%\u25B9"); 36 NSLog(@"%\xE2\x96\xB9"); 37 NSLog(@"%\U00010348"); 38 NSLog(@"%\xF0\x90\x8D\x88"); 39 NSLog(@"%\xe2"); 40 scanf("%\u25B9", a); 41 scanf("%\xE2\x96\xB9", a); 42 scanf("%\U00010348", a); 43 scanf("%\xF0\x90\x8D\x88", a); 44 scanf("%\xe2", a); 45} 46