balazske added inline comments.
================ Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:362 - return ASTUnit::LoadFromASTFile( - std::string(ASTFilePath), CI.getPCHContainerOperations()->getRawReader(), - ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts()); + auto LoadFromFile = [this](StringRef Path) { + IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions(); ---------------- Is here a lambda necessary? I think it must not be over-used. In this case we can construct the file path as the first step and then use it to load the file, without using lambda call. ================ Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:583 + CommandLineArgs.begin(), + [](auto &&CmdPart) { return CmdPart.c_str(); }); + ---------------- Is here a special reason to use `auto &&` type (and not `auto &` or `std::string &`)? Probably this code is faulty: The `CmdPart` is moved out and then destructed, before the content of it (where the `c_str` points to) is used? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75665/new/ https://reviews.llvm.org/D75665 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits