FEX icon indicating copy to clipboard operation
FEX copied to clipboard

Build fails with clang >= 22

Open tstellar opened this issue 1 month ago • 2 comments

Build errors:

/builddir/build/BUILD/fex-emu-2509.1-build/FEX-FEX-2509.1/ThunkLibs/Generator/analysis.cpp:316:103: error: attempt to use a deleted function
  316 |           auto repack_info_it = types.emplace(context.getCanonicalType(annotated_member->getParent()->getTypeForDecl()), RepackedType {}).first;
      |                                                                                                       ^
/usr/include/clang/AST/Decl.h:3982:15: note: 'getTypeForDecl' has been explicitly marked deleted here
 3982 |   const Type *getTypeForDecl() const = delete;
      |               ^
/builddir/build/BUILD/fex-emu-2509.1-build/FEX-FEX-2509.1/ThunkLibs/Generator/analysis.cpp:501:50: error: no member named 'getTypePtr' in 'clang::Type'
  501 |             types.emplace(context.getSizeType()->getTypePtr(), RepackedType {});
      |                           ~~~~~~~~~~~~~~~~~~~~~~~^
2 errors generated.

It looks like the first error was because of this change in clang: https://github.com/llvm/llvm-project/commit/91cdd35008e9ab32dffb7e401cdd7313b3461892

tstellar avatar Nov 08 '25 17:11 tstellar

Seems to be a more nasty API change than our previous LLVM updates. And perhaps the biggest challenge will be to preserve source compatibility with older LLVM versions without making the code a hot mess along the way.

If anyone wants to take a stab at fixing this, that'd really help!

neobrain avatar Nov 12 '25 21:11 neobrain

I'm working on this issue and will open a PR soon :)

zeyi2 avatar Nov 16 '25 14:11 zeyi2