[cfe-dev] code completion macros show private stuff

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 29 02:36:57 PDT 2015


+sergey, milian

On Mon, Sep 28, 2015 at 6:22 PM Willy WOLFF via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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?


>
> I've modified locally the tool to do so:
> $ svn diff
> Index: CodeCompleteConsumer.cpp
> ===================================================================
> --- CodeCompleteConsumer.cpp (revision 248706)
> +++ CodeCompleteConsumer.cpp (working copy)
> @@ -437,6 +437,10 @@
>
>    // Print the results.
>    for (unsigned I = 0; I != NumResults; ++I) {
> +    if ((Results[I].Availability == CXAvailability_NotAvailable) ||
> +        (Results[I].Availability == CXAvailability_NotAccessible))
> +      continue;
> +
>      OS << "COMPLETION: ";
>      switch (Results[I].Kind) {
>      case CodeCompletionResult::RK_Declaration:
>
>
> Best Regards,
> Willy.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150929/caf9f4e8/attachment.html>


More information about the cfe-dev mailing list