sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/Diagnostics.cpp:102 + auto PatchedRange = [&M](CharSourceRange &R) { + // FIXME: Should we handle all presumed locations? + R.setBegin(translatePreamblePatchLocation(R.getBegin(), M)); ---------------- I think we answered this in the negative? ================ Comment at: clang-tools-extra/clangd/Diagnostics.cpp:715 - D.InsideMainFile = isInsideMainFile(Info); + auto PLoc = translatePreamblePatchLocation(Info.getLocation(), SM); + D.InsideMainFile = isInsideMainFile(PLoc, SM); ---------------- PLoc is a confusing name for something that interacts with but is not a PresumedLoc I'd prefer avoiding auto here, too ================ Comment at: clang-tools-extra/clangd/SourceCode.cpp:1225 + // Checks whether \p FileName is a valid spelling of main file. + auto IsMainFile = [](llvm::StringRef FileName, const SourceManager &SM) { + auto FE = SM.getFileManager().getFile(FileName); ---------------- just make it a function? it captures nothing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143095/new/ https://reviews.llvm.org/D143095 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits