code completion macros show private stuff

Hi all,

Regarding the code completion macros tool; by default, this tool, when
asked for completing a method or an attribute, it proposes all
possibilities, whatever it is declared public or private.

Would it not be more interesting to show only correct completion by
default? Or at least, give this information.

I've modified locally the tool to do so:
$ svn diff
Index: CodeCompleteConsumer.cpp

+sergey, milian

Hi all,

Regarding the code completion macros tool; by default, this tool, when
asked for completing a method or an attribute, it proposes all
possibilities, whatever it is declared public or private.

Would it not be more interesting to show only correct completion by
default? Or at least, give this information.

Generally seems to make sense; Sergey, Milian, thoughts?

+sergey, milian

> Hi all,
>
> Regarding the code completion macros tool; by default, this tool, when
> asked for completing a method or an attribute, it proposes all
> possibilities, whatever it is declared public or private.
>
> Would it not be more interesting to show only correct completion by
> default? Or at least, give this information.

Generally seems to make sense; Sergey, Milian, thoughts?

Hey all,

it makes sense from reading the code. But what tool are we talking about? This
is code inside PrintingCodeCompleteConsumer::ProcessCodeCompleteResults -
where is that being used? If this is used for debug purposes, it might make
sense to print all results, no?

Bye

Hi,

This tool is used by utis/clang-completion-mode.el for allowing code
completion in emacs, I don't know if it is used somewhere else.

For code completion, it is clearly not useful to show something which
could cause errors. And for debug purpose, it might make sense to show
this information, no?

Hi,

Seems like it's used when "clang -cc1 -code-completion-at=..." is
invoked. In that case, I think it makes more sense to print that a
result is inaccessible/unavailable instead. Also this is what
"c-index-test -code-completion-at" does.