nridge marked an inline comment as done. nridge added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:215 /// to this function. -/// The `CheckMacroExpansion` parameter determines whether the function should -/// handle the case where the diagnostic is inside a macro expansion. A degree -/// of control over this is needed because handling this case can require -/// examining source files other than the one in which the diagnostic is -/// located, and in some use cases we cannot rely on such other files being -/// mapped in the SourceMapper. +/// If a valid FileID is passed as `FileFilter`, the function does not attempt +/// to read source files other than the one identified by the filter. A degree ---------------- sammccall wrote: > I do wonder a how hard it would be to approach this more directly: > (conditionally )use some API for pulling code out of the SourceManager that > *won't* silently do IO. > ContentCache::getRawBuffer() or something? > > Up to you whether to look at this at all of course, this approach is better > than what we have now. I gave this a try in the updated patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75286/new/ https://reviews.llvm.org/D75286 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits