This commit partially reverts ddbcc10b to fix `clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-run-with-database.cpp`.