https://github.com/steakhal created 
https://github.com/llvm/llvm-project/pull/186897

Addresses:
https://github.com/llvm/llvm-project/pull/186156#issuecomment-4070258854

From 4f7bdb7ab19c89494162bf78e991e23372da027a Mon Sep 17 00:00:00 2001
From: Balazs Benics <[email protected]>
Date: Mon, 16 Mar 2026 21:56:55 +0000
Subject: [PATCH] [clang][ssaf] Workaround gcc-7 NRVO bug

Addresses:
https://github.com/llvm/llvm-project/pull/186156#issuecomment-4070258854
---
 .../Core/SummaryData/SummaryDataStore.h                         | 2 +-
 .../Core/SummaryData/LUSummaryConsumer.cpp                      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/clang/include/clang/ScalableStaticAnalysisFramework/Core/SummaryData/SummaryDataStore.h
 
b/clang/include/clang/ScalableStaticAnalysisFramework/Core/SummaryData/SummaryDataStore.h
index f817dda9745c11..2d20696c65cf3f 100644
--- 
a/clang/include/clang/ScalableStaticAnalysisFramework/Core/SummaryData/SummaryDataStore.h
+++ 
b/clang/include/clang/ScalableStaticAnalysisFramework/Core/SummaryData/SummaryDataStore.h
@@ -106,7 +106,7 @@ class SummaryDataStore {
     }
     auto Ptr = std::move(It->second);
     Data.erase(It);
-    return Ptr;
+    return std::move(Ptr);
   }
 };
 
diff --git 
a/clang/lib/ScalableStaticAnalysisFramework/Core/SummaryData/LUSummaryConsumer.cpp
 
b/clang/lib/ScalableStaticAnalysisFramework/Core/SummaryData/LUSummaryConsumer.cpp
index e6f21d8c54799e..79b1e23bdd9e8a 100644
--- 
a/clang/lib/ScalableStaticAnalysisFramework/Core/SummaryData/LUSummaryConsumer.cpp
+++ 
b/clang/lib/ScalableStaticAnalysisFramework/Core/SummaryData/LUSummaryConsumer.cpp
@@ -55,7 +55,7 @@ LUSummaryConsumer::run(llvm::ArrayRef<SummaryName> Names) {
     }
     Store.Data.emplace(SN, std::move(*Result));
   }
-  return Store;
+  return std::move(Store);
 }
 
 SummaryDataStore LUSummaryConsumer::run() && {

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to