================ @@ -53,6 +57,10 @@ class FunctionPointer final { return toAPValue().getAsString(Ctx, Func->getDecl()->getType()); } + uint32_t getIntegerRepresentation() const { + return static_cast<uint32_t>(reinterpret_cast<uintptr_t>(Func)); + } ---------------- AaronBallman wrote:
This seems dangerous to me. `Func` is a pointer, so casting to `uintptr_t` makes sense, but then casting to a 32-bit value seems likely to cause problems due to truncation. Any reason why this shouldn't return a `uintptr_t`? https://github.com/llvm/llvm-project/pull/84159 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits