[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-08-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Maybe add tests? Lit tests for code completion (`clang/test/CodeCompletion`) should be a good fit Comment at: include/clang/Parse/Parser.h:2971 + /// signature help working even when it is triggered inside a token. + bool CalledOverloadCompleti

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-08-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry, missed the dependent revision adding tests to clangd at first. Having another test in sema would still be great, to make sure we guard against regressions if someone does not have clang-tools-extra checked out. Repository: rC Clang https://reviews.llvm.

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-08-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 161966. kadircet marked 2 inline comments as done. kadircet added a comment. - Resolve discussions. - Add tests. - Fix a bug noticed by lit tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/Par

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-08-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. One major limitation of the current workaround is that IIRC clang can actually call code completion callbacks, including this method, multiple times (e.g. when completing inside a macro definition that gets expanded later in the file or during parser recovery). Th

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163970. kadircet added a comment. - Update tests. - Update comment. - Rebase. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 163971. kadircet added a comment. - Update comments. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp test/CodeCompletion/fun

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ---

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ---

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ily

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164307. kadircet added a comment. - Fix tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/CodeCompletion/function-overloads-inside-param.cpp test/CodeCompletion/function-

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ---

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ---

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/Index/complete-block-property-assignment.m:71 +// RUN: c-index-test -code-completion-at=%s:54:15 %s | FileCheck -check-prefix=CHECK-NO1 %s +// CHECK-NO1: ObjCPropertyDecl:{ResultType int}{TypedText foo} (35) ---

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164477. kadircet added a comment. - Rebase and use new signature help. Currently the problem is, there are again some tests out there that rely on CodeCompeleteOrdinaryName to be called even when getting overloads at an unknown parameter type. These tests ar

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > Currently the problem is, there are again some tests out there that rely on > CodeCompeleteOrdinaryName to be called even when getting overloads at an > unknown > parameter type CodeCompleteExpression works just fine there. Unknown parameter type should not bl

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In https://reviews.llvm.org/D51038#1228618, @ilya-biryukov wrote: > > Currently the problem is, there are again some tests out there that rely on > > CodeCompeleteOrdinaryName to be called even when getting overloads at an > > unknown > > parameter type > > CodeComple

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164639. kadircet marked an inline comment as done. kadircet added a comment. - Change "inside parameter" checking and fix completion string printing for optional parameters. - Update tests. Repository: rC Clang https://reviews.llvm.org/D51038 Files:

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Parse/Parser.h:217 + /// Gets set to true after calling ProduceSignaturehelp, it is for a + /// workaround to make sure ProduceSignatureHelp is only called at the deepest s/ProduceSignaturehelp/P

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. ilya-biryukov added inline comments. Comment at: lib/Sema/CodeCompleteConsumer.cpp:622 +case CodeCompletionString::CK_Optional: + break; This change is really sneaky and unrelated to the rest of the patch. It should defi

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164649. kadircet marked 2 inline comments as done. kadircet added a comment. - Resolve discussions. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Pars

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Parse/ParseExpr.cpp:1663 if (Tok.isNot(tok::r_paren)) { - if (ParseExpressionList(ArgExprs, CommaLocs, [&] { -QualType PreferredType = Actions.ProduceCallSignatureHelp( -get

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/CodeCompleteConsumer.cpp:622 +case CodeCompletionString::CK_Optional: + break; ilya-biryukov wrote: > This change is really sneaky and unrelated to the rest of the patch. It > should definitely

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:2827 if (Tok.isNot(tok::r_paren)) { + ParsedType TypeRep = + Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get(); ilya-biryukov wrote: > ActOnTypeName is called

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164659. kadircet added a comment. - Inline completers. Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Parse/ParseExprCXX.cpp lib/Parse/ParseOpenMP.cp

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Thanks! LGTM Comment at: lib/Parse/ParseExprCXX.cpp:1687 if (Tok.isNot(tok::r_paren)) { - if (ParseExpressionList(Exprs, CommaLocs, [&] { -

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 164661. kadircet marked an inline comment as done. kadircet added a comment. - One last completer Repository: rC Clang https://reviews.llvm.org/D51038 Files: include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Parse/

[PATCH] D51038: [clang] Make sure codecompletion is called for calls even when inside a token.

2018-09-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341824: [clang] Make sure codecompletion is called for calls even when inside a token. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://review