Skip to content

Conversation

@kynehc
Copy link
Contributor

@kynehc kynehc commented Dec 18, 2025

After supporting llvm-16, I encounter the following errors during compilation:

/phasar/latest/phasar/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h:446:26: error: out-of-line definition of 'compose' does not match any declaration in 'ConstantEdgeFunction<L>'
ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
                         ^~~~~~~
/phasar/latest/phasar/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h:487:26: error: out-of-line definition of 'join' does not match any declaration in 'ConstantEdgeFunction<L>'
ConstantEdgeFunction<L>::join(EdgeFunctionRef<ConcreteEF> This,
                         ^~~~
2 errors generated.

This PR can fix these errors and pass the compilation.

…quires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>> so Clang-llvm@16 can compile
@kynehc
Copy link
Contributor Author

kynehc commented Dec 18, 2025

FYI, when compiling with Docker, these errors do not occur because the Docker script uses clang-19. I’m not sure whether this is intended, but I encountered these errors because I was using clang corresponding to LLVM 16.

@fabianbs96
Copy link
Member

Hi @kynehc,
thanks for your PR. This seems like a compiler-version issue. The fix looks fine to me. Can you please fix the formatting, such that the CI passes?

--- a/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h
+++ b/include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h
@@ -60,8 +60,7 @@ template <typename L> struct ConstantEdgeFunction {
 
   template <typename ConcreteEF>
   [[nodiscard]] static EdgeFunction<l_t>
-  join(EdgeFunctionRef<ConcreteEF> This,
-       const EdgeFunction<l_t> &OtherFunction)
+  join(EdgeFunctionRef<ConcreteEF> This, const EdgeFunction<l_t> &OtherFunction)
     requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>;
 
   [[nodiscard]] constexpr bool isConstant() const noexcept { return true; }
@@ -447,7 +446,8 @@ template <typename ConcreteEF>
 EdgeFunction<L>
 ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
                                  const EdgeFunction<L> &SecondFunction)
-  requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>> {
+  requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
+{
   if (auto Default = defaultComposeOrNull(This, SecondFunction)) {
     return Default;
   }
@@ -489,7 +489,8 @@ template <typename ConcreteEF>
 EdgeFunction<L>
 ConstantEdgeFunction<L>::join(EdgeFunctionRef<ConcreteEF> This,
                               const EdgeFunction<l_t> &OtherFunction)
-  requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>> {
+  requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
+{
   if (auto Default = defaultJoinOrNull<l_t>(This, OtherFunction)) {
     return Default;
   }

Copy link
Member

@fabianbs96 fabianbs96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@fabianbs96 fabianbs96 merged commit 055babd into secure-software-engineering:development Dec 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants