sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land.
It seems like a lit test for this would be terrible. A ClangdServer one should be possible, but I can't quite wrap my head around how to write it. (Delivering the PreambleData as a param would make the test easier, you could assert that the preamble version was > any previously notified preamble & also > any preamble previously obtained via runWithPreamble.) ================ Comment at: clang-tools-extra/clangd/TUScheduler.h:175 + /// on the file are guranteed to see new semantics after the callback. + virtual void onSemanticsMaybeChanged(PathRef File) {} }; ---------------- This seems a little vague/abstract for TUScheduler. The "caller" (i.e. ClangdServer impl) needs to know about preambles etc, c.f. onPreambleAST in this same interface. I'd suggest `onPreambleActive` or `onPreamblePublished` or something like that. (Passing the PreambleData struct as a param would also hint nicely at the distinction vs onPreambleAST but is maybe too cute if we're not actually going to use it...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102761/new/ https://reviews.llvm.org/D102761 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits