Author: Erick Velez Date: 2026-03-06T11:53:04-08:00 New Revision: 2cb01dc5b6dcc8b935ae3316626d8a8b87192019
URL: https://github.com/llvm/llvm-project/commit/2cb01dc5b6dcc8b935ae3316626d8a8b87192019 DIFF: https://github.com/llvm/llvm-project/commit/2cb01dc5b6dcc8b935ae3316626d8a8b87192019.diff LOG: [clang-doc] Fix benchmark not compiling (#185065) CI didn't flag that the benchmark was using the outdated Ctx call when landing the Mustache MD patch since this benchmark isn't tested. Also added missing libraries in CMake that prevented me from building the benchmark locally. Added: Modified: clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt b/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt index c3ae6fde8eeaf..055d443c38e31 100644 --- a/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt +++ b/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt @@ -15,4 +15,6 @@ target_link_libraries(ClangDocBenchmark clangTooling clangBasic clangAST + clangFrontend + clangSerialization ) diff --git a/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp b/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp index 652000b15dc5f..e909fafed8c62 100644 --- a/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp +++ b/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp @@ -80,7 +80,7 @@ static void BM_Mapper_Scale(benchmark::State &State) { tooling::InMemoryToolResults Results; tooling::ExecutionContext ECtx(&Results); ClangDocContext CDCtx(&ECtx, "test-project", false, "", "", "", "", "", {}, - Diags, false); + Diags, OutputFormatTy::json, false); auto ActionFactory = doc::newMapperActionFactory(CDCtx); std::unique_ptr<FrontendAction> Action = ActionFactory->create(); tooling::runToolOnCode(std::move(Action), Code, "test.cpp"); @@ -193,7 +193,7 @@ static void BM_JSONGenerator_Scale(benchmark::State &State) { DiagnosticOptions DiagOpts; DiagnosticsEngine Diags(DiagID, DiagOpts, new IgnoringDiagConsumer()); ClangDocContext CDCtx(nullptr, "test-project", false, "", "", "", "", "", {}, - Diags, false); + Diags, OutputFormatTy::json, false); std::string Output; llvm::raw_string_ostream OS(Output); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
