annotate clang/test/PCH/thread-local.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -pedantic-errors -Wno-c11-extensions -std=c++11 -triple x86_64-linux-gnu -emit-pch %s -o %t
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -pedantic-errors -Wno-c11-extensions -std=c++11 -triple x86_64-linux-gnu -include-pch %t -verify %s
anatofuz
parents:
diff changeset
3 // REQUIRES: x86-registered-target
anatofuz
parents:
diff changeset
4 #ifndef HEADER_INCLUDED
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 #define HEADER_INCLUDED
anatofuz
parents:
diff changeset
7 extern thread_local int a;
anatofuz
parents:
diff changeset
8 extern _Thread_local int b;
anatofuz
parents:
diff changeset
9 extern int c;
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 #else
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 _Thread_local int a; // expected-error {{thread-local declaration of 'a' with static initialization follows declaration with dynamic initialization}}
anatofuz
parents:
diff changeset
14 // expected-note@7 {{previous declaration is here}}
anatofuz
parents:
diff changeset
15 thread_local int b; // expected-error {{thread-local declaration of 'b' with dynamic initialization follows declaration with static initialization}}
anatofuz
parents:
diff changeset
16 // expected-note@8 {{previous declaration is here}}
anatofuz
parents:
diff changeset
17 thread_local int c; // expected-error {{thread-local declaration of 'c' follows non-thread-local declaration}}
anatofuz
parents:
diff changeset
18 // expected-note@9 {{previous declaration is here}}
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 #endif