Author: Aaron Ballman Date: 2024-04-10T13:57:18-04:00 New Revision: 4d80dff819d1164775d0d55fc68bffedb90ba53c
URL: https://github.com/llvm/llvm-project/commit/4d80dff819d1164775d0d55fc68bffedb90ba53c DIFF: https://github.com/llvm/llvm-project/commit/4d80dff819d1164775d0d55fc68bffedb90ba53c.diff LOG: int -> uintptr_t to silence diagnostics 'int' may not be sufficiently large to store a pointer representation anyway, so this is also a correctness fix. Added: Modified: clang/lib/AST/Interp/FunctionPointer.h Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/FunctionPointer.h b/clang/lib/AST/Interp/FunctionPointer.h index e7fad8161fd9cb..f61f9ded0bf000 100644 --- a/clang/lib/AST/Interp/FunctionPointer.h +++ b/clang/lib/AST/Interp/FunctionPointer.h @@ -24,7 +24,7 @@ class FunctionPointer final { public: // FIXME: We might want to track the fact that the Function pointer // has been created from an integer and is most likely garbage anyway. - FunctionPointer(int IntVal = 0, const Descriptor *Desc = nullptr) + FunctionPointer(uintptr_t IntVal = 0, const Descriptor *Desc = nullptr) : Func(reinterpret_cast<const Function *>(IntVal)) {} FunctionPointer(const Function *Func) : Func(Func) { assert(Func); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits