brintos

brintos / llvm-project-archived public Read only

0
0
Text · 965 B · 678fe34 Raw
21 lines · cpp
1// RUN: %clang_cc1 -pedantic-errors -Wno-c11-extensions -std=c++11 -triple x86_64-linux-gnu -emit-pch %s -o %t2// RUN: %clang_cc1 -pedantic-errors -Wno-c11-extensions -std=c++11 -triple x86_64-linux-gnu -include-pch %t -verify %s3// REQUIRES: x86-registered-target4#ifndef HEADER_INCLUDED5 6#define HEADER_INCLUDED7extern thread_local int a;8extern _Thread_local int b;9extern int c;10 11#else12 13_Thread_local int a; // expected-error {{thread-local declaration of 'a' with static initialization follows declaration with dynamic initialization}}14// expected-note@7 {{previous declaration is here}}15thread_local int b; // expected-error {{thread-local declaration of 'b' with dynamic initialization follows declaration with static initialization}}16// expected-note@8 {{previous declaration is here}}17thread_local int c; // expected-error {{thread-local declaration of 'c' follows non-thread-local declaration}}18// expected-note@9 {{previous declaration is here}}19 20#endif21