ilya-biryukov added inline comments.
================ Comment at: clangd/ClangdUnit.cpp:38 +class DelegatingPPCallbacks : public PPCallbacks { + ---------------- Nebiroth wrote: > ilya-biryukov wrote: > > What's the purpose of this class? > We need to be able to use a wrapper class to be able to make a unique_ptr to > be sent to PrecompiledPreamble::Build in order to add the list of > preprocessor Callbacks. Could we implement an instance of `PPCallbacks` that contains `CppFilePreambleCallbacks` and forwards to that specific method instead? The reason is that we're not really delegating other methods in this calls(nor should we, the implementation would be too compilcated). Having a class that contains `CppFilePreambleCallbacks &Collector` and calling `Collector.InclusionDirective` seems perfectly fine, though: its purpose is clear and the implementation is easy. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38639 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits