Skip to content

Commit ab9eac7

Browse files
mdfazlaymikerice1969
authored andcommitted
[OpenMP] Initial parsing/sema for 'strict' modifier with 'grainsize' clause
This patch gives basic parsing and semantic analysis support for 'strict' modifier with 'grainsize' clause of 'taskloop' construct introduced in OpenMP 5.1 (section 2.12.2) Differential Revision: https://reviews.llvm.org/D138217
1 parent 47e953e commit ab9eac7

24 files changed

+423
-26
lines changed

clang/include/clang/AST/OpenMPClause.h

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6354,26 +6354,43 @@ class OMPGrainsizeClause : public OMPClause, public OMPClauseWithPreInit {
63546354
/// Location of '('.
63556355
SourceLocation LParenLoc;
63566356

6357+
/// Modifiers for 'grainsize' clause.
6358+
OpenMPGrainsizeClauseModifier Modifier = OMPC_GRAINSIZE_unknown;
6359+
6360+
/// Location of the modifier.
6361+
SourceLocation ModifierLoc;
6362+
63576363
/// Safe iteration space distance.
63586364
Stmt *Grainsize = nullptr;
63596365

63606366
/// Set safelen.
63616367
void setGrainsize(Expr *Size) { Grainsize = Size; }
63626368

6369+
/// Sets modifier.
6370+
void setModifier(OpenMPGrainsizeClauseModifier M) { Modifier = M; }
6371+
6372+
/// Sets modifier location.
6373+
void setModifierLoc(SourceLocation Loc) { ModifierLoc = Loc; }
6374+
63636375
public:
63646376
/// Build 'grainsize' clause.
63656377
///
6378+
/// \param Modifier Clause modifier.
63666379
/// \param Size Expression associated with this clause.
63676380
/// \param HelperSize Helper grainsize for the construct.
63686381
/// \param CaptureRegion Innermost OpenMP region where expressions in this
63696382
/// clause must be captured.
63706383
/// \param StartLoc Starting location of the clause.
6384+
/// \param ModifierLoc Modifier location.
6385+
/// \param LParenLoc Location of '('.
63716386
/// \param EndLoc Ending location of the clause.
6372-
OMPGrainsizeClause(Expr *Size, Stmt *HelperSize,
6373-
OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc,
6374-
SourceLocation LParenLoc, SourceLocation EndLoc)
6387+
OMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier, Expr *Size,
6388+
Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion,
6389+
SourceLocation StartLoc, SourceLocation LParenLoc,
6390+
SourceLocation ModifierLoc, SourceLocation EndLoc)
63756391
: OMPClause(llvm::omp::OMPC_grainsize, StartLoc, EndLoc),
6376-
OMPClauseWithPreInit(this), LParenLoc(LParenLoc), Grainsize(Size) {
6392+
OMPClauseWithPreInit(this), LParenLoc(LParenLoc), Modifier(Modifier),
6393+
ModifierLoc(ModifierLoc), Grainsize(Size) {
63776394
setPreInitStmt(HelperSize, CaptureRegion);
63786395
}
63796396

@@ -6392,6 +6409,12 @@ class OMPGrainsizeClause : public OMPClause, public OMPClauseWithPreInit {
63926409
/// Return safe iteration space distance.
63936410
Expr *getGrainsize() const { return cast_or_null<Expr>(Grainsize); }
63946411

6412+
/// Gets modifier.
6413+
OpenMPGrainsizeClauseModifier getModifier() const { return Modifier; }
6414+
6415+
/// Gets modifier location.
6416+
SourceLocation getModifierLoc() const { return ModifierLoc; }
6417+
63956418
child_range children() { return child_range(&Grainsize, &Grainsize + 1); }
63966419

63976420
const_child_range children() const {

clang/include/clang/Basic/DiagnosticParseKinds.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,7 @@ def warn_pragma_unsupported_extension : Warning<
13161316
def warn_pragma_extension_is_core : Warning<
13171317
"OpenCL extension %0 is core feature or supported optional core feature - ignoring">,
13181318
InGroup<OpenCLCoreFeaturesDiagGroup>, DefaultIgnore;
1319+
def err_modifier_expected_colon : Error<"missing ':' after %0 modifier">;
13191320

13201321
// OpenCL errors.
13211322
def err_opencl_taking_function_address_parser : Error<

clang/include/clang/Basic/OpenMPKinds.def

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
#ifndef OPENMP_BIND_KIND
7272
#define OPENMP_BIND_KIND(Name)
7373
#endif
74+
#ifndef OPENMP_GRAINSIZE_MODIFIER
75+
#define OPENMP_GRAINSIZE_MODIFIER(Name)
76+
#endif
7477

7578
// Static attributes for 'schedule' clause.
7679
OPENMP_SCHEDULE_KIND(static)
@@ -181,6 +184,10 @@ OPENMP_BIND_KIND(teams)
181184
OPENMP_BIND_KIND(parallel)
182185
OPENMP_BIND_KIND(thread)
183186

187+
// Modifiers for the 'grainsize' clause.
188+
OPENMP_GRAINSIZE_MODIFIER(strict)
189+
190+
#undef OPENMP_GRAINSIZE_MODIFIER
184191
#undef OPENMP_BIND_KIND
185192
#undef OPENMP_ADJUST_ARGS_KIND
186193
#undef OPENMP_REDUCTION_MODIFIER

clang/include/clang/Basic/OpenMPKinds.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ enum OpenMPBindClauseKind {
195195
OMPC_BIND_unknown
196196
};
197197

198+
enum OpenMPGrainsizeClauseModifier {
199+
#define OPENMP_GRAINSIZE_MODIFIER(Name) OMPC_GRAINSIZE_##Name,
200+
#include "clang/Basic/OpenMPKinds.def"
201+
OMPC_GRAINSIZE_unknown
202+
};
203+
198204
/// Contains 'interop' data for 'append_args' and 'init' clauses.
199205
class Expr;
200206
struct OMPInteropInfo final {

clang/include/clang/Sema/Sema.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11679,8 +11679,10 @@ class Sema final {
1167911679
SourceLocation LParenLoc = SourceLocation(),
1168011680
Expr *NumForLoops = nullptr);
1168111681
/// Called on well-formed 'grainsize' clause.
11682-
OMPClause *ActOnOpenMPGrainsizeClause(Expr *Size, SourceLocation StartLoc,
11682+
OMPClause *ActOnOpenMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier,
11683+
Expr *Size, SourceLocation StartLoc,
1168311684
SourceLocation LParenLoc,
11685+
SourceLocation ModifierLoc,
1168411686
SourceLocation EndLoc);
1168511687
/// Called on well-formed 'num_tasks' clause.
1168611688
OMPClause *ActOnOpenMPNumTasksClause(Expr *NumTasks, SourceLocation StartLoc,

clang/lib/AST/OpenMPClause.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,11 @@ void OMPClausePrinter::VisitOMPPriorityClause(OMPPriorityClause *Node) {
19201920

19211921
void OMPClausePrinter::VisitOMPGrainsizeClause(OMPGrainsizeClause *Node) {
19221922
OS << "grainsize(";
1923+
OpenMPGrainsizeClauseModifier Modifier = Node->getModifier();
1924+
if (Modifier != OMPC_GRAINSIZE_unknown) {
1925+
OS << getOpenMPSimpleClauseTypeName(Node->getClauseKind(), Modifier)
1926+
<< ": ";
1927+
}
19231928
Node->getGrainsize()->printPretty(OS, nullptr, Policy, 0);
19241929
OS << ")";
19251930
}

clang/lib/Basic/OpenMPKinds.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
149149
#define OPENMP_BIND_KIND(Name) .Case(#Name, OMPC_BIND_##Name)
150150
#include "clang/Basic/OpenMPKinds.def"
151151
.Default(OMPC_BIND_unknown);
152+
case OMPC_grainsize: {
153+
unsigned Type = llvm::StringSwitch<unsigned>(Str)
154+
#define OPENMP_GRAINSIZE_MODIFIER(Name) .Case(#Name, OMPC_GRAINSIZE_##Name)
155+
#include "clang/Basic/OpenMPKinds.def"
156+
.Default(OMPC_GRAINSIZE_unknown);
157+
if (LangOpts.OpenMP < 51)
158+
return OMPC_GRAINSIZE_unknown;
159+
return Type;
160+
}
152161
case OMPC_unknown:
153162
case OMPC_threadprivate:
154163
case OMPC_if:
@@ -188,7 +197,6 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind, StringRef Str,
188197
case OMPC_num_teams:
189198
case OMPC_thread_limit:
190199
case OMPC_priority:
191-
case OMPC_grainsize:
192200
case OMPC_nogroup:
193201
case OMPC_num_tasks:
194202
case OMPC_hint:
@@ -436,6 +444,16 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
436444
#include "clang/Basic/OpenMPKinds.def"
437445
}
438446
llvm_unreachable("Invalid OpenMP 'bind' clause type");
447+
case OMPC_grainsize:
448+
switch (Type) {
449+
case OMPC_GRAINSIZE_unknown:
450+
return "unknown";
451+
#define OPENMP_GRAINSIZE_MODIFIER(Name) \
452+
case OMPC_GRAINSIZE_##Name: \
453+
return #Name;
454+
#include "clang/Basic/OpenMPKinds.def"
455+
}
456+
llvm_unreachable("Invalid OpenMP 'grainsize' clause modifier");
439457
case OMPC_unknown:
440458
case OMPC_threadprivate:
441459
case OMPC_if:
@@ -475,7 +493,6 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
475493
case OMPC_num_teams:
476494
case OMPC_thread_limit:
477495
case OMPC_priority:
478-
case OMPC_grainsize:
479496
case OMPC_nogroup:
480497
case OMPC_num_tasks:
481498
case OMPC_hint:

clang/lib/Parse/ParseOpenMP.cpp

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3226,6 +3226,8 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
32263226
if ((CKind == OMPC_ordered || CKind == OMPC_partial) &&
32273227
PP.LookAhead(/*N=*/0).isNot(tok::l_paren))
32283228
Clause = ParseOpenMPClause(CKind, WrongDirective);
3229+
else if (CKind == OMPC_grainsize)
3230+
Clause = ParseOpenMPSingleExprWithArgClause(DKind, CKind, WrongDirective);
32293231
else
32303232
Clause = ParseOpenMPSingleExprClause(CKind, WrongDirective);
32313233
break;
@@ -3871,6 +3873,33 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind,
38713873
Arg.push_back(OMPC_DEVICE_unknown);
38723874
KLoc.emplace_back();
38733875
}
3876+
} else if (Kind == OMPC_grainsize) {
3877+
// Parse optional <grainsize modifier> ':'
3878+
OpenMPGrainsizeClauseModifier Modifier =
3879+
static_cast<OpenMPGrainsizeClauseModifier>(getOpenMPSimpleClauseType(
3880+
Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok),
3881+
getLangOpts()));
3882+
if (getLangOpts().OpenMP >= 51) {
3883+
if (NextToken().is(tok::colon)) {
3884+
Arg.push_back(Modifier);
3885+
KLoc.push_back(Tok.getLocation());
3886+
// Parse modifier
3887+
ConsumeAnyToken();
3888+
// Parse ':'
3889+
ConsumeAnyToken();
3890+
} else {
3891+
if (Modifier == OMPC_GRAINSIZE_strict) {
3892+
Diag(Tok, diag::err_modifier_expected_colon) << "strict";
3893+
// Parse modifier
3894+
ConsumeAnyToken();
3895+
}
3896+
Arg.push_back(OMPC_GRAINSIZE_unknown);
3897+
KLoc.emplace_back();
3898+
}
3899+
} else {
3900+
Arg.push_back(OMPC_GRAINSIZE_unknown);
3901+
KLoc.emplace_back();
3902+
}
38743903
} else {
38753904
assert(Kind == OMPC_if);
38763905
KLoc.push_back(Tok.getLocation());
@@ -3893,7 +3922,8 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind,
38933922

38943923
bool NeedAnExpression = (Kind == OMPC_schedule && DelimLoc.isValid()) ||
38953924
(Kind == OMPC_dist_schedule && DelimLoc.isValid()) ||
3896-
Kind == OMPC_if || Kind == OMPC_device;
3925+
Kind == OMPC_if || Kind == OMPC_device ||
3926+
Kind == OMPC_grainsize;
38973927
if (NeedAnExpression) {
38983928
SourceLocation ELoc = Tok.getLocation();
38993929
ExprResult LHS(ParseCastExpression(AnyCastExpr, false, NotTypeCast));

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15110,9 +15110,6 @@ OMPClause *Sema::ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr,
1511015110
case OMPC_priority:
1511115111
Res = ActOnOpenMPPriorityClause(Expr, StartLoc, LParenLoc, EndLoc);
1511215112
break;
15113-
case OMPC_grainsize:
15114-
Res = ActOnOpenMPGrainsizeClause(Expr, StartLoc, LParenLoc, EndLoc);
15115-
break;
1511615113
case OMPC_num_tasks:
1511715114
Res = ActOnOpenMPNumTasksClause(Expr, StartLoc, LParenLoc, EndLoc);
1511815115
break;
@@ -15140,6 +15137,7 @@ OMPClause *Sema::ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr,
1514015137
case OMPC_align:
1514115138
Res = ActOnOpenMPAlignClause(Expr, StartLoc, LParenLoc, EndLoc);
1514215139
break;
15140+
case OMPC_grainsize:
1514315141
case OMPC_device:
1514415142
case OMPC_if:
1514515143
case OMPC_default:
@@ -16879,6 +16877,13 @@ OMPClause *Sema::ActOnOpenMPSingleExprWithArgClause(
1687916877
static_cast<OpenMPDeviceClauseModifier>(Argument.back()), Expr,
1688016878
StartLoc, LParenLoc, ArgumentLoc.back(), EndLoc);
1688116879
break;
16880+
case OMPC_grainsize:
16881+
assert(Argument.size() == 1 && ArgumentLoc.size() == 1 &&
16882+
"Modifier for grainsize clause and its location are expected.");
16883+
Res = ActOnOpenMPGrainsizeClause(
16884+
static_cast<OpenMPGrainsizeClauseModifier>(Argument.back()), Expr,
16885+
StartLoc, LParenLoc, ArgumentLoc.back(), EndLoc);
16886+
break;
1688216887
case OMPC_final:
1688316888
case OMPC_num_threads:
1688416889
case OMPC_safelen:
@@ -16924,7 +16929,6 @@ OMPClause *Sema::ActOnOpenMPSingleExprWithArgClause(
1692416929
case OMPC_num_teams:
1692516930
case OMPC_thread_limit:
1692616931
case OMPC_priority:
16927-
case OMPC_grainsize:
1692816932
case OMPC_nogroup:
1692916933
case OMPC_num_tasks:
1693016934
case OMPC_hint:
@@ -22352,25 +22356,38 @@ OMPClause *Sema::ActOnOpenMPPriorityClause(Expr *Priority,
2235222356
StartLoc, LParenLoc, EndLoc);
2235322357
}
2235422358

22355-
OMPClause *Sema::ActOnOpenMPGrainsizeClause(Expr *Grainsize,
22356-
SourceLocation StartLoc,
22357-
SourceLocation LParenLoc,
22358-
SourceLocation EndLoc) {
22359+
OMPClause *Sema::ActOnOpenMPGrainsizeClause(
22360+
OpenMPGrainsizeClauseModifier Modifier, Expr *Grainsize,
22361+
SourceLocation StartLoc, SourceLocation LParenLoc,
22362+
SourceLocation ModifierLoc, SourceLocation EndLoc) {
22363+
assert((ModifierLoc.isInvalid() || LangOpts.OpenMP >= 51) &&
22364+
"Unexpected grainsize modifier in OpenMP < 51.");
22365+
22366+
if (ModifierLoc.isValid() && Modifier == OMPC_GRAINSIZE_unknown) {
22367+
std::string Values = getListOfPossibleValues(OMPC_grainsize, /*First=*/0,
22368+
OMPC_GRAINSIZE_unknown);
22369+
Diag(ModifierLoc, diag::err_omp_unexpected_clause_value)
22370+
<< Values << getOpenMPClauseName(OMPC_grainsize);
22371+
return nullptr;
22372+
}
22373+
2235922374
Expr *ValExpr = Grainsize;
2236022375
Stmt *HelperValStmt = nullptr;
2236122376
OpenMPDirectiveKind CaptureRegion = OMPD_unknown;
2236222377

2236322378
// OpenMP [2.9.2, taskloop Constrcut]
2236422379
// The parameter of the grainsize clause must be a positive integer
2236522380
// expression.
22366-
if (!isNonNegativeIntegerValue(
22367-
ValExpr, *this, OMPC_grainsize,
22368-
/*StrictlyPositive=*/true, /*BuildCapture=*/true,
22369-
DSAStack->getCurrentDirective(), &CaptureRegion, &HelperValStmt))
22381+
if (!isNonNegativeIntegerValue(ValExpr, *this, OMPC_grainsize,
22382+
/*StrictlyPositive=*/true,
22383+
/*BuildCapture=*/true,
22384+
DSAStack->getCurrentDirective(),
22385+
&CaptureRegion, &HelperValStmt))
2237022386
return nullptr;
2237122387

22372-
return new (Context) OMPGrainsizeClause(ValExpr, HelperValStmt, CaptureRegion,
22373-
StartLoc, LParenLoc, EndLoc);
22388+
return new (Context)
22389+
OMPGrainsizeClause(Modifier, ValExpr, HelperValStmt, CaptureRegion,
22390+
StartLoc, LParenLoc, ModifierLoc, EndLoc);
2237422391
}
2237522392

2237622393
OMPClause *Sema::ActOnOpenMPNumTasksClause(Expr *NumTasks,

clang/lib/Sema/TreeTransform.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,11 +2051,13 @@ class TreeTransform {
20512051
///
20522052
/// By default, performs semantic analysis to build the new statement.
20532053
/// Subclasses may override this routine to provide different behavior.
2054-
OMPClause *RebuildOMPGrainsizeClause(Expr *Grainsize, SourceLocation StartLoc,
2054+
OMPClause *RebuildOMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier,
2055+
Expr *Device, SourceLocation StartLoc,
20552056
SourceLocation LParenLoc,
2057+
SourceLocation ModifierLoc,
20562058
SourceLocation EndLoc) {
2057-
return getSema().ActOnOpenMPGrainsizeClause(Grainsize, StartLoc, LParenLoc,
2058-
EndLoc);
2059+
return getSema().ActOnOpenMPGrainsizeClause(Modifier, Device, StartLoc,
2060+
LParenLoc, ModifierLoc, EndLoc);
20592061
}
20602062

20612063
/// Build a new OpenMP 'num_tasks' clause.
@@ -10350,7 +10352,8 @@ TreeTransform<Derived>::TransformOMPGrainsizeClause(OMPGrainsizeClause *C) {
1035010352
if (E.isInvalid())
1035110353
return nullptr;
1035210354
return getDerived().RebuildOMPGrainsizeClause(
10353-
E.get(), C->getBeginLoc(), C->getLParenLoc(), C->getEndLoc());
10355+
C->getModifier(), E.get(), C->getBeginLoc(), C->getLParenLoc(),
10356+
C->getModifierLoc(), C->getEndLoc());
1035410357
}
1035510358

1035610359
template <typename Derived>

clang/lib/Serialization/ASTReader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10784,7 +10784,9 @@ void OMPClauseReader::VisitOMPPriorityClause(OMPPriorityClause *C) {
1078410784

1078510785
void OMPClauseReader::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) {
1078610786
VisitOMPClauseWithPreInit(C);
10787+
C->setModifier(Record.readEnum<OpenMPGrainsizeClauseModifier>());
1078710788
C->setGrainsize(Record.readSubExpr());
10789+
C->setModifierLoc(Record.readSourceLocation());
1078810790
C->setLParenLoc(Record.readSourceLocation());
1078910791
}
1079010792

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6790,7 +6790,9 @@ void OMPClauseWriter::VisitOMPPriorityClause(OMPPriorityClause *C) {
67906790

67916791
void OMPClauseWriter::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) {
67926792
VisitOMPClauseWithPreInit(C);
6793+
Record.writeEnum(C->getModifier());
67936794
Record.AddStmt(C->getGrainsize());
6795+
Record.AddSourceLocation(C->getModifierLoc());
67946796
Record.AddSourceLocation(C->getLParenLoc());
67956797
}
67966798

clang/test/OpenMP/masked_taskloop_grainsize_messages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
2+
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -ferror-limit 100 %s -Wuninitialized
23

34
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
5+
// RUN: %clang_cc1 -verify -fopenmp-version=51 -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
46

57
void foo() {
68
}

clang/test/OpenMP/masked_taskloop_simd_grainsize_messages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
2+
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -ferror-limit 100 %s -Wuninitialized
23

34
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
5+
// RUN: %clang_cc1 -verify -fopenmp-version=51 -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
46

57
void foo() {
68
}

clang/test/OpenMP/master_taskloop_grainsize_messages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
2+
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -ferror-limit 100 %s -Wuninitialized
23

34
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
5+
// RUN: %clang_cc1 -verify -fopenmp-version=51 -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
46

57
void foo() {
68
}

0 commit comments

Comments
 (0)