diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index b01b1473ea1..82dd441cce5 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1331,12 +1331,12 @@ QList ClangToolChainFactory::autoDetect(const QList &a const FileName compilerPath = FileName::fromString(Core::ICore::clangExecutable(CLANG_BINDIR)); if (!compilerPath.isEmpty()) { - tcs.append(autoDetectToolchains(compilerPath.parentDir().appendPath( - HostOsInfo::withExecutableSuffix("clang++")), + const FileName clang = compilerPath.parentDir().appendPath( + HostOsInfo::withExecutableSuffix("clang")); + tcs.append(autoDetectToolchains(clang, hostAbi, Constants::CXX_LANGUAGE_ID, Constants::CLANG_TOOLCHAIN_TYPEID, alreadyKnown)); - tcs.append(autoDetectToolchains(compilerPath.parentDir().appendPath( - HostOsInfo::withExecutableSuffix("clang")), + tcs.append(autoDetectToolchains(clang, hostAbi, Constants::C_LANGUAGE_ID, Constants::CLANG_TOOLCHAIN_TYPEID, alreadyKnown)); }