1 // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print
4 // expected-no-diagnostics
5 // FIXME: This test has been crashing since r186647.
18 // CHECK: static int b;
19 #pragma omp threadprivate(b)
20 // CHECK-NEXT: #pragma omp threadprivate(St1::b)
26 #pragma omp threadprivate(a)
27 // CHECK-NEXT: #pragma omp threadprivate(a)
28 #pragma omp threadprivate(d, b)
29 // CHECK-NEXT: #pragma omp threadprivate(d,b)
31 template <class T> T foo() {
33 #pragma omp threadprivate(v)
36 //CHECK: template <class T = int> int foo() {
37 //CHECK-NEXT: static int v;
38 //CHECK-NEXT: #pragma omp threadprivate(v)
39 //CHECK: template <class T> T foo() {
40 //CHECK-NEXT: static T v;
41 //CHECK-NEXT: #pragma omp threadprivate(v)
46 // CHECK: namespace ns {
49 #pragma omp threadprivate(ns::a)
50 // CHECK-NEXT: #pragma omp threadprivate(ns::a)
54 // CHECK: static int a;
55 #pragma omp threadprivate(a)
56 // CHECK-NEXT: #pragma omp threadprivate(a)