[clang] [clang][bytecode] Fix assertion failure when returning function type (PR #180681)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 10 00:49:59 PST 2026
================
@@ -937,6 +937,12 @@ std::optional<APValue> Pointer::toRValue(const Context &Ctx,
llvm_unreachable("invalid value to return");
};
+ // Can't return functions as rvalues.
+ if (ResultType->isFunctionType() || ResultType->isFunctionProtoType() ||
----------------
zwuis wrote:
`FunctionType` is a base class of `FunctionProtoType`.
https://github.com/llvm/llvm-project/pull/180681
More information about the cfe-commits
mailing list