1 // RUN: %clang_cc1 -verify -std=c++2a -pedantic-errors %s 2 // RUN: cp %s %t 3 // RUN: %clang_cc1 -x c++ -std=c++2a -fixit %t 4 // RUN: %clang_cc1 -Wall -pedantic-errors -x c++ -std=c++2a %t 5 // RUN: cat %t | FileCheck %s 6 // UNSUPPORTED: target={{.*-zos.*}} 7 8 /* This is a test of the various code modification hints that only 9 apply in C++2a. */ 10 11 namespace constinit_mismatch { 12 extern thread_local constinit int a; // expected-note {{declared constinit here}} 13 thread_local int a = 123; // expected-error {{'constinit' specifier missing on initializing declaration of 'a'}} 14 // CHECK: {{^}} constinit thread_local int a = 123; 15 } 16 17