[cfe-dev] [RFC][CodeCompletion] Pre-expanding parameter placeholders in out-of-line method completion results
Alex L via cfe-dev
cfe-dev at lists.llvm.org
Fri Mar 3 03:08:33 PST 2017
Hi all,
Consider the following snippet of C++ code:
class Const {
public:
void foo(int x, int y) const;
void foo(Const &x) const;
};
void Const::
If we invoke Clang's code-completion after '::', Clang will produce the
following results for the out-of-line method declarations:
COMPLETION: foo : [#void#]foo(<#int x#>, <#int y#>)[# const#]
COMPLETION: foo : [#void#]foo(<#Const &x#>)[# const#]
The weird <##> tokens mean that currently method parameters are specified
as completion placeholders. This means that a user might have to expand
them manually (e.g. when their IDE treats those placeholders differently
from the rest of the completion result).
I would like to change these completion results. Instead of having
placeholders for parameters Clang should just specify the parameters
directly. The example above would then produce the following completion
results:
COMPLETION: foo : [#void#]foo(int x, int y)[# const#]
COMPLETION: foo : [#void#]foo(Const &x)[# const#]
Do you have any comments/suggestions/objections for this proposal?
Cheers,
Alex
PS: Please note that this change is not going to affect completions for the
method calls, but just for the out-of-line method definitions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170303/aa05124e/attachment.html>
More information about the cfe-dev
mailing list