[clang] 56dc4db - Fix test expectation positioning relative to FIXME comment

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 14:08:30 PDT 2022


Author: Reid Kleckner
Date: 2022-06-30T14:08:25-07:00
New Revision: 56dc4dbe45e2b1a3e33ab69323ae9d885ab34899

URL: https://github.com/llvm/llvm-project/commit/56dc4dbe45e2b1a3e33ab69323ae9d885ab34899
DIFF: https://github.com/llvm/llvm-project/commit/56dc4dbe45e2b1a3e33ab69323ae9d885ab34899.diff

LOG: Fix test expectation positioning relative to FIXME comment

This new test was failing because the line number delta wasn't right.

Added: 
    

Modified: 
    clang/test/C/drs/dr209.c

Removed: 
    


################################################################################
diff  --git a/clang/test/C/drs/dr209.c b/clang/test/C/drs/dr209.c
index 6cd6093a4b91..d8613669f327 100644
--- a/clang/test/C/drs/dr209.c
+++ b/clang/test/C/drs/dr209.c
@@ -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',
   //
@@ -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 at -2 {{controlling expression type 'unsigned int' not compatible with any generic association type}}
   // expected-error at -2 {{controlling expression type 'unsigned int' not compatible with any generic association type}}
   (void)_Generic(UINT32_C(0), __typeof__(+(uint_least32_t){0}) : 1);


        


More information about the cfe-commits mailing list