From 8cd8ed88f9c9e6644b7a7b15ae59f3a640103fed Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 30 Aug 2018 13:08:03 +0000 Subject: [CodeComplete] Report location of opening parens for signature help Summary: Used in clangd. Reviewers: sammccall Reviewed By: sammccall Subscribers: ioeric, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51436 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341063 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseExpr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Parse/ParseExpr.cpp') diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index d1d8507af8..39bf1c6398 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1650,7 +1650,8 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { CommaLocsTy CommaLocs; if (Tok.is(tok::code_completion)) { - Actions.CodeCompleteCall(getCurScope(), LHS.get(), None); + Actions.CodeCompleteCall(getCurScope(), LHS.get(), None, + PT.getOpenLocation()); cutOffParsing(); return ExprError(); } @@ -1658,8 +1659,9 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { if (OpKind == tok::l_paren || !LHS.isInvalid()) { if (Tok.isNot(tok::r_paren)) { if (ParseExpressionList(ArgExprs, CommaLocs, [&] { - Actions.CodeCompleteCall(getCurScope(), LHS.get(), ArgExprs); - })) { + Actions.CodeCompleteCall(getCurScope(), LHS.get(), ArgExprs, + PT.getOpenLocation()); + })) { (void)Actions.CorrectDelayedTyposInExpr(LHS); LHS = ExprError(); } else if (LHS.isInvalid()) { -- cgit v1.2.1