From f120c0d6f2cc3ad894112e46e03a3f9d8bc100a4 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 19 May 2015 07:46:42 +0000 Subject: [OPENMP] Fixed analysis of function arguments and their data sharing attributes. Added proper analysis for types of function arguments. llvm-svn: 237670 --- clang/test/OpenMP/for_private_messages.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'clang/test/OpenMP/for_private_messages.cpp') diff --git a/clang/test/OpenMP/for_private_messages.cpp b/clang/test/OpenMP/for_private_messages.cpp index 635a17d6e54..90793f38af9 100644 --- a/clang/test/OpenMP/for_private_messages.cpp +++ b/clang/test/OpenMP/for_private_messages.cpp @@ -26,7 +26,7 @@ public: const S3 ca[5]; class S4 { int a; - S4(); // expected-note {{implicitly declared private here}} + S4(); // expected-note 2 {{implicitly declared private here}} public: S4(int v) : a(v) {} @@ -108,6 +108,13 @@ int foomain(I argc, C **argv) { return 0; } +void bar(S4 a[2]) { +#pragma omp parallel +#pragma omp for private(a) // expected-error {{calling a private constructor of class 'S4'}} + for (int i = 0; i < 2; ++i) + foo(); +} + namespace A { double x; #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} -- cgit v1.2.3