[libc] Adjust the `cpp:function` type to support lambdas
The current function type does not support generic lambdas because it relies on the lambda being implicitly convertible to a function pointer. This patch adds support for this by copying the existing lightweight `function_ref` type. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148971
Loading