Skip to content

Commit 86f0cf0

Browse files
committed
Update syntax for fallback complex modifier
1 parent 84fc963 commit 86f0cf0

15 files changed

+158
-107
lines changed

clang/include/clang/AST/OpenMPClause.h

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9781,8 +9781,8 @@ class OMPDynGroupprivateClause : public OMPClause, public OMPClauseWithPreInit {
97819781
SourceLocation LParenLoc;
97829782

97839783
/// Modifiers for 'dyn_groupprivate' clause.
9784-
enum { FIRST, SECOND, NUM_MODIFIERS };
9785-
OpenMPDynGroupprivateClauseModifier Modifiers[NUM_MODIFIERS];
9784+
enum { SIMPLE, FALLBACK, NUM_MODIFIERS };
9785+
unsigned Modifiers[NUM_MODIFIERS];
97869786

97879787
/// Locations of modifiers.
97889788
SourceLocation ModifiersLoc[NUM_MODIFIERS];
@@ -9793,37 +9793,26 @@ class OMPDynGroupprivateClause : public OMPClause, public OMPClauseWithPreInit {
97939793
/// Set the first dyn_groupprivate modifier.
97949794
///
97959795
/// \param M The modifier.
9796-
void setFirstDynGroupprivateModifier(OpenMPDynGroupprivateClauseModifier M) {
9797-
Modifiers[FIRST] = M;
9796+
void setDynGroupprivateModifier(OpenMPDynGroupprivateClauseModifier M) {
9797+
Modifiers[SIMPLE] = M;
97989798
}
97999799

98009800
/// Set the second dyn_groupprivate modifier.
98019801
///
98029802
/// \param M The modifier.
9803-
void setSecondDynGroupprivateModifier(OpenMPDynGroupprivateClauseModifier M) {
9804-
Modifiers[SECOND] = M;
9803+
void setDynGroupprivateFallbackModifier(
9804+
OpenMPDynGroupprivateClauseFallbackModifier M) {
9805+
Modifiers[FALLBACK] = M;
98059806
}
98069807

98079808
/// Set location of the first dyn_groupprivate modifier.
9808-
void setFirstDynGroupprivateModifierLoc(SourceLocation Loc) {
9809-
ModifiersLoc[FIRST] = Loc;
9809+
void setDynGroupprivateModifierLoc(SourceLocation Loc) {
9810+
ModifiersLoc[SIMPLE] = Loc;
98109811
}
98119812

98129813
/// Set location of the second dyn_groupprivate modifier.
9813-
void setSecondDynGroupprivateModifierLoc(SourceLocation Loc) {
9814-
ModifiersLoc[SECOND] = Loc;
9815-
}
9816-
9817-
/// Set dyn_groupprivate modifier location.
9818-
///
9819-
/// \param M The modifier location.
9820-
void setDynGroupprivateModifer(OpenMPDynGroupprivateClauseModifier M) {
9821-
if (Modifiers[FIRST] == OMPC_DYN_GROUPPRIVATE_unknown)
9822-
Modifiers[FIRST] = M;
9823-
else {
9824-
assert(Modifiers[SECOND] == OMPC_DYN_GROUPPRIVATE_unknown);
9825-
Modifiers[SECOND] = M;
9826-
}
9814+
void setDynGroupprivateFallbackModifierLoc(SourceLocation Loc) {
9815+
ModifiersLoc[FALLBACK] = Loc;
98279816
}
98289817

98299818
/// Sets the location of '('.
@@ -9852,47 +9841,49 @@ class OMPDynGroupprivateClause : public OMPClause, public OMPClauseWithPreInit {
98529841
OpenMPDirectiveKind CaptureRegion,
98539842
OpenMPDynGroupprivateClauseModifier M1,
98549843
SourceLocation M1Loc,
9855-
OpenMPDynGroupprivateClauseModifier M2,
9844+
OpenMPDynGroupprivateClauseFallbackModifier M2,
98569845
SourceLocation M2Loc)
98579846
: OMPClause(llvm::omp::OMPC_dyn_groupprivate, StartLoc, EndLoc),
98589847
OMPClauseWithPreInit(this), LParenLoc(LParenLoc), Size(Size) {
98599848
setPreInitStmt(HelperSize, CaptureRegion);
9860-
Modifiers[FIRST] = M1;
9861-
Modifiers[SECOND] = M2;
9862-
ModifiersLoc[FIRST] = M1Loc;
9863-
ModifiersLoc[SECOND] = M2Loc;
9849+
Modifiers[SIMPLE] = M1;
9850+
Modifiers[FALLBACK] = M2;
9851+
ModifiersLoc[SIMPLE] = M1Loc;
9852+
ModifiersLoc[FALLBACK] = M2Loc;
98649853
}
98659854

98669855
/// Build an empty clause.
98679856
explicit OMPDynGroupprivateClause()
98689857
: OMPClause(llvm::omp::OMPC_dyn_groupprivate, SourceLocation(),
98699858
SourceLocation()),
98709859
OMPClauseWithPreInit(this) {
9871-
Modifiers[FIRST] = OMPC_DYN_GROUPPRIVATE_unknown;
9872-
Modifiers[SECOND] = OMPC_DYN_GROUPPRIVATE_unknown;
9860+
Modifiers[SIMPLE] = OMPC_DYN_GROUPPRIVATE_unknown;
9861+
Modifiers[FALLBACK] = OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown;
98739862
}
98749863

98759864
/// Get the first modifier of the clause.
9876-
OpenMPDynGroupprivateClauseModifier getFirstDynGroupprivateModifier() const {
9877-
return Modifiers[FIRST];
9865+
OpenMPDynGroupprivateClauseModifier getDynGroupprivateModifier() const {
9866+
return static_cast<OpenMPDynGroupprivateClauseModifier>(Modifiers[SIMPLE]);
98789867
}
98799868

98809869
/// Get the second modifier of the clause.
9881-
OpenMPDynGroupprivateClauseModifier getSecondDynGroupprivateModifier() const {
9882-
return Modifiers[SECOND];
9870+
OpenMPDynGroupprivateClauseFallbackModifier
9871+
getDynGroupprivateFallbackModifier() const {
9872+
return static_cast<OpenMPDynGroupprivateClauseFallbackModifier>(
9873+
Modifiers[FALLBACK]);
98839874
}
98849875

98859876
/// Get location of '('.
98869877
SourceLocation getLParenLoc() { return LParenLoc; }
98879878

98889879
/// Get the first modifier location.
9889-
SourceLocation getFirstDynGroupprivateModifierLoc() const {
9890-
return ModifiersLoc[FIRST];
9880+
SourceLocation getDynGroupprivateModifierLoc() const {
9881+
return ModifiersLoc[SIMPLE];
98919882
}
98929883

98939884
/// Get the second modifier location.
9894-
SourceLocation getSecondDynGroupprivateModifierLoc() const {
9895-
return ModifiersLoc[SECOND];
9885+
SourceLocation getDynGroupprivateFallbackModifierLoc() const {
9886+
return ModifiersLoc[FALLBACK];
98969887
}
98979888

98989889
/// Get size.

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12058,7 +12058,7 @@ def err_omp_unexpected_schedule_modifier : Error<
1205812058
"modifier '%0' cannot be used along with modifier '%1'">;
1205912059
def err_omp_schedule_nonmonotonic_static : Error<
1206012060
"'nonmonotonic' modifier can only be specified with 'dynamic' or 'guided' schedule kind">;
12061-
def err_omp_unexpected_dyn_groupprivate_modifier
12061+
def err_omp_incompatible_dyn_groupprivate_modifier
1206212062
: Error<"modifier '%0' cannot be used along with modifier '%1' in "
1206312063
"dyn_groupprivate">;
1206412064
def err_omp_simple_clause_incompatible_with_ordered : Error<

clang/include/clang/Basic/OpenMPKinds.def

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686
#ifndef OPENMP_DYN_GROUPPRIVATE_MODIFIER
8787
#define OPENMP_DYN_GROUPPRIVATE_MODIFIER(Name)
8888
#endif
89+
#ifndef OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER
90+
#define OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(Name)
91+
#endif
8992
#ifndef OPENMP_NUMTASKS_MODIFIER
9093
#define OPENMP_NUMTASKS_MODIFIER(Name)
9194
#endif
@@ -232,8 +235,11 @@ OPENMP_GRAINSIZE_MODIFIER(strict)
232235

233236
// Modifiers for the 'dyn_groupprivate' clause.
234237
OPENMP_DYN_GROUPPRIVATE_MODIFIER(cgroup)
235-
OPENMP_DYN_GROUPPRIVATE_MODIFIER(strict)
236-
OPENMP_DYN_GROUPPRIVATE_MODIFIER(fallback)
238+
239+
// Fallback modifiers for the 'dyn_groupprivate' clause.
240+
OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(abort)
241+
OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(null)
242+
OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(default_mem)
237243

238244
// Modifiers for the 'num_tasks' clause.
239245
OPENMP_NUMTASKS_MODIFIER(strict)
@@ -254,6 +260,7 @@ OPENMP_DOACROSS_MODIFIER(source_omp_cur_iteration)
254260
#undef OPENMP_NUMTASKS_MODIFIER
255261
#undef OPENMP_NUMTHREADS_MODIFIER
256262
#undef OPENMP_DYN_GROUPPRIVATE_MODIFIER
263+
#undef OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER
257264
#undef OPENMP_GRAINSIZE_MODIFIER
258265
#undef OPENMP_BIND_KIND
259266
#undef OPENMP_ADJUST_ARGS_KIND

clang/include/clang/Basic/OpenMPKinds.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,13 @@ enum OpenMPDynGroupprivateClauseModifier {
223223
OMPC_DYN_GROUPPRIVATE_unknown
224224
};
225225

226-
/// Number of allowed dyn_groupprivate-modifiers.
227-
static constexpr unsigned NumberOfOMPDynGroupprivateClauseModifiers =
228-
OMPC_DYN_GROUPPRIVATE_unknown;
226+
enum OpenMPDynGroupprivateClauseFallbackModifier {
227+
OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown = OMPC_DYN_GROUPPRIVATE_unknown,
228+
#define OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(Name) \
229+
OMPC_DYN_GROUPPRIVATE_FALLBACK_##Name,
230+
#include "clang/Basic/OpenMPKinds.def"
231+
OMPC_DYN_GROUPPRIVATE_FALLBACK_last
232+
};
229233

230234
enum OpenMPNumTasksClauseModifier {
231235
#define OPENMP_NUMTASKS_MODIFIER(Name) OMPC_NUMTASKS_##Name,

clang/include/clang/Sema/SemaOpenMP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ class SemaOpenMP : public SemaBase {
13881388
/// Called on a well-formed 'dyn_groupprivate' clause.
13891389
OMPClause *ActOnOpenMPDynGroupprivateClause(
13901390
OpenMPDynGroupprivateClauseModifier M1,
1391-
OpenMPDynGroupprivateClauseModifier M2, Expr *Size,
1391+
OpenMPDynGroupprivateClauseFallbackModifier M2, Expr *Size,
13921392
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc,
13931393
SourceLocation M2Loc, SourceLocation EndLoc);
13941394

clang/lib/AST/OpenMPClause.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,15 +2726,14 @@ void OMPClausePrinter::VisitOMPXDynCGroupMemClause(
27262726
void OMPClausePrinter::VisitOMPDynGroupprivateClause(
27272727
OMPDynGroupprivateClause *Node) {
27282728
OS << "dyn_groupprivate(";
2729-
if (Node->getFirstDynGroupprivateModifier() !=
2730-
OMPC_DYN_GROUPPRIVATE_unknown) {
2731-
OS << getOpenMPSimpleClauseTypeName(
2732-
OMPC_dyn_groupprivate, Node->getFirstDynGroupprivateModifier());
2733-
if (Node->getSecondDynGroupprivateModifier() !=
2734-
OMPC_DYN_GROUPPRIVATE_unknown) {
2729+
if (Node->getDynGroupprivateModifier() != OMPC_DYN_GROUPPRIVATE_unknown) {
2730+
OS << getOpenMPSimpleClauseTypeName(OMPC_dyn_groupprivate,
2731+
Node->getDynGroupprivateModifier());
2732+
if (Node->getDynGroupprivateFallbackModifier() !=
2733+
OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown) {
27352734
OS << ", ";
27362735
OS << getOpenMPSimpleClauseTypeName(
2737-
OMPC_dyn_groupprivate, Node->getSecondDynGroupprivateModifier());
2736+
OMPC_dyn_groupprivate, Node->getDynGroupprivateFallbackModifier());
27382737
}
27392738
OS << ": ";
27402739
}

clang/lib/Basic/OpenMPKinds.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
175175
return llvm::StringSwitch<unsigned>(Str)
176176
#define OPENMP_DYN_GROUPPRIVATE_MODIFIER(Name) \
177177
.Case(#Name, OMPC_DYN_GROUPPRIVATE_##Name)
178+
#define OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(Name) \
179+
.Case(#Name, OMPC_DYN_GROUPPRIVATE_FALLBACK_##Name) \
180+
.Case("fallback(" #Name ")", OMPC_DYN_GROUPPRIVATE_FALLBACK_##Name)
178181
#include "clang/Basic/OpenMPKinds.def"
179182
.Default(OMPC_DYN_GROUPPRIVATE_unknown);
180183
}
@@ -518,10 +521,14 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
518521
case OMPC_dyn_groupprivate:
519522
switch (Type) {
520523
case OMPC_DYN_GROUPPRIVATE_unknown:
524+
case OMPC_DYN_GROUPPRIVATE_FALLBACK_last:
521525
return "unknown";
522526
#define OPENMP_DYN_GROUPPRIVATE_MODIFIER(Name) \
523527
case OMPC_DYN_GROUPPRIVATE_##Name: \
524528
return #Name;
529+
#define OPENMP_DYN_GROUPPRIVATE_FALLBACK_MODIFIER(Name) \
530+
case OMPC_DYN_GROUPPRIVATE_FALLBACK_##Name: \
531+
return "fallback(" #Name ")";
525532
#include "clang/Basic/OpenMPKinds.def"
526533
}
527534
llvm_unreachable("Invalid OpenMP 'dyn_groupprivate' clause modifier");

clang/lib/Parse/ParseOpenMP.cpp

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3837,31 +3837,72 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind,
38373837
KLoc.emplace_back();
38383838
}
38393839
} else if (Kind == OMPC_dyn_groupprivate) {
3840-
enum { Modifier1, Modifier2, NumberOfElements };
3841-
Arg.resize(NumberOfElements);
3842-
KLoc.resize(NumberOfElements);
3843-
Arg[Modifier1] = OMPC_DYN_GROUPPRIVATE_unknown;
3844-
Arg[Modifier2] = OMPC_DYN_GROUPPRIVATE_unknown;
3845-
unsigned Modifier = getOpenMPSimpleClauseType(
3846-
Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts());
3840+
enum { SimpleModifier, ComplexModifier, NumberOfModifiers };
3841+
Arg.resize(NumberOfModifiers);
3842+
KLoc.resize(NumberOfModifiers);
3843+
Arg[SimpleModifier] = OMPC_DYN_GROUPPRIVATE_unknown;
3844+
Arg[ComplexModifier] = OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown;
3845+
3846+
auto consumeModifier = [&]() {
3847+
unsigned Type = NumberOfModifiers;
3848+
unsigned Modifier;
3849+
SourceLocation Loc;
3850+
if (PP.getSpelling(Tok) == "fallback" && NextToken().is(tok::l_paren)) {
3851+
ConsumeToken();
3852+
BalancedDelimiterTracker ParenT(*this, tok::l_paren, tok::r_paren);
3853+
ParenT.consumeOpen();
38473854

3848-
if (Modifier < OMPC_DYN_GROUPPRIVATE_unknown) {
3849-
// Parse 'modifier'
3850-
Arg[Modifier1] = Modifier;
3851-
KLoc[Modifier1] = Tok.getLocation();
3852-
if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) &&
3853-
Tok.isNot(tok::annot_pragma_openmp_end))
3854-
ConsumeAnyToken();
3855-
if (Tok.is(tok::comma)) {
3856-
// Parse ',' 'modifier'
3857-
ConsumeAnyToken();
38583855
Modifier = getOpenMPSimpleClauseType(
38593856
Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts());
3860-
Arg[Modifier2] = Modifier;
3861-
KLoc[Modifier2] = Tok.getLocation();
3857+
if (Modifier <= OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown ||
3858+
Modifier >= OMPC_DYN_GROUPPRIVATE_FALLBACK_last) {
3859+
Diag(Tok.getLocation(), diag::err_expected)
3860+
<< "'abort', 'null' or 'default_mem' in fallback modifier";
3861+
SkipUntil(tok::r_paren);
3862+
return std::make_tuple(Type, Modifier, Loc);
3863+
}
3864+
Type = ComplexModifier;
3865+
Loc = Tok.getLocation();
38623866
if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) &&
38633867
Tok.isNot(tok::annot_pragma_openmp_end))
38643868
ConsumeAnyToken();
3869+
ParenT.consumeClose();
3870+
} else {
3871+
Modifier = getOpenMPSimpleClauseType(
3872+
Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts());
3873+
if (Modifier < OMPC_DYN_GROUPPRIVATE_unknown) {
3874+
Type = SimpleModifier;
3875+
Loc = Tok.getLocation();
3876+
if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) &&
3877+
Tok.isNot(tok::annot_pragma_openmp_end))
3878+
ConsumeAnyToken();
3879+
}
3880+
}
3881+
return std::make_tuple(Type, Modifier, Loc);
3882+
};
3883+
3884+
auto saveModifier = [&](unsigned Type, unsigned Modifier,
3885+
SourceLocation Loc) {
3886+
assert(Type < NumberOfModifiers);
3887+
if (!KLoc[Type].isValid()) {
3888+
Arg[Type] = Modifier;
3889+
KLoc[Type] = Loc;
3890+
} else
3891+
Diag(Loc, diag::err_omp_incompatible_dyn_groupprivate_modifier)
3892+
<< getOpenMPSimpleClauseTypeName(OMPC_dyn_groupprivate, Modifier)
3893+
<< getOpenMPSimpleClauseTypeName(OMPC_dyn_groupprivate, Arg[Type]);
3894+
};
3895+
3896+
// Parse 'modifier'
3897+
auto [Type1, Mod1, Loc1] = consumeModifier();
3898+
if (Type1 < NumberOfModifiers) {
3899+
saveModifier(Type1, Mod1, Loc1);
3900+
if (Tok.is(tok::comma)) {
3901+
// Parse ',' 'modifier'
3902+
ConsumeAnyToken();
3903+
auto [Type2, Mod2, Loc2] = consumeModifier();
3904+
if (Type2 < NumberOfModifiers)
3905+
saveModifier(Type2, Mod2, Loc2);
38653906
}
38663907
// Parse ':'
38673908
if (Tok.is(tok::colon))

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16731,7 +16731,8 @@ OMPClause *SemaOpenMP::ActOnOpenMPSingleExprWithArgClause(
1673116731
ArgumentLoc.size() == NumberOfElements);
1673216732
Res = ActOnOpenMPDynGroupprivateClause(
1673316733
static_cast<OpenMPDynGroupprivateClauseModifier>(Argument[Modifier1]),
16734-
static_cast<OpenMPDynGroupprivateClauseModifier>(Argument[Modifier2]),
16734+
static_cast<OpenMPDynGroupprivateClauseFallbackModifier>(
16735+
Argument[Modifier2]),
1673516736
Expr, StartLoc, LParenLoc, ArgumentLoc[Modifier1],
1673616737
ArgumentLoc[Modifier2], EndLoc);
1673716738
} break;
@@ -24179,12 +24180,12 @@ OMPClause *SemaOpenMP::ActOnOpenMPXDynCGroupMemClause(Expr *Size,
2417924180

2418024181
OMPClause *SemaOpenMP::ActOnOpenMPDynGroupprivateClause(
2418124182
OpenMPDynGroupprivateClauseModifier M1,
24182-
OpenMPDynGroupprivateClauseModifier M2, Expr *Size, SourceLocation StartLoc,
24183-
SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
24184-
SourceLocation EndLoc) {
24183+
OpenMPDynGroupprivateClauseFallbackModifier M2, Expr *Size,
24184+
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc,
24185+
SourceLocation M2Loc, SourceLocation EndLoc) {
2418524186

2418624187
if ((M1Loc.isValid() && M1 == OMPC_DYN_GROUPPRIVATE_unknown) ||
24187-
(M2Loc.isValid() && M2 == OMPC_DYN_GROUPPRIVATE_unknown)) {
24188+
(M2Loc.isValid() && M2 == OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown)) {
2418824189
std::string Values = getListOfPossibleValues(
2418924190
OMPC_dyn_groupprivate, /*First=*/0, OMPC_DYN_GROUPPRIVATE_unknown);
2419024191
Diag((M1Loc.isValid() && M1 == OMPC_DYN_GROUPPRIVATE_unknown) ? M1Loc
@@ -24194,18 +24195,6 @@ OMPClause *SemaOpenMP::ActOnOpenMPDynGroupprivateClause(
2419424195
return nullptr;
2419524196
}
2419624197

24197-
if ((M1Loc.isValid() && M2Loc.isValid() && M1 == M2) ||
24198-
(M1 == OMPC_DYN_GROUPPRIVATE_strict &&
24199-
M2 == OMPC_DYN_GROUPPRIVATE_fallback) ||
24200-
(M1 == OMPC_DYN_GROUPPRIVATE_fallback &&
24201-
M2 == OMPC_DYN_GROUPPRIVATE_strict)) {
24202-
24203-
Diag(M2Loc, diag::err_omp_unexpected_dyn_groupprivate_modifier)
24204-
<< getOpenMPSimpleClauseTypeName(OMPC_dyn_groupprivate, M2)
24205-
<< getOpenMPSimpleClauseTypeName(OMPC_dyn_groupprivate, M1);
24206-
return nullptr;
24207-
}
24208-
2420924198
Expr *ValExpr = Size;
2421024199
Stmt *HelperValStmt = nullptr;
2421124200

clang/lib/Sema/TreeTransform.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,7 @@ class TreeTransform {
24652465
/// Subclasses may override this routine to provide different behavior.
24662466
OMPClause *RebuildOMPDynGroupprivateClause(
24672467
OpenMPDynGroupprivateClauseModifier M1,
2468-
OpenMPDynGroupprivateClauseModifier M2, Expr *Size,
2468+
OpenMPDynGroupprivateClauseFallbackModifier M2, Expr *Size,
24692469
SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc,
24702470
SourceLocation M2Loc, SourceLocation EndLoc) {
24712471
return getSema().OpenMP().ActOnOpenMPDynGroupprivateClause(
@@ -11727,10 +11727,10 @@ OMPClause *TreeTransform<Derived>::TransformOMPDynGroupprivateClause(
1172711727
if (Size.isInvalid())
1172811728
return nullptr;
1172911729
return getDerived().RebuildOMPDynGroupprivateClause(
11730-
C->getFirstDynGroupprivateModifier(),
11731-
C->getSecondDynGroupprivateModifier(), Size.get(), C->getBeginLoc(),
11732-
C->getLParenLoc(), C->getFirstDynGroupprivateModifierLoc(),
11733-
C->getSecondDynGroupprivateModifierLoc(), C->getEndLoc());
11730+
C->getDynGroupprivateModifier(), C->getDynGroupprivateFallbackModifier(),
11731+
Size.get(), C->getBeginLoc(), C->getLParenLoc(),
11732+
C->getDynGroupprivateModifierLoc(),
11733+
C->getDynGroupprivateFallbackModifierLoc(), C->getEndLoc());
1173411734
}
1173511735

1173611736
template <typename Derived>

0 commit comments

Comments
 (0)