[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
llvm-svn: 341063
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index d1d8507..39bf1c6 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -1650,7 +1650,8 @@
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 @@
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()) {