Skip to content

Commit

Permalink
Fix test expectation positioning relative to FIXME comment
Browse files Browse the repository at this point in the history
This new test was failing because the line number delta wasn't right.
  • Loading branch information
rnk committed Jun 30, 2022
1 parent 4dc752e commit 56dc4db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/test/C/drs/dr209.c
Expand Up @@ -33,8 +33,6 @@ void dr209(void) {
(void)_Generic(INT16_C(0), __typeof__(+(int_least16_t){0}) : 1);
(void)_Generic(INT32_C(0), __typeof__(+(int_least32_t){0}) : 1);
(void)_Generic(INT64_C(0), __typeof__(+(int_least64_t){0}) : 1);
(void)_Generic(UINT8_C(0), __typeof__(+(uint_least8_t){0}) : 1);
(void)_Generic(UINT16_C(0), __typeof__(+(uint_least16_t){0}) : 1);
// FIXME: This is not the expected behavior; the type of the expanded value
// in both of these cases should be 'int',
//
Expand All @@ -53,6 +51,8 @@ void dr209(void) {
// but then the value undergoes integer promotions which would convert both
// of those types to int.
//
(void)_Generic(UINT8_C(0), __typeof__(+(uint_least8_t){0}) : 1);
(void)_Generic(UINT16_C(0), __typeof__(+(uint_least16_t){0}) : 1);
// expected-error@-2 {{controlling expression type 'unsigned int' not compatible with any generic association type}}
// expected-error@-2 {{controlling expression type 'unsigned int' not compatible with any generic association type}}
(void)_Generic(UINT32_C(0), __typeof__(+(uint_least32_t){0}) : 1);
Expand Down

0 comments on commit 56dc4db

Please sign in to comment.