diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-19 07:46:42 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-19 07:46:42 +0000 |
commit | f120c0d6f2cc3ad894112e46e03a3f9d8bc100a4 (patch) | |
tree | 3a74007af971e6cd45e00be51fbdb7726eed89df /clang/test/OpenMP/for_lastprivate_messages.cpp | |
parent | 5b9bc2f8ef3784f520be20ca596d292b5c52393c (diff) | |
download | bcm5719-llvm-f120c0d6f2cc3ad894112e46e03a3f9d8bc100a4.tar.gz bcm5719-llvm-f120c0d6f2cc3ad894112e46e03a3f9d8bc100a4.zip |
[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Added proper analysis for types of function arguments.
llvm-svn: 237670
Diffstat (limited to 'clang/test/OpenMP/for_lastprivate_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/for_lastprivate_messages.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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}} |