Lines Matching refs:OpenMP
1 //===--- SemaOpenMP.cpp - Semantic Analysis for OpenMP constructs ---------===//
9 /// This file implements semantic analysis for OpenMP directives and
39 #include "llvm/Frontend/OpenMP/OMPConstants.h"
63 /// Stack for tracking declarations used in OpenMP directives and
294 /// Checks if the variable is a local for OpenMP region.
441 /// Start new OpenMP region stack in new non-capturing function.
557 /// descriptor variable at the \p Level of OpenMP regions.
589 /// OpenMP region.
1158 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1166 // OpenMP [2.9.1.2, Data-sharing Attribute Rules for Variables Referenced
1180 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1204 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1225 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1237 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1247 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables
1264 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1394 /// Build a variable declaration for OpenMP loop iteration variable.
1619 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1676 // Not in OpenMP execution region and top scope was already checked.
1679 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1682 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1713 // mutable members was removed after OpenMP 3.1.
1714 if (SemaRef.LangOpts.OpenMP <= 31) {
1715 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
1885 assert(S.LangOpts.OpenMP && S.LangOpts.OpenMPIsDevice &&
1886 "Expected OpenMP device compilation.");
1902 assert(LangOpts.OpenMP && LangOpts.OpenMPIsDevice &&
1903 "Expected OpenMP device compilation.");
1929 llvm_unreachable("CUDADiscarded unexpected in OpenMP device compilation");
1940 assert(LangOpts.OpenMP && !LangOpts.OpenMPIsDevice &&
1941 "Expected OpenMP host compilation.");
1966 if (LO.OpenMP <= 45) {
1980 assert(LangOpts.OpenMP && "OpenMP is not allowed");
1993 // the description in OpenMP 4.5 [2.10.4, target Construct] and
1994 // OpenMP 4.5 [2.15.5, Data-mapping Attribute Rules and Clauses].
2153 assert(getLangOpts().OpenMP);
2170 assert(LangOpts.OpenMP && "OpenMP is not allowed");
2222 if (LangOpts.OpenMP <= 45 &&
2291 assert(LangOpts.OpenMP && "OpenMP must be enabled.");
2297 assert(LangOpts.OpenMP && "OpenMP must be enabled.");
2306 assert(LangOpts.OpenMP && "OpenMP is not allowed");
2387 assert(LangOpts.OpenMP && "OpenMP is not allowed");
2425 assert(LangOpts.OpenMP && "OpenMP is not allowed");
2439 assert(LangOpts.OpenMP && "OpenMP is not allowed");
2472 "Not in OpenMP declare variant scope!");
2480 assert(LangOpts.OpenMP && "Expected OpenMP compilation mode.");
2542 // OpenMP 5.0, 2.19.5.4 reduction Clause, Restrictions.
2556 // OpenMP 5.0, 2.19.5.4 reduction Clause.
2584 assert(Ref && "NULL expr in OpenMP nontemporal clause.");
2614 // OpenMP [2.14.3.5, Restrictions, C/C++, p.1]
2637 // variable is not added to IdResolver, so the code in the OpenMP
2662 assert(RefExpr && "NULL expr in OpenMP nontemporal clause.");
2693 // OpenMP [2.12.5, target Construct]
2825 // OpenMP [2.9.2, Syntax, C/C++]
2840 // OpenMP [2.9.2, Restrictions, C/C++, p.2]
2854 // OpenMP [2.9.2, Restrictions, C/C++, p.3]
2869 // OpenMP [2.9.2, Restrictions, C/C++, p.4]
2885 // OpenMP [2.9.2, Restrictions, C/C++, p.6]
2900 // OpenMP [2.9.2, Restrictions, C/C++, p.2-6]
2976 // OpenMP [2.9.2, Restrictions, C/C++, p.10]
2983 // OpenMP [2.9.2, Restrictions, C/C++, p.10]
3136 // OpenMP 5.0, 2.11.3 allocate Directive, Restrictions.
3166 // OpenMP, 2.11.3 allocate Directive, Restrictions, C / C++
3268 assert(isInOpenMPAssumeScope() && "Not in OpenMP assumes scope!");
3384 // OpenMP 5.1 [2.21.7.3] defaultmap clause, Description]
3527 // OpenMP 5.0 [2.19.7.2, defaultmap clause, Description]
3537 if (SemaRef.getLangOpts().OpenMP >= 50) {
3559 if (SemaRef.getLangOpts().OpenMP > 50) {
3579 if (SemaRef.LangOpts.OpenMP >= 50)
3619 // OpenMP [2.9.3.6, Restrictions, p.2]
3687 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.3]
3709 // OpenMP [2.9.3.6, Restrictions, p.2]
4276 llvm_unreachable("OpenMP Directive is not allowed");
4279 llvm_unreachable("Unknown OpenMP directive");
4357 // OpenMP directives parsed in this section are represented as a
4526 // OpenMP, 2.7.1 Loop Construct, Restrictions
4544 // OpenMP 5.0, 2.9.2 Worksharing-Loop Construct, Restrictions.
4658 ((SemaRef.LangOpts.OpenMP <= 45 && CurrentRegion != OMPD_ordered) ||
4659 (SemaRef.LangOpts.OpenMP >= 50 && CurrentRegion != OMPD_ordered &&
4662 // OpenMP [2.16, Nesting of Regions]
4663 // OpenMP constructs may not be nested inside a simd region.
4664 // OpenMP [2.8.1,simd Construct, Restrictions]
4665 // An ordered construct with the simd clause is the only OpenMP
4668 // extension. The OpenMP 4.5 spec does not allow it. Issue a warning
4670 // OpenMP 5.0 [2.9.3.1, simd Construct, Restrictions]
4671 // The only OpenMP constructs that can be encountered during execution of
4677 << (SemaRef.LangOpts.OpenMP >= 50 ? 1 : 0);
4681 // OpenMP [2.16, Nesting of Regions]
4682 // OpenMP constructs may not be nested inside an atomic region.
4687 // OpenMP [2.7.2, sections Construct, Restrictions]
4701 // orphaned (they could be used in functions, called from OpenMP regions
4710 // OpenMP [2.16, Nesting of Regions]
4714 // be closely nested inside an OpenMP construct that matches the type
4719 // OpenMP construct that matches the type specified in
4733 (SemaRef.getLangOpts().OpenMP >= 50 &&
4742 // OpenMP 5.1 [2.22, Nesting of Regions]
4748 // OpenMP [2.16, Nesting of Regions]
4774 // OpenMP 5.1 [2.22, Nesting of Regions]
4786 // OpenMP 5.1 [2.22, Nesting of Regions]
4798 // OpenMP [2.16, Nesting of Regions]
4803 // OpenMP [2.8.1,simd Construct, Restrictions]
4804 // An ordered construct with the simd clause is the only OpenMP construct
4812 // OpenMP [2.16, Nesting of Regions]
4816 (SemaRef.LangOpts.OpenMP <= 45 && ParentRegion != OMPD_target) ||
4817 (SemaRef.LangOpts.OpenMP >= 50 && ParentRegion != OMPD_unknown &&
4822 // OpenMP [2.16, Nesting of Regions]
4826 SemaRef.LangOpts.OpenMP < 50 ||
4837 // OpenMP [2.16, Nesting of Regions]
4839 // parallel loop and parallel loop SIMD constructs are the only OpenMP
4847 // OpenMP 4.5 [2.17 Nesting of Regions]
4857 // OpenMP 4.5 [2.17 Nesting of Regions]
4982 // OpenMP [3.1, C/C++]
4984 // OpenMP [2.9.3.3, Restrictions, p.1]
5127 if (S.getLangOpts().OpenMP >= 50 &&
5132 // OpenMP, 2.12.5 target Construct
5145 // OpenMP, 2.11.4 allocate Clause, Restrictions.
5291 // non well-formed OpenMP if Step increments/decrements in the other
5578 if (S.getLangOpts().OpenMP < 50)
5787 // OpenMP 5.0, 2.10.1 task Construct
5828 if (LangOpts.OpenMP >= 50)
5843 if (LangOpts.OpenMP >= 50)
5857 if (LangOpts.OpenMP >= 50)
5895 if (LangOpts.OpenMP >= 50)
6020 if (LangOpts.OpenMP >= 50)
6032 if (LangOpts.OpenMP >= 50)
6046 if (LangOpts.OpenMP >= 50)
6067 if (LangOpts.OpenMP >= 50)
6073 if (LangOpts.OpenMP >= 50)
6081 if (LangOpts.OpenMP >= 50)
6088 if (LangOpts.OpenMP >= 50)
6098 if (LangOpts.OpenMP >= 50)
6105 if (LangOpts.OpenMP >= 50)
6134 if (LangOpts.OpenMP >= 50)
6141 if (LangOpts.OpenMP >= 50)
6164 llvm_unreachable("OpenMP Directive is not allowed");
6167 llvm_unreachable("Unknown OpenMP directive");
6294 } else if (getLangOpts().OpenMP >= 50) {
6350 // OpenMP [2.8.2, declare simd construct, Description]
6356 // OpenMP [2.8.2, declare simd construct, Description]
6381 // OpenMP [2.8.2, declare simd construct, Description]
6399 // OpenMP [2.8.1, simd construct, Restrictions]
6448 // OpenMP [2.8.2, declare simd construct, Description]
6470 // OpenMP [2.15.3.7, linear Clause, Restrictions]
6789 // implementation defined behavior in the OpenMP standard when it talks
6791 // that the specific OpenMP context requires in the prototype of the
6863 // OpenMP is not compatible with CPU-specific attributes.
6912 // OpenMP context selectors.
7111 // 1.2.2 OpenMP Language Terminology
7174 /// Helper class for checking canonical form of the OpenMP loops and
7378 // OpenMP [2.6, Canonical Loop Form, Restrictions]
7446 // OpenMP, 2.9.1 Canonical Loop Form, Restrictions.
7540 // OpenMP [2.6] Canonical loop form. init-expr may be one of the following:
7647 // OpenMP [2.9] Canonical loop form. Test-expr may be one of the following:
7651 bool IneqCondIsCanonical = SemaRef.getLangOpts().OpenMP >= 50;
7748 // OpenMP [2.6] Canonical loop form. Test-expr may be one of the following:
8188 // OpenMP runtime requires 32-bit or 64-bit loop variables.
8464 assert(getLangOpts().OpenMP && "OpenMP is not active.");
8496 // OpenMP [2.14.1.1, Data-sharing Attribute Rules for Variables
8514 (LangOpts.OpenMP <= 45 || (DVar.CKind != OMPC_lastprivate &&
8557 // OpenMP [2.9.1, Canonical Loop Form]
8564 // Ranged for is supported only in OpenMP 5.0.
8565 if (!For && (SemaRef.LangOpts.OpenMP <= 45 || !CXXFor)) {
8602 // OpenMP [2.6, Canonical Loop Form]
8616 // OpenMP, 2.14.1.1 Data-sharing Attribute Rules for Variables Referenced in
8906 bool SupportsNonPerfectlyNested = (SemaRef.LangOpts.OpenMP >= 50) &&
9612 // OpenMP 4.5 [2.8.1, simd Construct, Restrictions]
9810 // 5.1 OpenMP
9862 // OpenMP [2.7.3, single Construct, Restrictions]
9969 // 1.2.2 OpenMP Language Terminology
10013 // 1.2.2 OpenMP Language Terminology
10058 // 1.2.2 OpenMP Language Terminology
10141 // OpenMP 5.0, 2.10.1 task Construct
10148 // 1.2.2 OpenMP Language Terminology
10262 // Check that scan directive is used in the scopeof the OpenMP loop body.
10326 // OpenMP [2.8.1,simd Construct, Restrictions]
10327 // An ordered construct with the simd clause is the only OpenMP construct
10330 << (LangOpts.OpenMP >= 50 ? 1 : 0);
10352 // OpenMP 5.0, 2.17.9, ordered Construct, Restrictions.
10628 // 1.2.2 OpenMP Language Terminology
10668 // OpenMP 5.0, 2.17.7 atomic Construct, Restrictions
10701 // OpenMP [2.12.6, atomic Construct]
11101 // 1.2.2 OpenMP Language Terminology
11110 // 1.2.2 OpenMP Language Terminology
11118 // OpenMP [2.16, Nesting of Regions]
11166 // 1.2.2 OpenMP Language Terminology
11175 // 1.2.2 OpenMP Language Terminology
11197 // 1.2.2 OpenMP Language Terminology
11206 // 1.2.2 OpenMP Language Terminology
11266 // OpenMP [2.12.2, target data Construct, Restrictions]
11270 (LangOpts.OpenMP < 50 || !hasClauses(Clauses, OMPC_use_device_addr))) {
11272 if (LangOpts.OpenMP < 50)
11295 // 1.2.2 OpenMP Language Terminology
11304 // 1.2.2 OpenMP Language Terminology
11312 // OpenMP [2.10.2, Restrictions, p. 99]
11332 // 1.2.2 OpenMP Language Terminology
11341 // 1.2.2 OpenMP Language Terminology
11349 // OpenMP [2.10.3, Restrictions, p. 102]
11369 // 1.2.2 OpenMP Language Terminology
11378 // 1.2.2 OpenMP Language Terminology
11401 // 1.2.2 OpenMP Language Terminology
11517 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11522 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11565 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11570 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11603 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11608 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11651 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11656 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11677 // 1.2.2 OpenMP Language Terminology
11687 // 1.2.2 OpenMP Language Terminology
11708 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11713 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11733 // 1.2.2 OpenMP Language Terminology
11743 // 1.2.2 OpenMP Language Terminology
11775 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11780 // OpenMP, [2.9.2 taskloop Construct, Restrictions]
11825 // 1.2.2 OpenMP Language Terminology
11835 // 1.2.2 OpenMP Language Terminology
11869 // 1.2.2 OpenMP Language Terminology
11879 // 1.2.2 OpenMP Language Terminology
11926 // 1.2.2 OpenMP Language Terminology
11935 // 1.2.2 OpenMP Language Terminology
11982 // 1.2.2 OpenMP Language Terminology
11991 // 1.2.2 OpenMP Language Terminology
12037 // 1.2.2 OpenMP Language Terminology
12046 // 1.2.2 OpenMP Language Terminology
12093 // 1.2.2 OpenMP Language Terminology
12102 // 1.2.2 OpenMP Language Terminology
12138 // 1.2.2 OpenMP Language Terminology
12148 // 1.2.2 OpenMP Language Terminology
12199 // 1.2.2 OpenMP Language Terminology
12210 // 1.2.2 OpenMP Language Terminology
12261 // 1.2.2 OpenMP Language Terminology
12272 // 1.2.2 OpenMP Language Terminology
12311 // 1.2.2 OpenMP Language Terminology
12321 // 1.2.2 OpenMP Language Terminology
12341 // 1.2.2 OpenMP Language Terminology
12351 // 1.2.2 OpenMP Language Terminology
12384 // 1.2.2 OpenMP Language Terminology
12394 // 1.2.2 OpenMP Language Terminology
12439 // 1.2.2 OpenMP Language Terminology
12449 // 1.2.2 OpenMP Language Terminology
12498 // 1.2.2 OpenMP Language Terminology
12508 // 1.2.2 OpenMP Language Terminology
12902 // An OpenMP directive such as 'target parallel' has two captured regions:
13051 llvm_unreachable("Unexpected OpenMP directive with if-clause");
13054 llvm_unreachable("Unknown OpenMP directive");
13132 llvm_unreachable("Unexpected OpenMP directive with num_threads-clause");
13135 llvm_unreachable("Unknown OpenMP directive");
13211 llvm_unreachable("Unexpected OpenMP directive with num_teams-clause");
13214 llvm_unreachable("Unknown OpenMP directive");
13290 llvm_unreachable("Unexpected OpenMP directive with thread_limit-clause");
13293 llvm_unreachable("Unknown OpenMP directive");
13369 llvm_unreachable("Unexpected OpenMP directive with schedule clause");
13372 llvm_unreachable("Unknown OpenMP directive");
13448 llvm_unreachable("Unexpected OpenMP directive with dist_schedule clause");
13451 llvm_unreachable("Unknown OpenMP directive");
13529 llvm_unreachable("Unexpected OpenMP directive with device-clause");
13532 llvm_unreachable("Unknown OpenMP directive");
13610 llvm_unreachable("Unexpected OpenMP directive with grainsize-clause");
13613 llvm_unreachable("Unknown OpenMP directive");
13623 llvm_unreachable("Unexpected OpenMP directive");
13694 llvm_unreachable("Unexpected OpenMP clause.");
13719 DKind, OMPC_if, LangOpts.OpenMP, NameModifier);
13751 getOpenMPCaptureRegionForClause(DKind, OMPC_final, LangOpts.OpenMP);
13838 getOpenMPCaptureRegionForClause(DKind, CKind, SemaRef.LangOpts.OpenMP);
13857 // OpenMP [2.5, Restrictions]
13865 getOpenMPCaptureRegionForClause(DKind, OMPC_num_threads, LangOpts.OpenMP);
13912 // OpenMP [2.8.1, simd construct, Description]
13925 // OpenMP [2.8.1, simd construct, Description]
13982 // OpenMP [2.11.3, allocate Directive, Description]
14004 // OpenMP [2.7.1, loop construct, Description]
14005 // OpenMP [2.8.1, simd construct, Description]
14006 // OpenMP [2.9.6, distribute construct, Description]
14021 // OpenMP [2.7.1, loop construct, Description]
14022 // OpenMP [2.8.1, simd construct, Description]
14023 // OpenMP [2.9.6, distribute construct, Description]
14191 llvm_unreachable("DSA unexpected in OpenMP default clause");
14208 unsigned(LangOpts.OpenMP > 50
14215 if (Kind == OMP_PROC_BIND_primary && LangOpts.OpenMP < 51)
14445 // OpenMP, 2.7.1, Loop Construct, Restrictions
14473 // OpenMP, 2.7.1, Loop Construct, Restrictions
14476 // OpenMP 5.0 does not have this restriction.
14477 if (LangOpts.OpenMP < 50 &&
14499 // OpenMP [2.7.1, Restrictions]
14511 LangOpts.OpenMP) != OMPD_unknown &&
14758 // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]
14767 // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]
14794 // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]
14873 // OpenMP 5.1 [2.15.1, interop Construct, Restrictions]
14955 LangOpts.OpenMP);
14986 getOpenMPCaptureRegionForClause(DKind, OMPC_nocontext, LangOpts.OpenMP);
15008 getOpenMPCaptureRegionForClause(DKind, OMPC_filter, LangOpts.OpenMP);
15226 assert(RefExpr && "NULL expr in OpenMP private clause.");
15243 // OpenMP [2.9.3.3, Restrictions, C/C++, p.3]
15250 // OpenMP 5.0 [2.19.3, List Item Privatization, Restrictions]
15255 // OpenMP 3.1 [2.9.3.3, private clause, Restrictions]
15261 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
15292 // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]
15296 // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]
15300 if ((LangOpts.OpenMP <= 45 && isOpenMPTargetExecutionDirective(CurrDir)) ||
15319 // OpenMP [2.9.3.3, Restrictions, C/C++, p.1]
15326 // IdResolver, so the code in the OpenMP region uses original variable for
15392 assert(RefExpr && "NULL expr in OpenMP firstprivate clause.");
15411 // OpenMP [2.9.3.3, Restrictions, C/C++, p.3]
15419 // OpenMP [2.9.3.4, Restrictions, C/C++, p.1]
15433 // OpenMP [2.4.13, Data-sharing Attribute Clauses]
15437 // OpenMP 4.5 [2.10.8, Distribute Construct, p.3]
15451 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
15458 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
15471 // OpenMP [2.9.3.4, Restrictions, p.2]
15476 // OpenMP 4.5 [2.15.3.4, Restrictions, p.3]
15481 // OpenMP 4.5 [2.15.3.4, Restrictions, p.3]
15502 // OpenMP [2.9.3.4, Restrictions, p.3]
15508 // OpenMP [2.9.3.4, Restrictions, p.4]
15536 // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]
15540 // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]
15544 if ((LangOpts.OpenMP <= 45 &&
15589 // is not added to IdResolver, so the code in the OpenMP region uses
15681 assert(RefExpr && "NULL expr in OpenMP lastprivate clause.");
15700 // OpenMP [2.14.3.5, Restrictions, C/C++, p.2]
15708 // OpenMP 5.0 [2.19.3, List Item Privatization, Restrictions]
15713 // OpenMP 3.1 [2.9.3.5, lastprivate clause, Restrictions]
15719 // OpenMP 5.0 [2.19.4.5 lastprivate Clause, Restrictions]
15733 // OpenMP [2.14.1.1, Data-sharing Attribute Rules for Variables Referenced
15738 // OpenMP 4.5 [2.10.8, Distribute Construct, p.3]
15753 // OpenMP [2.14.3.5, Restrictions, p.2]
15773 // OpenMP [2.14.3.5, Restrictions, C++, p.1,2]
15851 assert(RefExpr && "NULL expr in OpenMP lastprivate clause.");
15865 // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced
16344 // OpenMP [2.14.3.6, reduction clause]
16432 assert(RefExpr && "nullptr expr in OpenMP reduction clause.");
16433 // OpenMP [2.1, C/C++]
16437 // OpenMP [2.14.3.3, Restrictions, p.1]
16487 // OpenMP [2.9.3.3, Restrictions, C/C++, p.3]
16493 // OpenMP [2.14.3.6, reduction clause, Restrictions]
16501 // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]
16518 // OpenMP [2.14.1.1, Data-sharing Attribute Rules for Variables Referenced
16525 // OpenMP [2.14.3.6, Restrictions, p.3]
16545 // OpenMP [2.14.3.6, Restrictions, p.1]
16596 // OpenMP [2.14.3.6, reduction clause, Restrictions]
16938 // OpenMP [2.15.4.6, Restrictions, p.2]
17059 // OpenMP 5.0, 2.19.5.4 reduction Clause, Restrictions
17155 // OpenMP 5.0 [2.19.3, List Item Privatization, Restrictions]
17195 assert(RefExpr && "NULL expr in OpenMP linear clause.");
17213 // OpenMP [2.14.3.7, linear clause]
17326 // OpenMP [2.14.3.7, linear clause]
17349 // OpenMP [2.15.11, distribute simd Construct]
17426 assert(RefExpr && "NULL expr in OpenMP linear clause.");
17442 // OpenMP [2.8.1, simd construct, Restrictions]
17459 // OpenMP [2.8.1, simd construct, Restrictions]
17477 // OpenMP [2.8.1, simd construct, Description]
17505 assert(RefExpr && "NULL expr in OpenMP copyin clause.");
17516 // OpenMP [2.1, C/C++]
17518 // OpenMP [2.14.4.1, Restrictions, p.1]
17540 // OpenMP [2.14.4.1, Restrictions, C/C++, p.1]
17549 // OpenMP [2.14.4.1, Restrictions, C/C++, p.2]
17599 assert(RefExpr && "NULL expr in OpenMP linear clause.");
17618 // OpenMP [2.14.4.2, Restrictions, p.2]
17633 // OpenMP [2.11.4.2, Restrictions, p.1]
17662 // OpenMP [2.14.4.1, Restrictions, C/C++, p.2]
17738 // OpenMP 5.0, 2.17.10.1 depobj Construct
17773 ((LangOpts.OpenMP < 50 ||
17779 if (LangOpts.OpenMP < 50 || DSAStack->getCurrentDirective() == OMPD_depobj)
17781 std::string Expected = (LangOpts.OpenMP >= 50 && !DepModifier)
17813 assert(RefExpr && "NULL expr in OpenMP shared clause.");
17829 // OpenMP [2.13.9, Summary]
17901 bool OMPDependTFound = LangOpts.OpenMP >= 50;
17906 // OpenMP 5.0, 2.17.11 depend Clause, Restrictions, C/C++
17925 // OpenMP 5.0 [2.17.11, Restrictions]
17950 // OpenMP 5.0, 2.17.11 depend Clause, Restrictions, C/C++
17960 << (LangOpts.OpenMP >= 50 ? 1 : 0) << 1
17974 << (LangOpts.OpenMP >= 50 ? 1 : 0)
17975 << (LangOpts.OpenMP >= 50 ? 1 : 0) << RefExpr->getSourceRange();
17988 << (LangOpts.OpenMP >= 50 ? 1 : 0)
17989 << (LangOpts.OpenMP >= 50 ? 1 : 0) << RefExpr->getSourceRange();
18022 assert((ModifierLoc.isInvalid() || LangOpts.OpenMP >= 50) &&
18023 "Unexpected device modifier in OpenMP < 50.");
18037 // OpenMP [2.9.1, Restrictions]
18047 getOpenMPCaptureRegionForClause(DKind, OMPC_device, LangOpts.OpenMP);
18187 // OpenMP 5.0 [2.19.7.1, map Clause, Restrictions, p.2]
18220 if (SemaRef.getLangOpts().OpenMP < 50) {
18268 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.3]
18282 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C++, p.1]
18287 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.2]
18303 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.7]
18360 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C++, p.1]
18389 SemaRef.getLangOpts().OpenMP >= 50) {
18445 if (SemaRef.getLangOpts().OpenMP < 50 || !UO->isLValue() ||
18457 if (SemaRef.getLangOpts().OpenMP < 50 || !BO->getType()->isPointerType()) {
18525 if (SemaRef.getLangOpts().OpenMP >= 50 && !CurComponents.empty() &&
18575 if (CKind == Kind && SemaRef.LangOpts.OpenMP >= 50)
18596 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.3]
18647 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.4]
18677 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C++, p.1]
18682 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]
18688 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]
18716 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.4]
18770 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]
18774 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.6]
18854 // [OpenMP 5.0], 2.19.7.3 declare mapper Directive, Restrictions
19004 if (SemaRef.getLangOpts().OpenMP < 50) {
19063 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.10]
19065 // OpenMP 4.5 [2.10.5, target update Construct]
19075 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.9]
19087 (SemaRef.getLangOpts().OpenMP <= 45 || StartLoc.isValid()) &&
19092 // OpenMP 4.5 [2.10.5, target update Construct]
19093 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C++, p.1]
19123 // OpenMP 4.5 [2.10.5, target update Construct, Restrictions, p.4]
19125 // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.9]
19133 // OpenMP [2.10.2, Restrictions, p. 99]
19147 // OpenMP [2.10.3, Restrictions, p. 102]
19161 // OpenMP 5.0 [2.12.2, Restrictions, p. 163]
19162 // OpenMP 5.0 [2.12.5, Restrictions, p. 174]
19175 // OpenMP 4.5 [2.15.5.1, Restrictions, p.3]
19179 // OpenMP 5.0 [2.19.7.1, Restrictions, p.7]
19183 if (VD && ((SemaRef.LangOpts.OpenMP <= 45 &&
19274 // [OpenMP 4.0], 2.15 declare reduction Directive, Restrictions, C\C++
19307 // [OpenMP 4.0], 2.15 declare reduction Directive, Restrictions
19544 // [OpenMP 5.0], 2.19.7.3 declare mapper Directive, Restrictions
19559 // [OpenMP 5.0], 2.19.7.3 declare mapper Directive, Restrictions
19619 if (LangOpts.OpenMP >= 50)
19658 assert(LangOpts.OpenMP && "Expected OpenMP mode.");
19666 assert(LangOpts.OpenMP && "Expected OpenMP mode.");
19677 // OpenMP [teams Constrcut, Restrictions]
19685 getOpenMPCaptureRegionForClause(DKind, OMPC_num_teams, LangOpts.OpenMP);
19704 // OpenMP [teams Constrcut, Restrictions]
19712 DKind, OMPC_thread_limit, LangOpts.OpenMP);
19732 // OpenMP [2.9.1, task Constrcut]
19752 // OpenMP [2.9.2, taskloop Constrcut]
19773 // OpenMP [2.9.2, taskloop Constrcut]
19789 // OpenMP [2.13.2, critical construct, Description]
19823 // OpenMP 5.0, 2.10.1 task Construct.
19845 // OpenMP 5.0, 2.10.1 task Construct
19889 // OpenMP [2.7.1, Restrictions]
19901 LangOpts.OpenMP) != OMPD_unknown &&
19920 if (getLangOpts().OpenMP < 50) {
19943 (LangOpts.OpenMP >= 50 && KindLoc.isInvalid());
19946 if (LangOpts.OpenMP == 50) {
19981 // OpenMP [5.0, 2.12.5, Restrictions, p. 174]
20076 if (LangOpts.OpenMP >= 50 &&
20118 if (SemaRef.LangOpts.OpenMP >= 50 &&
20123 // OpenMP 5.0, 2.12.7 declare target Directive, Restrictions
20291 assert(RefExpr && "NULL expr in OpenMP use_device_ptr clause.");
20374 assert(RefExpr && "NULL expr in OpenMP use_device_addr clause.");
20425 assert(RefExpr && "NULL expr in OpenMP is_device_ptr clause.");
20508 // OpenMP [2.11.4 allocate Clause, Description]
20524 // OpenMP 5.0, 2.11.4 allocate Clause, Restrictions.
20536 assert(RefExpr && "NULL expr in OpenMP private clause.");
20573 assert(RefExpr && "NULL expr in OpenMP nontemporal clause.");
20585 // OpenMP 5.0, 2.9.3.1 simd Construct, Restrictions.
20612 assert(RefExpr && "NULL expr in OpenMP nontemporal clause.");
20627 // OpenMP 5.0, 2.9.6, scan Directive, Restrictions.
20653 assert(RefExpr && "NULL expr in OpenMP nontemporal clause.");
20670 // OpenMP 5.0, 2.9.6, scan Directive, Restrictions.
20708 // OpenMP [2.12.5, target Construct]
20712 // OpenMP [2.12.5, target Construct]
20757 // OpenMP [2.12.5, target Construct]
20769 // OpenMP [2.12.5, target Construct]
20791 // OpenMP [2.12.5, target Construct]
20835 assert(RefExpr && "NULL expr in OpenMP shared clause.");