From 3d0ff7ef290c24b239fc92ef045c6293fb930dcf Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 26 Sep 2023 14:39:02 +0200 Subject: [PATCH] ProjectExplorer: Simplify detection of "built-in" clang This is also the only case that triggered the short code path in findCompilerCandidates(). Change-Id: Id8a88a275655526733e80c30250800db66ac6653 Reviewed-by: David Schulz Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/gcctoolchain.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index bbed2800a86..41b6cf2dc1f 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1344,9 +1344,8 @@ Toolchains GccToolChainFactory::autoDetect(const ToolchainDetector &detector_) c const FilePath compilerPath = Core::ICore::clangExecutable(CLANG_BINDIR); if (!compilerPath.isEmpty()) { - const FilePath clang = compilerPath.parentDir().pathAppended("clang").withExecutableSuffix(); tcs.append( - autoDetectToolchains(findCompilerCandidates(detector, clang.toString(), false), + autoDetectToolchains({compilerPath}, Constants::C_LANGUAGE_ID, Constants::CLANG_TOOLCHAIN_TYPEID, ToolchainDetector(known, detector.device, detector.searchPaths), @@ -1454,10 +1453,6 @@ static FilePaths findCompilerCandidates(const ToolchainDetector &detector, const QString &compilerName, bool detectVariants) { - const QFileInfo fi(compilerName); - if (detector.device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE && fi.isAbsolute() && fi.isFile()) - return {FilePath::fromString(compilerName)}; - QStringList nameFilters(compilerName); if (detectVariants) { nameFilters