usaxena95 added inline comments.
================ Comment at: clang/include/clang/Tooling/CompilationDatabase.h:194 + static std::unique_ptr<FixedCompilationDatabase> + loadFromBuffer(StringRef Path, StringRef Data, std::string &ErrorMsg); + ---------------- `Path` is not meaningful for load from buffer. May be change name to `Directory` and call loadFromBuffer(**llvm::sys::path::parent_path(Path)**, (*File)->getBuffer(), ErrorMsg); instead. ================ Comment at: clang/include/clang/Tooling/CompilationDatabase.h:194 + static std::unique_ptr<FixedCompilationDatabase> + loadFromBuffer(StringRef Path, StringRef Data, std::string &ErrorMsg); + ---------------- usaxena95 wrote: > `Path` is not meaningful for load from buffer. May be change name to > `Directory` and call loadFromBuffer(**llvm::sys::path::parent_path(Path)**, > (*File)->getBuffer(), ErrorMsg); instead. Do you intend to use it apart from testing ? ================ Comment at: clang/unittests/Tooling/CompilationDatabaseTest.cpp:553 + std::string ErrorMsg; + auto CDB = FixedCompilationDatabase::loadFromBuffer("/path/compile_flags.txt", + Data, ErrorMsg); ---------------- nit: change to something like `/path/to/cdb/dir` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92640/new/ https://reviews.llvm.org/D92640 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits