1 // RUN: %clang_analyze_cc1 -ffixed-point \
2 // RUN: -analyzer-checker=core,debug.ExprInspection -verify %s
4 // expected-no-diagnostics
6 // Check that getAPSIntType does not crash
7 // when using fixed point types.
9 enum Kind
{ en_0
= 1 };
12 (void)((enum Kind
) c
>> 4);
15 void _inttype(int c
) {
20 (void)((_Accum
) c
>> 4);
24 (void)((_Fract
) c
>> 4);
27 void _long_fract(int c
) {
28 (void)((long _Fract
) c
>> 4);
31 void _unsigned_accum(int c
) {
32 (void)((unsigned _Accum
) c
>> 4);
35 void _short_unsigned_accum(int c
) {
36 (void)((short unsigned _Accum
) c
>> 4);
39 void _unsigned_fract(int c
) {
40 (void)((unsigned _Fract
) c
>> 4);
43 void sat_accum(int c
) {
44 (void)((_Sat _Accum
) c
>> 4);
47 void sat_fract(int c
) {
48 (void)((_Sat _Fract
) c
>> 4);
51 void sat_long_fract(int c
) {
52 (void)((_Sat
long _Fract
) c
>> 4);
55 void sat_unsigned_accum(int c
) {
56 (void)((_Sat
unsigned _Accum
) c
>> 4);
59 void sat_short_unsigned_accum(int c
) {
60 (void)((_Sat
short unsigned _Accum
) c
>> 4);
63 void sat_unsigned_fract(int c
) {
64 (void)((_Sat
unsigned _Fract
) c
>> 4);