You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add guard to for loop test clang/test/Sema/for.c (#133169)
Commit 20b7f59 includes a case that checks diagnostics for for
loops using thread locals.
This fails on platforms which do not support TLS.
This change adds guards to run this part of the test iff the feature is
supported.
voidb10(void) { for (typedefstruct { inti; } (*s)(struct { intj; });;); } /* c11-warning {{non-variable declaration in 'for' loop is a C23 extension}}
21
21
c23-warning {{non-variable declaration in 'for' loop is incompatible with C standards before C23}} */
22
+
23
+
#if__has_feature(c_thread_local)
22
24
voidb11 (void) { for (static_Thread_localstruct { inti; } s;s.i;); } /* c11-warning {{declaration of non-local variable in 'for' loop is a C23 extension}}
23
25
c23-warning {{declaration of non-local variable in 'for' loop is incompatible with C standards before C23}} */
0 commit comments