mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:50:13 +01:00
This makes it possible to do const eval when calling a constexpr C++ function with params and return types other than 32/64-bit integers. Most of the new logic is in `MaybeModifyCppThunkCallForConstEval`, which is called by `MakeConstantForCall`. This checks if the callee is a C++ thunk (using a new `SpecialFunctionKind::CppThunk` variant), and if so it: * Changes the callee from the C++ thunk to the thunk's callee * Remaps parameters that are passed by pointer to the thunk to the underlying value * Drops the return value parameter, if present