summaryrefslogtreecommitdiffstats
path: root/test/PCH
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/Inputs/pch-through-macro.h3
-rw-r--r--test/PCH/arc-blocks.mm49
-rw-r--r--test/PCH/chain-openmp-allocate.cpp46
-rw-r--r--test/PCH/chain-remap-types.m2
-rw-r--r--test/PCH/cxx-exprs.cpp6
-rw-r--r--test/PCH/cxx-templates.cpp46
-rw-r--r--test/PCH/cxx-templates.h43
-rw-r--r--test/PCH/cxx11-lambdas.mm2
-rw-r--r--test/PCH/cxx1y-lambdas.mm2
-rw-r--r--test/PCH/cxx2a-template-lambdas.cpp42
-rw-r--r--test/PCH/leakfiles29
-rw-r--r--test/PCH/pch-through4.cpp12
-rw-r--r--test/PCH/pch-through4a.cpp16
-rw-r--r--test/PCH/stmt-openmp_structured_block-bit.cpp24
-rw-r--r--test/PCH/thread-safety-attrs.cpp2
15 files changed, 309 insertions, 15 deletions
diff --git a/test/PCH/Inputs/pch-through-macro.h b/test/PCH/Inputs/pch-through-macro.h
new file mode 100644
index 0000000000..bb33c32ede
--- /dev/null
+++ b/test/PCH/Inputs/pch-through-macro.h
@@ -0,0 +1,3 @@
+#pragma once
+#define Source(x,y)
+#define InOut(size) Source(InOut, (size))
diff --git a/test/PCH/arc-blocks.mm b/test/PCH/arc-blocks.mm
new file mode 100644
index 0000000000..2e17a570f8
--- /dev/null
+++ b/test/PCH/arc-blocks.mm
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fblocks -std=c++1y -emit-pch %s -o %t
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fblocks -std=c++1y -include-pch %t -emit-llvm -o - %s | FileCheck %s
+
+#ifndef HEADER_INCLUDED
+#define HEADER_INCLUDED
+
+namespace test_block_retain {
+ typedef void (^BlockTy)();
+ void foo1(id);
+
+ inline void initialization(id a) {
+ // Call to @llvm.objc.retainBlock isn't needed.
+ BlockTy b0 = ^{ foo1(a); };
+ b0();
+ }
+
+ inline void assignmentConditional(id a, bool c) {
+ BlockTy b0;
+ if (c)
+ // @llvm.objc.retainBlock is called since 'b0' is declared in the outer scope.
+ b0 = ^{ foo1(a); };
+ b0();
+ }
+}
+
+#else
+
+// CHECK: %[[STRUCT_BLOCK_DESCRIPTOR:.*]] = type { i64, i64 }
+
+namespace test_block_retain {
+// CHECK-LABEL: define linkonce_odr void @_ZN17test_block_retain14initializationEP11objc_object(
+// CHECK-NOT: call i8* @llvm.objc.retainBlock(
+
+ void test_initialization(id a) {
+ initialization(a);
+ }
+
+// CHECK-LABEL: define void @_ZN17test_block_retain26test_assignmentConditionalEP11objc_objectb(
+// CHECK: %[[BLOCK:.*]] = alloca <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>, align 8
+// CHECK: %[[V4:.*]] = bitcast <{ i8*, i32, i32, i8*, %[[STRUCT_BLOCK_DESCRIPTOR]]*, i8* }>* %[[BLOCK]] to void ()*
+// CHECK: %[[V5:.*]] = bitcast void ()* %[[V4]] to i8*
+// CHECK: call i8* @llvm.objc.retainBlock(i8* %[[V5]])
+
+ void test_assignmentConditional(id a, bool c) {
+ assignmentConditional(a, c);
+ }
+}
+
+#endif
diff --git a/test/PCH/chain-openmp-allocate.cpp b/test/PCH/chain-openmp-allocate.cpp
new file mode 100644
index 0000000000..d6daaff0db
--- /dev/null
+++ b/test/PCH/chain-openmp-allocate.cpp
@@ -0,0 +1,46 @@
+// no PCH
+// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -include %s -include %s %s -o - | FileCheck %s
+// with PCH
+// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s
+// no PCH
+// RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1
+// RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2
+// with PCH
+// RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1
+// RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2
+
+#if !defined(PASS1)
+#define PASS1
+
+typedef void **omp_allocator_handle_t;
+extern const omp_allocator_handle_t omp_default_mem_alloc;
+extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
+extern const omp_allocator_handle_t omp_const_mem_alloc;
+extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
+extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
+extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
+extern const omp_allocator_handle_t omp_pteam_mem_alloc;
+extern const omp_allocator_handle_t omp_thread_mem_alloc;
+
+int a;
+// CHECK: int a;
+
+#elif !defined(PASS2)
+#define PASS2
+
+#pragma omp allocate(a) allocator(omp_default_mem_alloc)
+// CHECK: #pragma omp allocate(a) allocator(omp_default_mem_alloc)
+
+#else
+
+// CHECK-LABEL: foo
+// CHECK-ALLOC-LABEL: foo
+int foo() {
+ return a;
+ // CHECK: return a;
+ // CHECK-ALLOC-1: return a;
+}
+
+// CHECK-ALLOC-2: return a;
+
+#endif
diff --git a/test/PCH/chain-remap-types.m b/test/PCH/chain-remap-types.m
index 13f2e39b14..e151a64750 100644
--- a/test/PCH/chain-remap-types.m
+++ b/test/PCH/chain-remap-types.m
@@ -6,7 +6,7 @@
// CHECK: @class X;
// CHECK: struct Y
-// CHECK: @property ( assign,readwrite,atomic ) X * prop
+// CHECK: @property(atomic, assign, unsafe_unretained, readwrite) X *prop
// CHECK: void h(X *);
// CHECK: @interface X(Blah)
// CHECK: void g(X *);
diff --git a/test/PCH/cxx-exprs.cpp b/test/PCH/cxx-exprs.cpp
index b7707e0b93..e02bb0aa05 100644
--- a/test/PCH/cxx-exprs.cpp
+++ b/test/PCH/cxx-exprs.cpp
@@ -20,10 +20,16 @@ public:
}
};
+template<typename ...T> int *arr_new(T ...v) {
+ return new int[]{v...};
+}
+
#else
New<int> *clone_new(New<int> *n) {
return n->clone();
}
+int *use_arr_new = arr_new(1, 2, 3);
+
#endif
diff --git a/test/PCH/cxx-templates.cpp b/test/PCH/cxx-templates.cpp
index a7f7b1981f..78898f7d26 100644
--- a/test/PCH/cxx-templates.cpp
+++ b/test/PCH/cxx-templates.cpp
@@ -1,21 +1,21 @@
// Test this without pch.
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t -verify %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
// Test with modules.
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS -fmodules-ignore-macro=NO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS -fmodules-ignore-macro=NO_ERRORS | FileCheck %s
// Test with pch and delayed template parsing.
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s
+// RUN: %clang_cc1 -std=c++17 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
// CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv
// CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv
@@ -132,3 +132,27 @@ int test() {
return z1 + z2 + z3;
}
} // end namespace PR34728
+
+namespace ClassScopeExplicitSpecializations {
+ // FIXME: It's unclear these warnings (and the behavior they're describing)
+ // are desirable. These explicit instantiations could meaningfully
+ // instantiate the explicit specializations defined in the primary template.
+ template int A<3>::f<0>() const; // expected-warning {{has no effect}}
+ template int A<3>::f<1>() const;
+ template int A<4>::f<0>() const; // expected-warning {{has no effect}}
+ template int A<4>::f<1>() const;
+ // expected-note@cxx-templates.h:403 2{{here}}
+
+ static_assert(A<0>().f<0>() == 4, "");
+ static_assert(A<0>().f<1>() == 5, "");
+ static_assert(A<0>().f<2>() == 3, "");
+ static_assert(A<1>().f<0>() == 2, "");
+ static_assert(A<1>().f<1>() == 1, "");
+ static_assert(A<1>().f<2>() == 1, "");
+ static_assert(A<2>().f<0>() == 2, "");
+ static_assert(A<2>().f<1>() == 1, "");
+ static_assert(A<3>().f<0>() == 2, "");
+ static_assert(A<3>().f<1>() == 1, "");
+ static_assert(A<4>().f<0>() == 2, "");
+ static_assert(A<4>().f<1>() == 1, "");
+}
diff --git a/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h
index e812aa68fb..bfdb3b8b3d 100644
--- a/test/PCH/cxx-templates.h
+++ b/test/PCH/cxx-templates.h
@@ -396,3 +396,46 @@ C<D> func3(D const &d) {
}
} // end namespace PR34728
+
+namespace ClassScopeExplicitSpecializations {
+ template<int> struct A {
+ template<int> constexpr int f() const { return 1; }
+ template<> constexpr int f<0>() const { return 2; }
+ };
+
+ template<> template<int> constexpr int A<0>::f() const { return 3; }
+ template<> template<> constexpr int A<0>::f<0>() const { return 4; }
+ template<> template<> constexpr int A<0>::f<1>() const { return 5; }
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Winstantiation-after-specialization"
+ template int A<2>::f<0>() const;
+#pragma clang diagnostic pop
+ template int A<2>::f<1>() const;
+ extern template int A<3>::f<0>() const;
+ extern template int A<3>::f<1>() const;
+
+ template<int> struct B {
+ template<typename> static const int v = 1;
+ template<typename T> static const int v<T*> = 2;
+ template<> static const int v<int> = 3;
+
+ template<typename> static constexpr int w = 1;
+ template<typename T> static constexpr int w<T*> = 2;
+ template<> static constexpr int w<int> = 3;
+ };
+
+ template<> template<typename> constexpr int B<0>::v = 4;
+ template<> template<typename T> constexpr int B<0>::v<T*> = 5;
+ template<> template<typename T> constexpr int B<0>::v<T&> = 6;
+ // This is ill-formed: the initializer of v<int> is instantiated with the
+ // class.
+ //template<> template<> constexpr int B<0>::v<int> = 7;
+ template<> template<> constexpr int B<0>::v<float> = 8;
+
+ template<> template<typename> constexpr int B<0>::w = 4;
+ template<> template<typename T> constexpr int B<0>::w<T*> = 5;
+ template<> template<typename T> constexpr int B<0>::w<T&> = 6;
+ template<> template<> constexpr int B<0>::w<int> = 7;
+ template<> template<> constexpr int B<0>::w<float> = 8;
+}
diff --git a/test/PCH/cxx11-lambdas.mm b/test/PCH/cxx11-lambdas.mm
index 9628d12aa1..de2ed61606 100644
--- a/test/PCH/cxx11-lambdas.mm
+++ b/test/PCH/cxx11-lambdas.mm
@@ -54,7 +54,7 @@ int add(int x, int y) {
}
// CHECK-PRINT: inline int add_int_slowly_twice
-// CHECK-PRINT: lambda = [&] (int z)
+// CHECK-PRINT: lambda = [&](int z)
// CHECK-PRINT: init_capture
// CHECK-PRINT: [&, x(t)]
diff --git a/test/PCH/cxx1y-lambdas.mm b/test/PCH/cxx1y-lambdas.mm
index 5235fc5a4c..f140a15215 100644
--- a/test/PCH/cxx1y-lambdas.mm
+++ b/test/PCH/cxx1y-lambdas.mm
@@ -50,7 +50,7 @@ int add(int x, int y) {
}
// CHECK-PRINT: inline int add_int_slowly_twice
-// CHECK-PRINT: lambda = [] (type-parameter-0-0 z
+// CHECK-PRINT: lambda = [](auto z
// CHECK-PRINT: init_capture
// CHECK-PRINT: [&, x(t)]
diff --git a/test/PCH/cxx2a-template-lambdas.cpp b/test/PCH/cxx2a-template-lambdas.cpp
new file mode 100644
index 0000000000..c9d923f98c
--- /dev/null
+++ b/test/PCH/cxx2a-template-lambdas.cpp
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t
+// RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s
+
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+auto l1 = []<int I>() constexpr -> int {
+ return I;
+};
+
+auto l2 = []<auto I>() constexpr -> decltype(I) {
+ return I;
+};
+
+auto l3 = []<class T>(auto i) constexpr -> T {
+ return T(i);
+};
+
+auto l4 = []<template<class> class T, class U>(T<U>, auto i) constexpr -> U {
+ return U(i);
+};
+
+#else /*included pch*/
+
+static_assert(l1.operator()<5>() == 5);
+static_assert(l1.operator()<6>() == 6);
+
+static_assert(l2.operator()<7>() == 7);
+static_assert(l2.operator()<nullptr>() == nullptr);
+
+static_assert(l3.operator()<int>(8.4) == 8);
+static_assert(l3.operator()<int>(9.9) == 9);
+
+template<typename T>
+struct DummyTemplate { };
+
+static_assert(l4(DummyTemplate<float>(), 12) == 12.0);
+static_assert(l4(DummyTemplate<int>(), 19.8) == 19);
+
+#endif // HEADER
diff --git a/test/PCH/leakfiles b/test/PCH/leakfiles
new file mode 100644
index 0000000000..90b279026b
--- /dev/null
+++ b/test/PCH/leakfiles
@@ -0,0 +1,29 @@
+// Test that compiling using a PCH doesn't leak file descriptors.
+// https://bugs.chromium.org/p/chromium/issues/detail?id=924225
+//
+// This test requires bash loops and ulimit.
+// REQUIRES: shell
+// UNSUPPORTED: win32
+//
+// Set up source files. lib/lib.h includes lots of lib*.h files in that dir.
+// client.c includes lib/lib.h, and also the individual files directly.
+//
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: cd %t
+// RUN: mkdir lib
+// RUN: for i in {1..300}; do touch lib/lib$i.h; done
+// RUN: for i in {1..300}; do echo "#include \"lib$i.h\"" >> lib/lib.h; done
+// RUN: echo "#include \"lib/lib.h\"" > client.c
+// RUN: for i in {1..300}; do echo "#include \"lib/lib$i.h\"" >> client.c; done
+//
+// We want to verify that we don't hold all the files open at the same time.
+// This is important e.g. on mac, which has a low default FD limit.
+// RUN: ulimit -n 100
+//
+// Test without PCH.
+// RUN: %clang_cc1 -fsyntax-only -Ilib/ client.c
+//
+// Test with PCH.
+// RUN: %clang_cc1 -emit-pch -o pch -Ilib/ client.c
+// RUN: %clang_cc1 -include-pch pch -Ilib/ client.c -fsyntax-only
diff --git a/test/PCH/pch-through4.cpp b/test/PCH/pch-through4.cpp
new file mode 100644
index 0000000000..bdd50a9acb
--- /dev/null
+++ b/test/PCH/pch-through4.cpp
@@ -0,0 +1,12 @@
+// expected-no-diagnostics
+// Create PCH with #pragma hdrstop processing.
+// RUN: %clang_cc1 -verify -I %S -emit-pch -pch-through-hdrstop-create \
+// RUN: -fms-extensions -o %t.pch -x c++-header %s
+
+// Create the PCH object
+// RUN: %clang_cc1 -verify -I %S -emit-obj -include-pch %t.pch \
+// RUN: -pch-through-hdrstop-create -fms-extensions -o %t.obj -x c++ %s
+
+#pragma once
+#include "Inputs/pch-through-macro.h"
+void f(InOut(a) char *b, unsigned long a);
diff --git a/test/PCH/pch-through4a.cpp b/test/PCH/pch-through4a.cpp
new file mode 100644
index 0000000000..c13edf5382
--- /dev/null
+++ b/test/PCH/pch-through4a.cpp
@@ -0,0 +1,16 @@
+// expected-no-diagnostics
+// Create PCH with a through header.
+// RUN: %clang_cc1 -verify -I %S -emit-pch \
+// RUN: -pch-through-header=Inputs/pch-through1.h \
+// RUN: -fms-extensions -o %t.pch -x c++-header %s
+
+// Create the PCH object
+// RUN: %clang_cc1 -verify -I %S -emit-obj -include-pch %t.pch \
+// RUN: -pch-through-header=Inputs/pch-through1.h \
+// RUN: -fms-extensions -o %t.obj -x c++ %s
+
+#define Source(x,y)
+#define InOut(size) Source(InOut, (size))
+void f(InOut(a) char *b, unsigned long a);
+#include "Inputs/pch-through1.h"
+int other;
diff --git a/test/PCH/stmt-openmp_structured_block-bit.cpp b/test/PCH/stmt-openmp_structured_block-bit.cpp
new file mode 100644
index 0000000000..c94624e8cf
--- /dev/null
+++ b/test/PCH/stmt-openmp_structured_block-bit.cpp
@@ -0,0 +1,24 @@
+// Test this without pch.
+// RUN: %clang_cc1 -std=c++11 -fopenmp -fsyntax-only -verify %s -ast-dump-all | FileCheck %s -implicit-check-not=openmp_structured_block
+
+// Test with pch. Use '-ast-dump' to force deserialization of function bodies.
+// RUN: %clang_cc1 -std=c++11 -fopenmp -emit-pch -o %t %s
+// RUN: echo "// expected-no-diagnostics" | %clang_cc1 -x c++ -std=c++11 -include-pch %t -fopenmp -fsyntax-only -verify - -ast-dump-all | FileCheck %s -implicit-check-not=openmp_structured_block
+
+void test() {
+#pragma omp parallel
+ ;
+}
+
+// expected-no-diagnostics
+
+// CHECK: TranslationUnitDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
+// CHECK: `-FunctionDecl 0x{{.*}} <{{.*}}stmt-openmp_structured_block-bit.cpp:8:1, line:11:1> line:8:6 {{(test|imported test)}} 'void ()'
+// CHECK-NEXT: `-CompoundStmt 0x{{.*}} <col:13, line:11:1>
+// CHECK-NEXT: `-OMPParallelDirective 0x{{.*}} <line:9:9, col:21>
+// CHECK-NEXT: `-CapturedStmt 0x{{.*}} <line:10:3>
+// CHECK-NEXT: `-CapturedDecl 0x{{.*}} <<invalid sloc>> <invalid sloc> {{(nothrow|imported <undeserialized declarations> nothrow)}}
+// CHECK-NEXT: |-NullStmt 0x{{.*}} <col:3> openmp_structured_block
+// CHECK-NEXT: |-ImplicitParamDecl 0x{{.*}} <line:9:9> col:9 {{(implicit|imported implicit)}} .global_tid. 'const int *const __restrict'
+// CHECK-NEXT: |-ImplicitParamDecl 0x{{.*}} <col:9> col:9 {{(implicit|imported implicit)}} .bound_tid. 'const int *const __restrict'
+// CHECK-NEXT: `-ImplicitParamDecl 0x{{.*}} <col:9> col:9 {{(implicit|imported implicit)}} __context '(anonymous struct at {{.*}}stmt-openmp_structured_block-bit.cpp:9:9) *const __restrict'
diff --git a/test/PCH/thread-safety-attrs.cpp b/test/PCH/thread-safety-attrs.cpp
index 3e6f029632..ae2a413af3 100644
--- a/test/PCH/thread-safety-attrs.cpp
+++ b/test/PCH/thread-safety-attrs.cpp
@@ -213,7 +213,7 @@ void sls_fun_bad_1() {
}
void sls_fun_bad_2() {
- sls_mu.Lock();
+ sls_mu.Lock(); // expected-note{{mutex acquired here}}
sls_mu.Lock(); // \
// expected-warning{{acquiring mutex 'sls_mu' that is already held}}
sls_mu.Unlock();