summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-08-30 13:08:03 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-08-30 13:08:03 +0000
commit8cd8ed88f9c9e6644b7a7b15ae59f3a640103fed (patch)
tree675063cbe1a5c9d727de08f1a7296ecef2fc1dcf /lib/Parse/ParseExpr.cpp
parent1e76ac204b57958e4c85763bb78eba1c46ecf252 (diff)
downloadclang-8cd8ed88f9c9e6644b7a7b15ae59f3a640103fed.tar.gz
[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
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp8
1 files changed, 5 insertions, 3 deletions
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()) {