1 // REQUIRES: system-darwin
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
9 int printf(const char *restrict, ...);
10 int scanf(const char * restrict, ...);
11 @class NSString, Protocol;
12 extern void NSLog(NSString *format, ...);
14 void 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>
31 printf("%\xE2\x96\xB9");
32 printf("%\U00010348");
33 printf("%\xF0\x90\x8D\x88");
36 NSLog(@"%\xE2\x96\xB9");
37 NSLog(@"%\U00010348");
38 NSLog(@"%\xF0\x90\x8D\x88");
41 scanf("%\xE2\x96\xB9", a);
42 scanf("%\U00010348", a);
43 scanf("%\xF0\x90\x8D\x88", a);