From c74a8adda3bc4fc5714aef14cdcfda944d3038a0 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 8 Jan 2020 09:39:44 -0500 Subject: [OPENMP]Allow comma in combiner expression. Use ParseExpression() instead of ParseAssignmentExpression() to allow commas in combiner expressions. --- clang/lib/Parse/ParseOpenMP.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Parse/ParseOpenMP.cpp') diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 31ae3af70b7..24855df334f 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -343,9 +343,8 @@ Parser::ParseOpenMPDeclareReductionDirective(AccessSpecifier AS) { Scope::OpenMPDirectiveScope); // Parse expression. Actions.ActOnOpenMPDeclareReductionCombinerStart(getCurScope(), D); - ExprResult CombinerResult = - Actions.ActOnFinishFullExpr(ParseAssignmentExpression().get(), - D->getLocation(), /*DiscardedValue*/ false); + ExprResult CombinerResult = Actions.ActOnFinishFullExpr( + ParseExpression().get(), D->getLocation(), /*DiscardedValue*/ false); Actions.ActOnOpenMPDeclareReductionCombinerEnd(D, CombinerResult.get()); if (CombinerResult.isInvalid() && Tok.isNot(tok::r_paren) && -- cgit v1.2.3