Skip to content

Commit 25b1896

Browse files
committed
Fix test for bots where -std=c99 is the default
Amends 9791f25 This addresses the issue found by: https://lab.llvm.org/buildbot/#/builders/144/builds/13023
1 parent 4b9bf66 commit 25b1896

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/test/Sema/enum.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type
129129
#else
130130
_Static_assert(__has_extension(c_fixed_enum), "");
131131
_Static_assert(!__has_feature(c_fixed_enum), "");
132+
#if __STDC_VERSION__ < 201112L
133+
// expected-warning@-3 {{'_Static_assert' is a C11 extension}}
134+
// expected-warning@-3 {{'_Static_assert' is a C11 extension}}
135+
#endif
132136
#endif
133137
typedef enum : unsigned char { Pink, Black, Cyan } Color; // pre-c23-warning {{enumeration types with a fixed underlying type are a C23 extension}}
134138

0 commit comments

Comments
 (0)