[clang] 25b1896 - Fix test for bots where -std=c99 is the default

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 10:57:13 PST 2024


Author: Aaron Ballman
Date: 2024-12-03T13:56:15-05:00
New Revision: 25b1896686177673dcd548489e92c7880d576948

URL: https://github.com/llvm/llvm-project/commit/25b1896686177673dcd548489e92c7880d576948
DIFF: https://github.com/llvm/llvm-project/commit/25b1896686177673dcd548489e92c7880d576948.diff

LOG: Fix test for bots where -std=c99 is the default

Amends 9791f258079a4334c61c64cb62d9746a3db2c25c

This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/144/builds/13023

Added: 
    

Modified: 
    clang/test/Sema/enum.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c
index f12ce61ac13a61..3db301dab0a450 100644
--- a/clang/test/Sema/enum.c
+++ b/clang/test/Sema/enum.c
@@ -129,6 +129,10 @@ typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type
 #else
   _Static_assert(__has_extension(c_fixed_enum), "");
   _Static_assert(!__has_feature(c_fixed_enum), "");
+#if __STDC_VERSION__ < 201112L
+  // expected-warning at -3 {{'_Static_assert' is a C11 extension}}
+  // expected-warning at -3 {{'_Static_assert' is a C11 extension}}
+#endif
 #endif
 typedef enum : unsigned char { Pink, Black, Cyan } Color; // pre-c23-warning {{enumeration types with a fixed underlying type are a C23 extension}}
 


        


More information about the cfe-commits mailing list