r254398 - [OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 1 02:17:31 PST 2015
Author: abataev
Date: Tue Dec 1 04:17:31 2015
New Revision: 254398
URL: http://llvm.org/viewvc/llvm-project?rev=254398&view=rev
Log:
[OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
OpenMP 4.5 defines new clause 'priority' for 'task', 'taskloop' and 'taskloop simd' directives. Added parsing and sema analysis for 'priority' clause in 'task' and 'taskloop' directives.
Added:
cfe/trunk/test/OpenMP/task_priority_messages.cpp
cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp
Modified:
cfe/trunk/include/clang/AST/OpenMPClause.h
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/include/clang/Basic/OpenMPKinds.def
cfe/trunk/include/clang/Sema/Sema.h
cfe/trunk/lib/AST/StmtPrinter.cpp
cfe/trunk/lib/AST/StmtProfile.cpp
cfe/trunk/lib/Basic/OpenMPKinds.cpp
cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp
cfe/trunk/lib/Parse/ParseOpenMP.cpp
cfe/trunk/lib/Sema/SemaOpenMP.cpp
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
cfe/trunk/test/OpenMP/for_collapse_messages.cpp
cfe/trunk/test/OpenMP/for_misc_messages.c
cfe/trunk/test/OpenMP/for_ordered_clause.cpp
cfe/trunk/test/OpenMP/for_schedule_messages.cpp
cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/for_simd_misc_messages.c
cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_misc_messages.c
cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c
cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp
cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp
cfe/trunk/test/OpenMP/simd_aligned_messages.cpp
cfe/trunk/test/OpenMP/simd_collapse_messages.cpp
cfe/trunk/test/OpenMP/simd_misc_messages.c
cfe/trunk/test/OpenMP/simd_safelen_messages.cpp
cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp
cfe/trunk/test/OpenMP/target_data_device_messages.cpp
cfe/trunk/test/OpenMP/target_device_messages.cpp
cfe/trunk/test/OpenMP/task_ast_print.cpp
cfe/trunk/test/OpenMP/taskloop_ast_print.cpp
cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp
cfe/trunk/test/OpenMP/taskloop_misc_messages.c
cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp
cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/include/clang/AST/OpenMPClause.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/OpenMPClause.h?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/OpenMPClause.h (original)
+++ cfe/trunk/include/clang/AST/OpenMPClause.h Tue Dec 1 04:17:31 2015
@@ -2838,6 +2838,61 @@ public:
child_range children() { return child_range(&ThreadLimit, &ThreadLimit + 1); }
};
+/// \brief This represents 'priority' clause in the '#pragma omp ...'
+/// directive.
+///
+/// \code
+/// #pragma omp task priority(n)
+/// \endcode
+/// In this example directive '#pragma omp teams' has clause 'priority' with
+/// single expression 'n'.
+///
+class OMPPriorityClause : public OMPClause {
+ friend class OMPClauseReader;
+ /// \brief Location of '('.
+ SourceLocation LParenLoc;
+ /// \brief Priority number.
+ Stmt *Priority;
+ /// \brief Set the Priority number.
+ ///
+ /// \param E Priority number.
+ ///
+ void setPriority(Expr *E) { Priority = E; }
+
+public:
+ /// \brief Build 'priority' clause.
+ ///
+ /// \param E Expression associated with this clause.
+ /// \param StartLoc Starting location of the clause.
+ /// \param LParenLoc Location of '('.
+ /// \param EndLoc Ending location of the clause.
+ ///
+ OMPPriorityClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc,
+ SourceLocation EndLoc)
+ : OMPClause(OMPC_priority, StartLoc, EndLoc), LParenLoc(LParenLoc),
+ Priority(E) {}
+
+ /// \brief Build an empty clause.
+ ///
+ OMPPriorityClause()
+ : OMPClause(OMPC_priority, SourceLocation(), SourceLocation()),
+ LParenLoc(SourceLocation()), Priority(nullptr) {}
+ /// \brief Sets the location of '('.
+ void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
+ /// \brief Returns the location of '('.
+ SourceLocation getLParenLoc() const { return LParenLoc; }
+ /// \brief Return Priority number.
+ Expr *getPriority() { return cast<Expr>(Priority); }
+ /// \brief Return Priority number.
+ Expr *getPriority() const { return cast<Expr>(Priority); }
+
+ static bool classof(const OMPClause *T) {
+ return T->getClauseKind() == OMPC_priority;
+ }
+
+ child_range children() { return child_range(&Priority, &Priority + 1); }
+};
+
} // end namespace clang
#endif // LLVM_CLANG_AST_OPENMPCLAUSE_H
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Tue Dec 1 04:17:31 2015
@@ -2738,6 +2738,13 @@ bool RecursiveASTVisitor<Derived>::Visit
return true;
}
+template <typename Derived>
+bool RecursiveASTVisitor<Derived>::VisitOMPPriorityClause(
+ OMPPriorityClause *C) {
+ TRY_TO(TraverseStmt(C->getPriority()));
+ return true;
+}
+
// FIXME: look at the following tricky-seeming exprs to see if we
// need to recurse on anything. These are ones that have methods
// returning decls or qualtypes or nestednamespecifier -- though I'm
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Dec 1 04:17:31 2015
@@ -7701,7 +7701,7 @@ def err_omp_not_for : Error<
def note_omp_collapse_ordered_expr : Note<
"as specified in %select{'collapse'|'ordered'|'collapse' and 'ordered'}0 clause%select{||s}0">;
def err_omp_negative_expression_in_clause : Error<
- "argument to '%0' clause must be a positive integer value">;
+ "argument to '%0' clause must be a %select{non-negative|strictly positive}1 integer value">;
def err_omp_not_integral : Error<
"expression must have integral or unscoped enumeration "
"type, not %0">;
Modified: cfe/trunk/include/clang/Basic/OpenMPKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/OpenMPKinds.def?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/OpenMPKinds.def (original)
+++ cfe/trunk/include/clang/Basic/OpenMPKinds.def Tue Dec 1 04:17:31 2015
@@ -156,6 +156,7 @@ OPENMP_CLAUSE(simd, OMPSIMDClause)
OPENMP_CLAUSE(map, OMPMapClause)
OPENMP_CLAUSE(num_teams, OMPNumTeamsClause)
OPENMP_CLAUSE(thread_limit, OMPThreadLimitClause)
+OPENMP_CLAUSE(priority, OMPPriorityClause)
// Clauses allowed for OpenMP directive 'parallel'.
OPENMP_PARALLEL_CLAUSE(if)
@@ -300,6 +301,7 @@ OPENMP_TASK_CLAUSE(shared)
OPENMP_TASK_CLAUSE(untied)
OPENMP_TASK_CLAUSE(mergeable)
OPENMP_TASK_CLAUSE(depend)
+OPENMP_TASK_CLAUSE(priority)
// Clauses allowed for OpenMP directive 'atomic'.
OPENMP_ATOMIC_CLAUSE(read)
@@ -356,6 +358,7 @@ OPENMP_TASKLOOP_CLAUSE(collapse)
OPENMP_TASKLOOP_CLAUSE(final)
OPENMP_TASKLOOP_CLAUSE(untied)
OPENMP_TASKLOOP_CLAUSE(mergeable)
+OPENMP_TASKLOOP_CLAUSE(priority)
#undef OPENMP_TASKLOOP_CLAUSE
#undef OPENMP_LINEAR_KIND
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Tue Dec 1 04:17:31 2015
@@ -8136,6 +8136,10 @@ public:
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
+ /// \brief Called on well-formed 'priority' clause.
+ OMPClause *ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc,
+ SourceLocation LParenLoc,
+ SourceLocation EndLoc);
/// \brief The kind of conversion being performed.
enum CheckedConversionKind {
Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Tue Dec 1 04:17:31 2015
@@ -721,6 +721,12 @@ void OMPClausePrinter::VisitOMPThreadLim
OS << ")";
}
+void OMPClausePrinter::VisitOMPPriorityClause(OMPPriorityClause *Node) {
+ OS << "priority(";
+ Node->getPriority()->printPretty(OS, nullptr, Policy, 0);
+ OS << ")";
+}
+
template<typename T>
void OMPClausePrinter::VisitOMPClauseList(T *Node, char StartSym) {
for (typename T::varlist_iterator I = Node->varlist_begin(),
Modified: cfe/trunk/lib/AST/StmtProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtProfile.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtProfile.cpp (original)
+++ cfe/trunk/lib/AST/StmtProfile.cpp Tue Dec 1 04:17:31 2015
@@ -460,6 +460,9 @@ void OMPClauseProfiler::VisitOMPThreadLi
const OMPThreadLimitClause *C) {
Profiler->VisitStmt(C->getThreadLimit());
}
+void OMPClauseProfiler::VisitOMPPriorityClause(const OMPPriorityClause *C) {
+ Profiler->VisitStmt(C->getPriority());
+}
}
void
Modified: cfe/trunk/lib/Basic/OpenMPKinds.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/OpenMPKinds.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/OpenMPKinds.cpp (original)
+++ cfe/trunk/lib/Basic/OpenMPKinds.cpp Tue Dec 1 04:17:31 2015
@@ -137,6 +137,7 @@ unsigned clang::getOpenMPSimpleClauseTyp
case OMPC_simd:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
break;
}
llvm_unreachable("Invalid OpenMP simple clause kind");
@@ -237,6 +238,7 @@ const char *clang::getOpenMPSimpleClause
case OMPC_simd:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
break;
}
llvm_unreachable("Invalid OpenMP simple clause kind");
Modified: cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp Tue Dec 1 04:17:31 2015
@@ -2436,6 +2436,7 @@ static void EmitOMPAtomicExpr(CodeGenFun
case OMPC_map:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
llvm_unreachable("Clause is not allowed in 'omp atomic'.");
}
}
Modified: cfe/trunk/lib/Parse/ParseOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseOpenMP.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseOpenMP.cpp (original)
+++ cfe/trunk/lib/Parse/ParseOpenMP.cpp Tue Dec 1 04:17:31 2015
@@ -397,7 +397,7 @@ bool Parser::ParseOpenMPSimpleVarList(Op
/// mergeable-clause | flush-clause | read-clause | write-clause |
/// update-clause | capture-clause | seq_cst-clause | device-clause |
/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |
-/// thread_limit-clause
+/// thread_limit-clause | priority-clause
///
OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
OpenMPClauseKind CKind, bool FirstClause) {
@@ -420,6 +420,7 @@ OMPClause *Parser::ParseOpenMPClause(Ope
case OMPC_device:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
// OpenMP [2.5, Restrictions]
// At most one num_threads clause can appear on the directive.
// OpenMP [2.8.1, simd construct, Restrictions]
@@ -434,6 +435,8 @@ OMPClause *Parser::ParseOpenMPClause(Ope
// OpenMP [teams Construct, Restrictions]
// At most one num_teams clause can appear on the directive.
// At most one thread_limit clause can appear on the directive.
+ // OpenMP [2.9.1, task Construct, Restrictions]
+ // At most one priority clause can appear on the directive.
if (!FirstClause) {
Diag(Tok, diag::err_omp_more_one_clause)
<< getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
@@ -523,8 +526,8 @@ OMPClause *Parser::ParseOpenMPClause(Ope
}
/// \brief Parsing of OpenMP clauses with single expressions like 'final',
-/// 'collapse', 'safelen', 'num_threads', 'simdlen', 'num_teams', 'thread_limit'
-/// or 'simdlen'.
+/// 'collapse', 'safelen', 'num_threads', 'simdlen', 'num_teams',
+/// 'thread_limit', 'simdlen' or 'priority'.
///
/// final-clause:
/// 'final' '(' expression ')'
@@ -541,6 +544,9 @@ OMPClause *Parser::ParseOpenMPClause(Ope
/// collapse-clause:
/// 'collapse' '(' expression ')'
///
+/// priority-clause:
+/// 'priority' '(' expression ')'
+///
OMPClause *Parser::ParseOpenMPSingleExprClause(OpenMPClauseKind Kind) {
SourceLocation Loc = ConsumeToken();
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Tue Dec 1 04:17:31 2015
@@ -5190,6 +5190,9 @@ OMPClause *Sema::ActOnOpenMPSingleExprCl
case OMPC_thread_limit:
Res = ActOnOpenMPThreadLimitClause(Expr, StartLoc, LParenLoc, EndLoc);
break;
+ case OMPC_priority:
+ Res = ActOnOpenMPPriorityClause(Expr, StartLoc, LParenLoc, EndLoc);
+ break;
case OMPC_if:
case OMPC_default:
case OMPC_proc_bind:
@@ -5308,7 +5311,8 @@ ExprResult Sema::PerformOpenMPImplicitIn
}
static bool IsNonNegativeIntegerValue(Expr *&ValExpr, Sema &SemaRef,
- OpenMPClauseKind CKind) {
+ OpenMPClauseKind CKind,
+ bool StrictlyPositive) {
if (!ValExpr->isTypeDependent() && !ValExpr->isValueDependent() &&
!ValExpr->isInstantiationDependent()) {
SourceLocation Loc = ValExpr->getExprLoc();
@@ -5321,9 +5325,12 @@ static bool IsNonNegativeIntegerValue(Ex
// The expression must evaluate to a non-negative integer value.
llvm::APSInt Result;
if (ValExpr->isIntegerConstantExpr(Result, SemaRef.Context) &&
- Result.isSigned() && !Result.isStrictlyPositive()) {
+ Result.isSigned() &&
+ !((!StrictlyPositive && Result.isNonNegative()) ||
+ (StrictlyPositive && Result.isStrictlyPositive()))) {
SemaRef.Diag(Loc, diag::err_omp_negative_expression_in_clause)
- << getOpenMPClauseName(CKind) << ValExpr->getSourceRange();
+ << getOpenMPClauseName(CKind) << (StrictlyPositive ? 1 : 0)
+ << ValExpr->getSourceRange();
return false;
}
}
@@ -5338,7 +5345,8 @@ OMPClause *Sema::ActOnOpenMPNumThreadsCl
// OpenMP [2.5, Restrictions]
// The num_threads expression must evaluate to a positive integer value.
- if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_num_threads))
+ if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_num_threads,
+ /*StrictlyPositive=*/true))
return nullptr;
return new (Context)
@@ -5358,7 +5366,7 @@ ExprResult Sema::VerifyPositiveIntegerCo
return ExprError();
if (!Result.isStrictlyPositive()) {
Diag(E->getExprLoc(), diag::err_omp_negative_expression_in_clause)
- << getOpenMPClauseName(CKind) << E->getSourceRange();
+ << getOpenMPClauseName(CKind) << 1 << E->getSourceRange();
return ExprError();
}
if (CKind == OMPC_aligned && !Result.isPowerOf2()) {
@@ -5487,6 +5495,7 @@ OMPClause *Sema::ActOnOpenMPSimpleClause
case OMPC_map:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
case OMPC_unknown:
llvm_unreachable("Clause is not allowed.");
}
@@ -5619,6 +5628,7 @@ OMPClause *Sema::ActOnOpenMPSingleExprWi
case OMPC_map:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
case OMPC_unknown:
llvm_unreachable("Clause is not allowed.");
}
@@ -5672,7 +5682,7 @@ OMPClause *Sema::ActOnOpenMPScheduleClau
if (ValExpr->isIntegerConstantExpr(Result, Context)) {
if (Result.isSigned() && !Result.isStrictlyPositive()) {
Diag(ChunkSizeLoc, diag::err_omp_negative_expression_in_clause)
- << "schedule" << ChunkSize->getSourceRange();
+ << "schedule" << 1 << ChunkSize->getSourceRange();
return nullptr;
}
} else if (isParallelOrTaskRegion(DSAStack->getCurrentDirective())) {
@@ -5753,6 +5763,7 @@ OMPClause *Sema::ActOnOpenMPClause(OpenM
case OMPC_map:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
case OMPC_unknown:
llvm_unreachable("Clause is not allowed.");
}
@@ -5884,6 +5895,7 @@ OMPClause *Sema::ActOnOpenMPVarListClaus
case OMPC_simd:
case OMPC_num_teams:
case OMPC_thread_limit:
+ case OMPC_priority:
case OMPC_unknown:
llvm_unreachable("Clause is not allowed.");
}
@@ -7566,7 +7578,8 @@ OMPClause *Sema::ActOnOpenMPDeviceClause
// OpenMP [2.9.1, Restrictions]
// The device expression must evaluate to a non-negative integer value.
- if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_device))
+ if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_device,
+ /*StrictlyPositive=*/false))
return nullptr;
return new (Context) OMPDeviceClause(ValExpr, StartLoc, LParenLoc, EndLoc);
@@ -7756,7 +7769,8 @@ OMPClause *Sema::ActOnOpenMPNumTeamsClau
// OpenMP [teams Constrcut, Restrictions]
// The num_teams expression must evaluate to a positive integer value.
- if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_num_teams))
+ if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_num_teams,
+ /*StrictlyPositive=*/true))
return nullptr;
return new (Context) OMPNumTeamsClause(ValExpr, StartLoc, LParenLoc, EndLoc);
@@ -7770,9 +7784,25 @@ OMPClause *Sema::ActOnOpenMPThreadLimitC
// OpenMP [teams Constrcut, Restrictions]
// The thread_limit expression must evaluate to a positive integer value.
- if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_thread_limit))
+ if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_thread_limit,
+ /*StrictlyPositive=*/true))
return nullptr;
return new (Context) OMPThreadLimitClause(ValExpr, StartLoc, LParenLoc,
EndLoc);
}
+
+OMPClause *Sema::ActOnOpenMPPriorityClause(Expr *Priority,
+ SourceLocation StartLoc,
+ SourceLocation LParenLoc,
+ SourceLocation EndLoc) {
+ Expr *ValExpr = Priority;
+
+ // OpenMP [2.9.1, task Constrcut]
+ // The priority-value is a non-negative numerical scalar expression.
+ if (!IsNonNegativeIntegerValue(ValExpr, *this, OMPC_priority,
+ /*StrictlyPositive=*/false))
+ return nullptr;
+
+ return new (Context) OMPPriorityClause(ValExpr, StartLoc, LParenLoc, EndLoc);
+}
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Tue Dec 1 04:17:31 2015
@@ -1689,6 +1689,17 @@ public:
LParenLoc, EndLoc);
}
+ /// \brief Build a new OpenMP 'priority' clause.
+ ///
+ /// By default, performs semantic analysis to build the new statement.
+ /// Subclasses may override this routine to provide different behavior.
+ OMPClause *RebuildOMPPriorityClause(Expr *Priority, SourceLocation StartLoc,
+ SourceLocation LParenLoc,
+ SourceLocation EndLoc) {
+ return getSema().ActOnOpenMPPriorityClause(Priority, StartLoc, LParenLoc,
+ EndLoc);
+ }
+
/// \brief Rebuild the operand to an Objective-C \@synchronized statement.
///
/// By default, performs semantic analysis to build the new statement.
@@ -7751,6 +7762,16 @@ TreeTransform<Derived>::TransformOMPThre
E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd());
}
+template <typename Derived>
+OMPClause *
+TreeTransform<Derived>::TransformOMPPriorityClause(OMPPriorityClause *C) {
+ ExprResult E = getDerived().TransformExpr(C->getPriority());
+ if (E.isInvalid())
+ return nullptr;
+ return getDerived().RebuildOMPPriorityClause(
+ E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd());
+}
+
//===----------------------------------------------------------------------===//
// Expression transformation
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Tue Dec 1 04:17:31 2015
@@ -1856,6 +1856,9 @@ OMPClause *OMPClauseReader::readClause()
case OMPC_thread_limit:
C = new (Context) OMPThreadLimitClause();
break;
+ case OMPC_priority:
+ C = new (Context) OMPPriorityClause();
+ break;
}
Visit(C);
C->setLocStart(Reader->ReadSourceLocation(Record, Idx));
@@ -2190,6 +2193,11 @@ void OMPClauseReader::VisitOMPThreadLimi
C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
}
+void OMPClauseReader::VisitOMPPriorityClause(OMPPriorityClause *C) {
+ C->setPriority(Reader->Reader.ReadSubExpr());
+ C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx));
+}
+
//===----------------------------------------------------------------------===//
// OpenMP Directives.
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterStmt.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Tue Dec 1 04:17:31 2015
@@ -2011,6 +2011,11 @@ void OMPClauseWriter::VisitOMPThreadLimi
Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record);
}
+void OMPClauseWriter::VisitOMPPriorityClause(OMPPriorityClause *C) {
+ Writer->Writer.AddStmt(C->getPriority());
+ Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record);
+}
+
//===----------------------------------------------------------------------===//
// OpenMP Directives.
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/test/OpenMP/for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp for collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp for'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/for_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -175,17 +175,17 @@ void test_collapse() {
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse(-5)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse(0)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Modified: cfe/trunk/test/OpenMP/for_ordered_clause.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_ordered_clause.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_ordered_clause.cpp (original)
+++ cfe/trunk/test/OpenMP/for_ordered_clause.cpp Tue Dec 1 04:17:31 2015
@@ -26,7 +26,7 @@ T tmain(T argc, S **argv) {
#pragma omp for ordered(argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error at +1 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp for ordered(ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -37,7 +37,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
-// expected-error at +2 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +2 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
@@ -52,15 +52,15 @@ T tmain(T argc, S **argv) {
#pragma omp for ordered(1)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-#pragma omp for ordered(N-1) // expected-error 2 {{argument to 'ordered' clause must be a positive integer value}}
+#pragma omp for ordered(N-1) // expected-error 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-#pragma omp for ordered(N) // expected-error {{argument to 'ordered' clause must be a positive integer value}}
+#pragma omp for ordered(N) // expected-error {{argument to 'ordered' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
#pragma omp for ordered(2) // expected-note {{as specified in 'ordered' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp for'}}
-#pragma omp for ordered(N) collapse(N + 2) // expected-error {{the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause}} expected-note {{parameter of the 'collapse' clause}} expected-error {{argument to 'ordered' clause must be a positive integer value}}
+#pragma omp for ordered(N) collapse(N + 2) // expected-error {{the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause}} expected-note {{parameter of the 'collapse' clause}} expected-error {{argument to 'ordered' clause must be a strictly positive integer value}}
for (int i = ST; i < N; i++)
for (int j = ST; j < N; j++)
for (int k = ST; k < N; k++)
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i - 4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
-// expected-error at +1 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
@@ -106,7 +106,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp for ordered(2) // expected-note {{as specified in 'ordered' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp for'}}
-#pragma omp for ordered(0) // expected-error {{argument to 'ordered' clause must be a positive integer value}}
+#pragma omp for ordered(0) // expected-error {{argument to 'ordered' clause must be a strictly positive integer value}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#pragma omp for ordered(2) collapse(3) // expected-error {{the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause}} expected-note {{parameter of the 'collapse' clause}}
Modified: cfe/trunk/test/OpenMP/for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_schedule_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_schedule_messages.cpp Tue Dec 1 04:17:31 2015
@@ -28,7 +28,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
#pragma omp for schedule (guided argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
@@ -36,7 +36,7 @@ T tmain(T argc, S **argv) {
#pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for schedule (static, S) // expected-error {{'S' does not refer to a value}}
@@ -46,7 +46,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for schedule (dynamic, 1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
#pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for schedule (guided, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_aligned_messages.cpp Tue Dec 1 04:17:31 2015
@@ -50,7 +50,7 @@ template<int L, class T, class N> T test
T sum = (T)0;
T ind2 = - num * L;
// Negative number is passed as L.
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp for simd aligned(arr:L)
for (i = 0; i < num; ++i) {
T cur = arr[(int)ind2];
@@ -65,7 +65,7 @@ template<int L, class T, class N> T test
template<int LEN> int test_warn() {
int *ind2 = 0;
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp for simd aligned(ind2:LEN)
for (int i = 0; i < 100; i++) {
ind2 += LEN;
Modified: cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for simd', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for simd collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp for simd collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp for simd'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/for_simd_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -153,15 +153,15 @@ void test_safelen() {
#pragma omp for simd safelen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -238,15 +238,15 @@ void test_simdlen() {
#pragma omp for simd simdlen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -356,17 +356,17 @@ void test_collapse() {
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse(-5)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse(0)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Modified: cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_safelen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp for simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd safelen (1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp for simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +2 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd safelen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for simd safelen (N) // expected-error {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp for simd safelen (N) // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +1 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_schedule_messages.cpp Tue Dec 1 04:17:31 2015
@@ -28,7 +28,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
#pragma omp for simd schedule (guided argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for simd schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
@@ -36,7 +36,7 @@ T tmain(T argc, S **argv) {
#pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for simd schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd schedule (static, S) // expected-error {{'S' does not refer to a value}}
@@ -46,7 +46,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd schedule (dynamic, 1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
#pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp for simd schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd schedule (guided, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_simdlen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp for simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd simdlen (1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp for simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +2 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd simdlen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp for simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a positive integer value}}
+ #pragma omp for simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +1 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp parallel for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp parallel for collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp parallel for'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_for_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -148,15 +148,15 @@ void test_collapse() {
#pragma omp parallel for collapse(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Modified: cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_num_threads_messages.cpp Tue Dec 1 04:17:31 2015
@@ -24,7 +24,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (S) // expected-error {{'S' does not refer to a value}}
for (i = 0; i < argc; ++i) foo();
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (argc)
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
return argc;
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for num_threads (S1) // expected-error {{'S1' does not refer to a value}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_ordered_messages.cpp Tue Dec 1 04:17:31 2015
@@ -26,7 +26,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel for ordered(argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error at +1 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp parallel for ordered(ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -37,7 +37,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error at +2 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +2 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
@@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel for ordered(1)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-#pragma omp parallel for ordered(N) // expected-error {{argument to 'ordered' clause must be a positive integer value}}
+#pragma omp parallel for ordered(N) // expected-error {{argument to 'ordered' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
#pragma omp parallel for ordered(2) // expected-note {{as specified in 'ordered' clause}}
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i - 4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error at +1 2 {{argument to 'ordered' clause must be a positive integer value}}
+// expected-error at +1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
Modified: cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_schedule_messages.cpp Tue Dec 1 04:17:31 2015
@@ -28,7 +28,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
#pragma omp parallel for schedule (guided argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
@@ -36,7 +36,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for schedule (static, S) // expected-error {{'S' does not refer to a value}}
@@ -46,7 +46,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for schedule (dynamic, 1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for schedule (guided, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_aligned_messages.cpp Tue Dec 1 04:17:31 2015
@@ -50,7 +50,7 @@ template<int L, class T, class N> T test
T sum = (T)0;
T ind2 = - num * L;
// Negative number is passed as L.
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp parallel for simd aligned(arr:L)
for (i = 0; i < num; ++i) {
T cur = arr[(int)ind2];
@@ -65,7 +65,7 @@ template<int L, class T, class N> T test
template<int LEN> int test_warn() {
int *ind2 = 0;
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp parallel for simd aligned(ind2:LEN)
for (int i = 0; i < 100; i++) {
ind2 += LEN;
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp parallel for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp parallel for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for simd', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for simd collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp parallel for simd collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp parallel for simd'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -153,15 +153,15 @@ void test_safelen() {
#pragma omp parallel for simd safelen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -238,15 +238,15 @@ void test_simdlen() {
#pragma omp parallel for simd simdlen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -356,17 +356,17 @@ void test_collapse() {
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse(-5)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse(0)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_num_threads_messages.cpp Tue Dec 1 04:17:31 2015
@@ -24,7 +24,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for simd num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (S) // expected-error {{'S' does not refer to a value}}
for (i = 0; i < argc; ++i) foo();
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (argc)
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
return argc;
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
for (i = 0; i < argc; ++i) foo();
- #pragma omp parallel for simd num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel for simd num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
for (i = 0; i < argc; ++i) foo();
#pragma omp parallel for simd num_threads (S1) // expected-error {{'S1' does not refer to a value}}
for (i = 0; i < argc; ++i) foo();
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_safelen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp parallel for simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd safelen (1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp parallel for simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +2 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd safelen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for simd safelen (N) // expected-error {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp parallel for simd safelen (N) // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +1 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_schedule_messages.cpp Tue Dec 1 04:17:31 2015
@@ -28,7 +28,7 @@ T tmain(T argc, S **argv) {
// expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
#pragma omp parallel for simd schedule (guided argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for simd schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
@@ -36,7 +36,7 @@ T tmain(T argc, S **argv) {
#pragma omp parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for simd schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd schedule (static, S) // expected-error {{'S' does not refer to a value}}
@@ -46,7 +46,7 @@ T tmain(T argc, S **argv) {
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd schedule (dynamic, 1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'schedule' clause}}
- // expected-error at +1 {{argument to 'schedule' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'schedule' clause must be a strictly positive integer value}}
#pragma omp parallel for simd schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd schedule (guided, S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_simdlen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp parallel for simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd simdlen (1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp parallel for simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +2 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd simdlen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp parallel for simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a positive integer value}}
+ #pragma omp parallel for simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +1 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_num_threads_messages.cpp Tue Dec 1 04:17:31 2015
@@ -19,11 +19,11 @@ T tmain(T argc, S **argv) {
#pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
#pragma omp parallel num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
- #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}}
#pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
#pragma omp parallel num_threads (argc)
- #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel redef_num_threads (argc, argc)
foo();
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
#pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
#pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
- #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
#pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
#pragma omp parallel num_threads (num_threads(tmain<int, char, -1>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}} expected-note {{in instantiation of function template specialization 'tmain<int, char, -1>' requested here}}
Modified: cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_num_threads_messages.cpp Tue Dec 1 04:17:31 2015
@@ -23,7 +23,7 @@ T tmain(T argc, S **argv) {
{foo();}
#pragma omp parallel sections num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
{foo();}
- #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
{foo();}
#pragma omp parallel sections num_threads (S) // expected-error {{'S' does not refer to a value}}
{foo();}
@@ -31,7 +31,7 @@ T tmain(T argc, S **argv) {
{foo();}
#pragma omp parallel sections num_threads (argc)
{foo();}
- #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
{foo();}
return argc;
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
{foo();}
#pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
{foo();}
- #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
{foo();}
#pragma omp parallel sections num_threads (S1) // expected-error {{'S1' does not refer to a value}}
{foo();}
Modified: cfe/trunk/test/OpenMP/simd_aligned_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_aligned_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_aligned_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_aligned_messages.cpp Tue Dec 1 04:17:31 2015
@@ -50,7 +50,7 @@ template<int L, class T, class N> T test
T sum = (T)0;
T ind2 = - num * L;
// Negative number is passed as L.
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp simd aligned(arr:L)
for (i = 0; i < num; ++i) {
T cur = arr[(int)ind2];
@@ -65,7 +65,7 @@ template<int L, class T, class N> T test
template<int LEN> int test_warn() {
int *ind2 = 0;
- // expected-error at +1 {{argument to 'aligned' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'aligned' clause must be a strictly positive integer value}}
#pragma omp simd aligned(ind2:LEN)
for (int i = 0; i < 100; i++) {
ind2 += LEN;
Modified: cfe/trunk/test/OpenMP/simd_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp simd', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp simd collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp simd'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/simd_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/simd_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -152,15 +152,15 @@ void test_safelen() {
#pragma omp simd safelen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -237,15 +237,15 @@ void test_simdlen() {
#pragma omp simd simdlen(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen(5 - 5)
for (i = 0; i < 16; ++i)
;
@@ -338,15 +338,15 @@ void test_collapse() {
#pragma omp simd collapse(foo())
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse(-5)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse(0)
for (i = 0; i < 16; ++i)
;
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Modified: cfe/trunk/test/OpenMP/simd_safelen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_safelen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_safelen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_safelen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd safelen (1)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +2 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd safelen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp simd safelen (N) // expected-error {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen (N) // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +1 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_simdlen_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd simdlen (1)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +2 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd simdlen (4)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a positive integer value}}
+ #pragma omp simd simdlen (N) // expected-error {{argument to 'simdlen' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
return argc;
}
@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +1 2 {{argument to 'simdlen' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/target_data_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_device_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_data_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_data_device_messages.cpp Tue Dec 1 04:17:31 2015
@@ -19,7 +19,7 @@ int main(int argc, char **argv) {
#pragma omp target data device (argc + argc)
#pragma omp target data device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}}
#pragma omp target data device (S1) // expected-error {{'S1' does not refer to a value}}
- #pragma omp target data device (-2) // expected-error {{argument to 'device' clause must be a positive integer value}}
+ #pragma omp target data device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
#pragma omp target device (-10u)
#pragma omp target device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
Modified: cfe/trunk/test/OpenMP/target_device_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_device_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_device_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_device_messages.cpp Tue Dec 1 04:17:31 2015
@@ -19,7 +19,7 @@ int main(int argc, char **argv) {
#pragma omp target device (argc + argc)
#pragma omp target device (argc), device (argc+1) // expected-error {{directive '#pragma omp target' cannot contain more than one 'device' clause}}
#pragma omp target device (S1) // expected-error {{'S1' does not refer to a value}}
- #pragma omp target device (-2) // expected-error {{argument to 'device' clause must be a positive integer value}}
+ #pragma omp target device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
#pragma omp target device (-10u)
#pragma omp target device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
foo();
Modified: cfe/trunk/test/OpenMP/task_ast_print.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_ast_print.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/task_ast_print.cpp (original)
+++ cfe/trunk/test/OpenMP/task_ast_print.cpp Tue Dec 1 04:17:31 2015
@@ -36,9 +36,9 @@ T tmain(T argc, T *argv) {
T arr[argc];
#pragma omp task untied depend(in : argc, argv[b:argc], arr[:]) if (task : argc > 0)
a = 2;
-#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S<T>::TS > 0)
+#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S<T>::TS > 0) priority(argc)
foo();
-#pragma omp task if (C) mergeable
+#pragma omp task if (C) mergeable priority(C)
foo();
return 0;
}
@@ -50,9 +50,9 @@ T tmain(T argc, T *argv) {
// CHECK-NEXT: int arr[argc];
// CHECK-NEXT: #pragma omp task untied depend(in : argc,argv[b:argc],arr[:]) if(task: argc > 0)
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<int>::TS > 0)
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<int>::TS > 0) priority(argc)
// CHECK-NEXT: foo()
-// CHECK-NEXT: #pragma omp task if(5) mergeable
+// CHECK-NEXT: #pragma omp task if(5) mergeable priority(5)
// CHECK-NEXT: foo()
// CHECK: template <typename T = long, int C = 1> long tmain(long argc, long *argv) {
// CHECK-NEXT: long b = argc, c, d, e, f, g;
@@ -61,9 +61,9 @@ T tmain(T argc, T *argv) {
// CHECK-NEXT: long arr[argc];
// CHECK-NEXT: #pragma omp task untied depend(in : argc,argv[b:argc],arr[:]) if(task: argc > 0)
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<long>::TS > 0)
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<long>::TS > 0) priority(argc)
// CHECK-NEXT: foo()
-// CHECK-NEXT: #pragma omp task if(1) mergeable
+// CHECK-NEXT: #pragma omp task if(1) mergeable priority(1)
// CHECK-NEXT: foo()
// CHECK: template <typename T, int C> T tmain(T argc, T *argv) {
// CHECK-NEXT: T b = argc, c, d, e, f, g;
@@ -72,9 +72,9 @@ T tmain(T argc, T *argv) {
// CHECK-NEXT: T arr[argc];
// CHECK-NEXT: #pragma omp task untied depend(in : argc,argv[b:argc],arr[:]) if(task: argc > 0)
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<T>::TS > 0)
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<T>::TS > 0) priority(argc)
// CHECK-NEXT: foo()
-// CHECK-NEXT: #pragma omp task if(C) mergeable
+// CHECK-NEXT: #pragma omp task if(C) mergeable priority(C)
// CHECK-NEXT: foo()
enum Enum {};
@@ -87,12 +87,12 @@ int main(int argc, char **argv) {
#pragma omp threadprivate(a)
Enum ee;
// CHECK: Enum ee;
-#pragma omp task untied mergeable depend(out:argv[:a][1], (arr)[0:]) if(task: argc > 0)
- // CHECK-NEXT: #pragma omp task untied mergeable depend(out : argv[:a][1],(arr)[0:]) if(task: argc > 0)
+#pragma omp task untied mergeable depend(out:argv[:a][1], (arr)[0:]) if(task: argc > 0) priority(f)
+ // CHECK-NEXT: #pragma omp task untied mergeable depend(out : argv[:a][1],(arr)[0:]) if(task: argc > 0) priority(f)
a = 2;
// CHECK-NEXT: a = 2;
-#pragma omp task default(none), private(argc, b) firstprivate(argv) if (argc > 0) final(a > 0) depend(inout : a, argv[:argc],arr[:a])
- // CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) if(argc > 0) final(a > 0) depend(inout : a,argv[:argc],arr[:a])
+#pragma omp task default(none), private(argc, b) firstprivate(argv) if (argc > 0) final(a > 0) depend(inout : a, argv[:argc],arr[:a]) priority(23)
+ // CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) if(argc > 0) final(a > 0) depend(inout : a,argv[:argc],arr[:a]) priority(23)
foo();
// CHECK-NEXT: foo();
return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
Added: cfe/trunk/test/OpenMP/task_priority_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/task_priority_messages.cpp?rev=254398&view=auto
==============================================================================
--- cfe/trunk/test/OpenMP/task_priority_messages.cpp (added)
+++ cfe/trunk/test/OpenMP/task_priority_messages.cpp Tue Dec 1 04:17:31 2015
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp task priority // expected-error {{expected '(' after 'priority'}}
+ #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority () // expected-error {{expected expression}}
+ #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
+ #pragma omp task priority (S) // expected-error {{'S' does not refer to a value}}
+ #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority(0)
+ #pragma omp task priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
+ foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp task priority // expected-error {{expected '(' after 'priority'}}
+ #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority () // expected-error {{expected expression}}
+ #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
+ #pragma omp task priority (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task priority(0)
+ #pragma omp task priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
+ foo();
+
+ return tmain(argc, argv);
+}
Modified: cfe/trunk/test/OpenMP/taskloop_ast_print.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_ast_print.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_ast_print.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_ast_print.cpp Tue Dec 1 04:17:31 2015
@@ -13,14 +13,14 @@ T tmain(T argc) {
T b = argc, c, d, e, f, g;
static T a;
// CHECK: static T a;
-#pragma omp taskloop if(taskloop: argc > N) default(shared) untied
- // CHECK-NEXT: #pragma omp taskloop if(taskloop: argc > N) default(shared) untied
+#pragma omp taskloop if(taskloop: argc > N) default(shared) untied priority(N)
+ // CHECK-NEXT: #pragma omp taskloop if(taskloop: argc > N) default(shared) untied priority(N)
for (int i = 0; i < 2; ++i)
a = 2;
// CHECK-NEXT: for (int i = 0; i < 2; ++i)
// CHECK-NEXT: a = 2;
#pragma omp parallel
-#pragma omp taskloop private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) shared(g) if (c) final(d) mergeable
+#pragma omp taskloop private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) shared(g) if (c) final(d) mergeable priority(f)
for (int i = 0; i < 2; ++i)
for (int j = 0; j < 2; ++j)
for (int j = 0; j < 2; ++j)
@@ -33,7 +33,7 @@ T tmain(T argc) {
for (int j = 0; j < 2; ++j)
foo();
// CHECK-NEXT: #pragma omp parallel
- // CHECK-NEXT: #pragma omp taskloop private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) shared(g) if(c) final(d) mergeable
+ // CHECK-NEXT: #pragma omp taskloop private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) shared(g) if(c) final(d) mergeable priority(f)
// CHECK-NEXT: for (int i = 0; i < 2; ++i)
// CHECK-NEXT: for (int j = 0; j < 2; ++j)
// CHECK-NEXT: for (int j = 0; j < 2; ++j)
@@ -52,19 +52,19 @@ int main(int argc, char **argv) {
int b = argc, c, d, e, f, g;
static int a;
// CHECK: static int a;
-#pragma omp taskloop if(taskloop: a) default(none) shared(a) final(b)
- // CHECK-NEXT: #pragma omp taskloop if(taskloop: a) default(none) shared(a) final(b)
+#pragma omp taskloop if(taskloop: a) default(none) shared(a) final(b) priority(5)
+ // CHECK-NEXT: #pragma omp taskloop if(taskloop: a) default(none) shared(a) final(b) priority(5)
for (int i = 0; i < 2; ++i)
a = 2;
// CHECK-NEXT: for (int i = 0; i < 2; ++i)
// CHECK-NEXT: a = 2;
#pragma omp parallel
-#pragma omp taskloop private(argc, b), firstprivate(argv, c), lastprivate(d, f) collapse(2) shared(g) if(argc) mergeable
+#pragma omp taskloop private(argc, b), firstprivate(argv, c), lastprivate(d, f) collapse(2) shared(g) if(argc) mergeable priority(argc)
for (int i = 0; i < 10; ++i)
for (int j = 0; j < 10; ++j)
foo();
// CHECK-NEXT: #pragma omp parallel
- // CHECK-NEXT: #pragma omp taskloop private(argc,b) firstprivate(argv,c) lastprivate(d,f) collapse(2) shared(g) if(argc) mergeable
+ // CHECK-NEXT: #pragma omp taskloop private(argc,b) firstprivate(argv,c) lastprivate(d,f) collapse(2) shared(g) if(argc) mergeable priority(argc)
// CHECK-NEXT: for (int i = 0; i < 10; ++i)
// CHECK-NEXT: for (int j = 0; j < 10; ++j)
// CHECK-NEXT: foo();
Modified: cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_collapse_messages.cpp Tue Dec 1 04:17:31 2015
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { //expected-n
// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
#pragma omp taskloop collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
@@ -30,7 +30,7 @@ T tmain(T argc, S **argv) { //expected-n
#pragma omp taskloop collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp taskloop', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error at +2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error at +1 2 {{expression is not an integral constant expression}}
#pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { //expected-n
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse (1)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- #pragma omp taskloop collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp taskloop collapse (N) // expected-error {{argument to 'collapse' clause must be a strictly positive integer value}}
for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse (2) // expected-note {{as specified in 'collapse' clause}}
foo(); // expected-error {{expected 2 for loops after '#pragma omp taskloop'}}
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{expression is not an integral constant expression}}
// expected-error at +2 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error at +1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}}
Modified: cfe/trunk/test/OpenMP/taskloop_misc_messages.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_misc_messages.c?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_misc_messages.c (original)
+++ cfe/trunk/test/OpenMP/taskloop_misc_messages.c Tue Dec 1 04:17:31 2015
@@ -176,17 +176,17 @@ void test_collapse() {
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse(-5)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse(0)
for (i = 0; i < 16; ++i)
;
#pragma omp parallel
-// expected-error at +1 {{argument to 'collapse' clause must be a positive integer value}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse(5 - 5)
for (i = 0; i < 16; ++i)
;
Added: cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp?rev=254398&view=auto
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp (added)
+++ cfe/trunk/test/OpenMP/taskloop_priority_messages.cpp Tue Dec 1 04:17:31 2015
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority () // expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (S) // expected-error {{'S' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority(0)
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority () // expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority(0)
+ for (int i = 0; i < 10; ++i)
+ foo();
+ #pragma omp taskloop priority(-1) // expected-error {{argument to 'priority' clause must be a non-negative integer value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return tmain(argc, argv);
+}
Modified: cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_num_teams_messages.cpp Tue Dec 1 04:17:31 2015
@@ -46,7 +46,7 @@ T tmain(T argc) {
#pragma omp teams num_teams(S1) // expected-error {{'S1' does not refer to a value}}
foo();
#pragma omp target
-#pragma omp teams num_teams(-2) // expected-error {{argument to 'num_teams' clause must be a positive integer value}}
+#pragma omp teams num_teams(-2) // expected-error {{argument to 'num_teams' clause must be a strictly positive integer value}}
foo();
#pragma omp target
#pragma omp teams num_teams(-10u)
@@ -96,7 +96,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
-#pragma omp teams num_teams (-2) // expected-error {{argument to 'num_teams' clause must be a positive integer value}}
+#pragma omp teams num_teams (-2) // expected-error {{argument to 'num_teams' clause must be a strictly positive integer value}}
foo();
#pragma omp target
Modified: cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_thread_limit_messages.cpp Tue Dec 1 04:17:31 2015
@@ -46,7 +46,7 @@ T tmain(T argc) {
#pragma omp teams thread_limit(S1) // expected-error {{'S1' does not refer to a value}}
foo();
#pragma omp target
-#pragma omp teams thread_limit(-2) // expected-error {{argument to 'thread_limit' clause must be a positive integer value}}
+#pragma omp teams thread_limit(-2) // expected-error {{argument to 'thread_limit' clause must be a strictly positive integer value}}
foo();
#pragma omp target
#pragma omp teams thread_limit(-10u)
@@ -96,7 +96,7 @@ int main(int argc, char **argv) {
foo();
#pragma omp target
-#pragma omp teams thread_limit (-2) // expected-error {{argument to 'thread_limit' clause must be a positive integer value}}
+#pragma omp teams thread_limit (-2) // expected-error {{argument to 'thread_limit' clause must be a strictly positive integer value}}
foo();
#pragma omp target
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=254398&r1=254397&r2=254398&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Tue Dec 1 04:17:31 2015
@@ -2084,6 +2084,10 @@ void OMPClauseEnqueue::VisitOMPThreadLim
Visitor->AddStmt(C->getThreadLimit());
}
+void OMPClauseEnqueue::VisitOMPPriorityClause(const OMPPriorityClause *C) {
+ Visitor->AddStmt(C->getPriority());
+}
+
template<typename T>
void OMPClauseEnqueue::VisitOMPClauseList(T *Node) {
for (const auto *I : Node->varlists()) {
More information about the cfe-commits
mailing list