From 875d13fc4061c55192dbaa66e0612ef651a19f68 Mon Sep 17 00:00:00 2001 From: kynehc Date: Thu, 18 Dec 2025 17:22:31 +0800 Subject: [PATCH 1/3] Adjusted the ConstantEdgeFunction member templates to use trailing requires std::derived_from> so Clang-llvm@16 can compile --- .../DataFlow/IfdsIde/EdgeFunctionUtils.h | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h index dc1b2d816a..d8ba582b5e 100644 --- a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h @@ -52,15 +52,17 @@ template struct ConstantEdgeFunction { return Value; } - template > ConcreteEF> + template [[nodiscard]] static EdgeFunction compose(EdgeFunctionRef This, - const EdgeFunction &SecondFunction); + const EdgeFunction &SecondFunction) + requires std::derived_from>; - template > ConcreteEF> + template [[nodiscard]] static EdgeFunction join(EdgeFunctionRef This, - const EdgeFunction &OtherFunction); + const EdgeFunction &OtherFunction) + requires std::derived_from>; [[nodiscard]] constexpr bool isConstant() const noexcept { return true; } @@ -441,10 +443,11 @@ EdgeFunction EdgeIdentity::join(EdgeFunctionRef This, } template -template > ConcreteEF> +template EdgeFunction ConstantEdgeFunction::compose(EdgeFunctionRef This, - const EdgeFunction &SecondFunction) { + const EdgeFunction &SecondFunction) + requires std::derived_from> { if (auto Default = defaultComposeOrNull(This, SecondFunction)) { return Default; } @@ -482,10 +485,11 @@ ConstantEdgeFunction::compose(EdgeFunctionRef This, } template -template > ConcreteEF> +template EdgeFunction ConstantEdgeFunction::join(EdgeFunctionRef This, - const EdgeFunction &OtherFunction) { + const EdgeFunction &OtherFunction) + requires std::derived_from> { if (auto Default = defaultJoinOrNull(This, OtherFunction)) { return Default; } From 02005137d9c8b1c78fdcae9dda64ec581e3e3b45 Mon Sep 17 00:00:00 2001 From: kynehc Date: Thu, 18 Dec 2025 23:53:16 +0800 Subject: [PATCH 2/3] fix the formatting --- include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h index d8ba582b5e..5eea05f2f9 100644 --- a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h @@ -54,14 +54,12 @@ template struct ConstantEdgeFunction { template [[nodiscard]] static EdgeFunction - compose(EdgeFunctionRef This, - const EdgeFunction &SecondFunction) + compose(EdgeFunctionRef This, const EdgeFunction &SecondFunction) requires std::derived_from>; template [[nodiscard]] static EdgeFunction - join(EdgeFunctionRef This, - const EdgeFunction &OtherFunction) + join(EdgeFunctionRef This, const EdgeFunction &OtherFunction) requires std::derived_from>; [[nodiscard]] constexpr bool isConstant() const noexcept { return true; } @@ -447,7 +445,8 @@ template EdgeFunction ConstantEdgeFunction::compose(EdgeFunctionRef This, const EdgeFunction &SecondFunction) - requires std::derived_from> { + requires std::derived_from> +{ if (auto Default = defaultComposeOrNull(This, SecondFunction)) { return Default; } @@ -489,7 +488,8 @@ template EdgeFunction ConstantEdgeFunction::join(EdgeFunctionRef This, const EdgeFunction &OtherFunction) - requires std::derived_from> { + requires std::derived_from> +{ if (auto Default = defaultJoinOrNull(This, OtherFunction)) { return Default; } From 0b4abd779b94cb4c157ff61c395f6e939a9204fc Mon Sep 17 00:00:00 2001 From: Fabian Schiebel Date: Thu, 18 Dec 2025 18:36:52 +0100 Subject: [PATCH 3/3] pre-commit --- include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h index 5eea05f2f9..4a28b5694c 100644 --- a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h +++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h @@ -54,7 +54,8 @@ template struct ConstantEdgeFunction { template [[nodiscard]] static EdgeFunction - compose(EdgeFunctionRef This, const EdgeFunction &SecondFunction) + compose(EdgeFunctionRef This, + const EdgeFunction &SecondFunction) requires std::derived_from>; template @@ -445,7 +446,7 @@ template EdgeFunction ConstantEdgeFunction::compose(EdgeFunctionRef This, const EdgeFunction &SecondFunction) - requires std::derived_from> + requires std::derived_from> { if (auto Default = defaultComposeOrNull(This, SecondFunction)) { return Default; @@ -488,7 +489,7 @@ template EdgeFunction ConstantEdgeFunction::join(EdgeFunctionRef This, const EdgeFunction &OtherFunction) - requires std::derived_from> + requires std::derived_from> { if (auto Default = defaultJoinOrNull(This, OtherFunction)) { return Default;