From 5e5d412fc4f35e66b83f40e8746d7cbb1d8c33cc Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 23 Nov 2022 18:38:23 +0100 Subject: [PATCH] GccToolChain: Create process on stack Amends 948f0070fabef91c721a32fd4c1f1e9c0087e4d4 Change-Id: I67c537f19da6cd012d1d51d80f0b987dd2b1fede Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/gcctoolchain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index bcf6cab5a2f..d70ef54d0be 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1564,10 +1564,10 @@ bool ClangToolChain::matchesCompilerCommand(const FilePath &command) const m_resolvedCompilerCommand = FilePath(); if (HostOsInfo::isMacHost() && compilerCommand().parentDir() == FilePath::fromString("/usr/bin")) { - std::unique_ptr xcrun(new QtcProcess); - xcrun->setCommand({"/usr/bin/xcrun", {"-f", compilerCommand().fileName()}}); - xcrun->runBlocking(); - const FilePath output = FilePath::fromString(xcrun->cleanedStdOut().trimmed()); + QtcProcess xcrun; + xcrun.setCommand({"/usr/bin/xcrun", {"-f", compilerCommand().fileName()}}); + xcrun.runBlocking(); + const FilePath output = FilePath::fromString(xcrun.cleanedStdOut().trimmed()); if (output.isExecutableFile() && output != compilerCommand()) m_resolvedCompilerCommand = output; }