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
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.
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
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
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
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
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)
---
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)
---
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
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-
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)
---
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)
---
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)
---
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
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
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
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:
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
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
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
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
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
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
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
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, [&] {
-
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/
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
27 matches
Mail list logo