[clang-tools-extra] [clang-doc] Add basic benchmarks for library functionality (PR #182620)
Carlos Alberto Enciso via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 23:52:10 PST 2026
CarlosAlbertoEnciso wrote:
@ilovepi I am getting the following compile error on Windows and Linux on `clang-tools-extra\clang-doc\benchmarks\ClangDocBenchmark.cpp`
Windows (Visual Studio Professional 2019 Version 16.11.53)
```
1>ClangDocBenchmark.cpp
1>..\llvm-project\clang-tools-extra\clang-doc\benchmarks\ClangDocBenchmark.cpp(82,26): error C2664: 'clang::doc::ClangDocContext::ClangDocContext(clang::tooling::ExecutionContext *,llvm::StringRef,bool,llvm::StringRef,llvm::StringRef,llvm::StringRef,llvm::StringRef,llvm::StringRef,std::vector<std::string,std::allocator<std::string>>,clang::DiagnosticsEngine &,clang::doc::OutputFormatTy,bool)': cannot convert argument 11 from 'bool' to 'clang::doc::OutputFormatTy'
1>..\llvm-project\clang-tools-extra\clang-doc\benchmarks\ClangDocBenchmark.cpp(83,34): message : Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
```
Linux - Ubuntu 22.04.5 LTS - g++ 11.4.0
```
../llvm-project/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp: In function ‘void clang::doc::BM_Mapper_Scale(benchmark::State&)’:
../llvm-ref/llvm-project/clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp:83:39: error: no matching function for call to ‘clang::doc::ClangDocContext::ClangDocContext(clang::tooling::ExecutionContext*, const char [13], bool, const char [1], const char [1], const char [1], const char [1], const char [1], <brace-enclosed initializer list>, clang::DiagnosticsEngine&, bool)’
83 | Diags, false);
| ^
```
The `clang-tools-extra\clang-doc\benchmarks\ClangDocBenchmark.cpp` was introduced by this patch.
Thanks
https://github.com/llvm/llvm-project/pull/182620
More information about the cfe-commits
mailing list