HighCommander4 wrote: > > 3. Regarding the implementation approach, is it fine to add a flag to > > `PrintingPolicy` (which is a clang utility class used in a variety of > > places) for a clangd-specific use case like this? I did it this way because > > the alternative seemed to involve duplicating a bunch of code related to > > decl-printing, but I'm happy to explore alternatives if this is an issue. > > I feel like "print only public fields" is too specific for clangd use case, > and probably won't generalize to other callers at all. But I definitely agree > with all the concerns around duplicating code. Looks like we have some > `PrintingCallbacks`, maybe we can have something like `SummarizeTagDecl`, > which enables customizing what to put into the body, when printing a TagDecl > in terse mode?
Thanks for the suggestion! Using `PrintingCallbacks` here sounds like a promising idea. https://github.com/llvm/llvm-project/pull/89557 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits