[cfe-dev] code completion macros show private stuff
Milian Wolff via cfe-dev
cfe-dev at lists.llvm.org
Tue Sep 29 09:36:13 PDT 2015
On Dienstag, 29. September 2015 09:36:57 CEST Manuel Klimek wrote:
> +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?
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
> > 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
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150929/27e9e021/attachment.sig>
More information about the cfe-dev
mailing list