<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63087>63087</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-tidy fails to link with `error: undefined reference to 'clang::include_cleaner::RecordedPP::record(clang::Preprocessor const&)'`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy,
build-problem
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sylvestre
</td>
</tr>
</table>
<pre>
Seems that https://reviews.llvm.org/rG860e439fb27f86b97bfd9acce5e27f4337c471c7 wasn't enough:
```
: && /build/source/build-llvm/./bin/clang++ -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/build/source/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/build/source/= -no-canonical-prefixes -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O2 -DNDEBUG -g1 -Wl,-z,relro -Wl,--build-id -fuse-ld=gold -Wl,--export-dynamic tools/clang/tools/extra/clang-tidy/tool/CMakeFiles/clang-tidy.dir/ClangTidyToolMain.cpp.o -o bin/clang-tidy -Wl,-rpath,"\$ORIGIN/../lib:/build/source/build-llvm/tools/clang/stage2-bins/lib:" lib/libclangTidy.a lib/libclangTidyMain.a lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a lib/libclangTidyAlteraModule.a lib/libclangTidyBoostModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyCERTModule.a lib/libclangTidyConcurrencyModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyHICPPModule.a lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyMiscModule.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libclangTidyModernizeModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyUtils.a lib/libclangTidy.a lib/libclang-cpp.so.17 lib/libLLVM-17.so.1 && :
build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:84: error: undefined reference to 'clang::include_cleaner::RecordedPP::record(clang::Preprocessor const&)'
build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:86: error: undefined reference to 'clang::include_cleaner::PragmaIncludes::record(clang::Preprocessor&)'
build-llvm/tools/clang/stage2-bins/clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:117: error: undefined reference to 'clang::include_cleaner::walkUsed(llvm::ArrayRef<clang::Decl*>, llvm::ArrayRef<clang::include_cleaner::SymbolReference>, clang::include_cleaner::PragmaIncludes const*, clang::SourceManager const&, llvm::function_ref<void (clang::include_cleaner::SymbolReference const&, llvm::ArrayRef<clang::include_clea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