arphaman added a comment.
I'll take a look, but my guess is that you might have to use scoping information
https://reviews.llvm.org/D39730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
jkorous-apple added a comment.
No luck. If I understand it correctly all the information that would be needed
to distinguish between:
foo::
and
int i = foo::
in ResultBuilder::AddResult() is missing since the context is represented only
by DeclContext. Something like a DirectASTParentNod
jkorous-apple added a comment.
Sorry for delays, I'm working on this on and off when there's nothing more
important.
Let me specify a little narrower scope of this change:
- Make code completion contain constructor item for out-of-line constructor
definition: struct foo { foo(); }; foo:: // re
arphaman added a comment.
In https://reviews.llvm.org/D39730#926108, @jkorous-apple wrote:
> Sorry, what do you mean by "this works in the body of the class"?
>
> Definition of constructor inside class definition has been working even
> before:
>
> struct foo {
> foo();
> f
> };
>
jkorous-apple added a comment.
Sorry, what do you mean by "this works in the body of the class"?
Definition of constructor inside class definition has been working even before:
struct foo {
foo();
f
};
Do you mean that a test shall be added in order to check that it still works?
https:/
arphaman added a comment.
Also,
Comment at: lib/Sema/SemaCodeComplete.cpp:980
+ if (isa(R.Declaration)
+ && dyn_cast(CurContext) == nullptr
+ && dyn_cast(CurContext) == nullptr
arphaman wrote:
> You can use `!isa`
Have you checked if this check works
arphaman added a comment.
It doesn't look like this works in the body of the class (at least there's no
test for it). For that you might have to inject these kind results by
performing another lookup when completing inside the body of the class.
Comment at: lib/Sema/SemaCodeC
jkorous-apple updated this revision to Diff 122470.
jkorous-apple added a comment.
I am able to enable ctor completion selectively in translate unit scope and
namespace scope so ctor completion does not appear in dot access context. I
haven't figured out how to explicitly specify that completion
jkorous-apple added a comment.
I agree and it seems to be the case but I will upgrade my ad-hoc testing code
snippet to a proper test as I should have done it in the first place. I also
agree that this change looks really suspicious and I was basically surprised
that it works.
https://reviews
arphaman added a comment.
This approach doesn't look right. We don't want to code-complete constructors
after the `.`. Instead we want to complete the constructors/destructors in
bodies of classes and in out-of-line declarations after `~`, right?
https://reviews.llvm.org/D39730
jkorous-apple created this revision.
Herald added a subscriber: eraman.
It seems like constructor code completion was intentionally disabled ages ago
in this commit (and refactored later):
commit 33224e61bfca370850abae89bbd415a4dabe07fa
Author: Douglas Gregor
Date: Fri Sep 18 17:42:29 2009 +0
11 matches
Mail list logo