1 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-C %s
2 // RUN: %clang_cc1 -x c++ -std=c++11 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-CPP0X %s
7 // CHECK-C: store i8 97
8 // CHECK-CPP0X: store i8 97
11 // Should truncate value (equal to last character).
12 // CHECK-C: store i8 98
13 // CHECK-CPP0X: store i8 98
16 // Should get concatenated characters
17 // CHECK-C: store i32 24930
18 // CHECK-CPP0X: store i32 24930
21 // Should get concatenated characters
22 // CHECK-C: store i32 808464432
23 // CHECK-CPP0X: store i32 808464432
26 // Should get truncated value (last four characters concatenated)
27 // CHECK-C: store i32 1919512167
28 // CHECK-CPP0X: store i32 1919512167
29 int b3
= 'somesillylongstring';
31 // CHECK-C: store i32 97
32 // CHECK-CPP0X: store i32 97
35 #if __cplusplus >= 201103L
36 // CHECK-CPP0X: store i16 97
39 // CHECK-CPP0X: store i32 97
42 // CHECK-CPP0X: store i16 1047
44 // CHECK-CPP0X: store i16 12538
46 // CHECK-CPP0X: store i16 -27177
49 // CHECK-CPP0X: store i32 181
51 // CHECK-CPP0X: store i32 38359
53 // CHECK-CPP0X: store i32 128128
58 // CHECK-C: store i32 61451
59 // CHECK-CPP0X: store i32 61451
60 wchar_t wc
= L
'\uF00B';
62 #if __cplusplus >= 201103L
64 // CHECK-CPP0X: store i16 -4085
65 char16_t uc
= u
'\uF00B';
67 // CHECK-CPP0X: store i32 61451
68 char32_t Uc
= U
'\uF00B';
71 // CHECK-C: store i32 1110027
72 // CHECK-CPP0X: store i32 1110027
73 wchar_t wd
= L
'\U0010F00B';
75 #if __cplusplus >= 201103L
76 // CHECK-CPP0X: store i32 1110027
77 char32_t Ud
= U
'\U0010F00B';