[llvm-branch-commits] [clang] release/23.x: [SSAF] Fix Expected return type in TypeConstrainedPointers deserialization (gcc 7.5.0) (PR #216677)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 17 02:53:15 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Jozef Sztabinski (jszt1)
<details>
<summary>Changes</summary>
Backport of: https://github.com/llvm/llvm-project/commit/8b0eab156025a55819868daf76ff32e28829d06a
Without this change build breaks on older GCCs (minimum required for implicit move on return is GCC 8.1).
Backporting this change **fixes build failures** with SLES15.4 which uses a system compiler of GCC7.5
---
Full diff: https://github.com/llvm/llvm-project/pull/216677.diff
1 Files Affected:
- (modified) clang/lib/ScalableStaticAnalysis/Analyses/TypeConstrainedPointers/TypeConstrainedPointers.cpp (+2-2)
``````````diff
diff --git a/clang/lib/ScalableStaticAnalysis/Analyses/TypeConstrainedPointers/TypeConstrainedPointers.cpp b/clang/lib/ScalableStaticAnalysis/Analyses/TypeConstrainedPointers/TypeConstrainedPointers.cpp
index 8e6d1c4507e26..26f010824e85f 100644
--- a/clang/lib/ScalableStaticAnalysis/Analyses/TypeConstrainedPointers/TypeConstrainedPointers.cpp
+++ b/clang/lib/ScalableStaticAnalysis/Analyses/TypeConstrainedPointers/TypeConstrainedPointers.cpp
@@ -212,7 +212,7 @@ deserializeSummary(const llvm::json::Object &Data, EntityIdTable &,
std::make_unique<TypeConstrainedPointersEntitySummary>();
Sum->Entities = std::move(*EntityIDSet);
- return Sum;
+ return std::unique_ptr<EntitySummary>(std::move(Sum));
}
struct TypeConstrainedPointersJSONFormatInfo final : JSONFormat::FormatInfo {
@@ -246,7 +246,7 @@ deserializeAnalysisResult(const llvm::json::Object &Data,
std::make_unique<TypeConstrainedPointersAnalysisResult>();
AR->Entities = std::move(*EntityIDSet);
- return AR;
+ return std::unique_ptr<AnalysisResult>(std::move(AR));
}
JSONFormat::AnalysisResultRegistry::Add<TypeConstrainedPointersAnalysisResult>
``````````
</details>
https://github.com/llvm/llvm-project/pull/216677
More information about the llvm-branch-commits
mailing list