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 | e4d269c8913b3fba9c91f6dad738a86d2640040b (patch) | |
tree | beb675f68b2a2defc9539b34786e9f46ed55b5d3 /test/OpenMP/for_private_messages.cpp | |
parent | 122f7cc0c74c3d9c6d53640fe75443325c79b3d3 (diff) |
[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Added proper analysis for types of function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_private_messages.cpp')
-rw-r--r-- | test/OpenMP/for_private_messages.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/OpenMP/for_private_messages.cpp b/test/OpenMP/for_private_messages.cpp index 635a17d6e5..90793f38af 100644 --- a/test/OpenMP/for_private_messages.cpp +++ b/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}} |