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_lastprivate_messages.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'clang/test/OpenMP/for_lastprivate_messages.cpp') diff --git a/clang/test/OpenMP/for_lastprivate_messages.cpp b/clang/test/OpenMP/for_lastprivate_messages.cpp index 632ed8446c4..49485aa0dfe 100644 --- a/clang/test/OpenMP/for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_lastprivate_messages.cpp @@ -36,7 +36,7 @@ const S3 ca[5]; // expected-note {{global variable is predetermined as share extern const int f; // expected-note {{global variable is predetermined as shared}} class S4 { int a; - S4(); // expected-note 3 {{implicitly declared private here}} + S4(); // expected-note 4 {{implicitly declared private here}} S4(const S4 &s4); public: @@ -142,6 +142,13 @@ int foomain(int argc, char **argv) { return 0; } +void bar(S4 a[2]) { +#pragma omp parallel +#pragma omp for lastprivate(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