diff options
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index a413e96a91e..c53eae3067e 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -415,11 +415,14 @@ void Parser::ParseOpenMPReductionInitializerForDecl(VarDecl *OmpPrivParm) { ExprVector Exprs; CommaLocsTy CommaLocs; - if (ParseExpressionList(Exprs, CommaLocs, [this, OmpPrivParm, &Exprs] { - Actions.CodeCompleteConstructor( - getCurScope(), OmpPrivParm->getType()->getCanonicalTypeInternal(), - OmpPrivParm->getLocation(), Exprs); - })) { + SourceLocation LParLoc = T.getOpenLocation(); + if (ParseExpressionList( + Exprs, CommaLocs, [this, OmpPrivParm, LParLoc, &Exprs] { + Actions.CodeCompleteConstructor( + getCurScope(), + OmpPrivParm->getType()->getCanonicalTypeInternal(), + OmpPrivParm->getLocation(), Exprs, LParLoc); + })) { Actions.ActOnInitializerError(OmpPrivParm); SkipUntil(tok::r_paren, tok::annot_pragma_openmp_end, StopBeforeMatch); } else { |