[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / libbuiltins-ctype-x86_64.c
blobed6e31e73434309fdf27af1152c276b41e3a255c
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm < %s | FileCheck %s
3 int isalnum(int);
4 int isalpha(int);
5 int isblank(int);
6 int iscntrl(int);
7 int isdigit(int);
8 int isgraph(int);
9 int islower(int);
10 int isprint(int);
11 int ispunct(int);
12 int isspace(int);
13 int isupper(int);
14 int isxdigit(int);
15 int tolower(int);
16 int toupper(int);
18 void test(int x) {
19 // CHECK: call i32 @isalnum(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
20 (void)isalnum(x);
21 // CHECK: call i32 @isalpha(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
22 (void)isalpha(x);
23 // CHECK: call i32 @isblank(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
24 (void)isblank(x);
25 // CHECK: call i32 @iscntrl(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
26 (void)iscntrl(x);
27 // CHECK: call i32 @isdigit(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
28 (void)isdigit(x);
29 // CHECK: call i32 @isgraph(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
30 (void)isgraph(x);
31 // CHECK: call i32 @islower(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
32 (void)islower(x);
33 // CHECK: call i32 @isprint(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
34 (void)isprint(x);
35 // CHECK: call i32 @ispunct(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
36 (void)ispunct(x);
37 // CHECK: call i32 @isspace(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
38 (void)isspace(x);
39 // CHECK: call i32 @isupper(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
40 (void)isupper(x);
41 // CHECK: call i32 @isxdigit(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
42 (void)isxdigit(x);
43 // CHECK: call i32 @tolower(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
44 (void)tolower(x);
45 // CHECK: call i32 @toupper(i32 noundef {{%[0-9]+}}) [[NUW_RO_CALL:#[0-9]+]]
46 (void)toupper(x);
49 // CHECK: declare i32 @isalnum(i32 noundef) [[NUW_RO:#[0-9]+]]
50 // CHECK: declare i32 @isalpha(i32 noundef) [[NUW_RO:#[0-9]+]]
51 // CHECK: declare i32 @isblank(i32 noundef) [[NUW_RO:#[0-9]+]]
52 // CHECK: declare i32 @iscntrl(i32 noundef) [[NUW_RO:#[0-9]+]]
53 // CHECK: declare i32 @isdigit(i32 noundef) [[NUW_RO:#[0-9]+]]
54 // CHECK: declare i32 @isgraph(i32 noundef) [[NUW_RO:#[0-9]+]]
55 // CHECK: declare i32 @islower(i32 noundef) [[NUW_RO:#[0-9]+]]
56 // CHECK: declare i32 @isprint(i32 noundef) [[NUW_RO:#[0-9]+]]
57 // CHECK: declare i32 @ispunct(i32 noundef) [[NUW_RO:#[0-9]+]]
58 // CHECK: declare i32 @isspace(i32 noundef) [[NUW_RO:#[0-9]+]]
59 // CHECK: declare i32 @isupper(i32 noundef) [[NUW_RO:#[0-9]+]]
60 // CHECK: declare i32 @isxdigit(i32 noundef) [[NUW_RO:#[0-9]+]]
61 // CHECK: declare i32 @tolower(i32 noundef) [[NUW_RO:#[0-9]+]]
62 // CHECK: declare i32 @toupper(i32 noundef) [[NUW_RO:#[0-9]+]]
64 // CHECK: attributes [[NUW_RO]] = { nounwind readonly{{.*}} }
65 // CHECK: attributes [[NUW_RO_CALL]] = { nounwind readonly willreturn }