From 10e775f4a882ec49e374bbeca567e91547d78312 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 30 Jul 2015 11:36:16 +0000 Subject: [OPENMP 4.1] Initial support for extended 'ordered' clause. OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive. 'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest. Patch adds parsing and semantic analysis for this optional argument. llvm-svn: 243635 --- clang/lib/AST/StmtPrinter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/StmtPrinter.cpp') diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 30f15e037ba..57187ca8620 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -651,8 +651,13 @@ void OMPClausePrinter::VisitOMPScheduleClause(OMPScheduleClause *Node) { OS << ")"; } -void OMPClausePrinter::VisitOMPOrderedClause(OMPOrderedClause *) { +void OMPClausePrinter::VisitOMPOrderedClause(OMPOrderedClause *Node) { OS << "ordered"; + if (auto *Num = Node->getNumForLoops()) { + OS << "("; + Num->printPretty(OS, nullptr, Policy, 0); + OS << ")"; + } } void OMPClausePrinter::VisitOMPNowaitClause(OMPNowaitClause *) { -- cgit v1.2.3