aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2024-04-10 13:56:18 -0400
committerAaron Ballman <aaron@aaronballman.com>2024-04-10 13:57:18 -0400
commit4d80dff819d1164775d0d55fc68bffedb90ba53c (patch)
treec7010a4fa517c42c9bd76b532f7a249e67ae3fe2
parent86842e1f724fba5abae50ce438553895e69b8141 (diff)
downloadllvm-4d80dff819d1164775d0d55fc68bffedb90ba53c.zip
llvm-4d80dff819d1164775d0d55fc68bffedb90ba53c.tar.gz
llvm-4d80dff819d1164775d0d55fc68bffedb90ba53c.tar.bz2
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.
-rw-r--r--clang/lib/AST/Interp/FunctionPointer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Interp/FunctionPointer.h b/clang/lib/AST/Interp/FunctionPointer.h
index e7fad81..f61f9de 100644
--- a/clang/lib/AST/Interp/FunctionPointer.h
+++ b/clang/lib/AST/Interp/FunctionPointer.h
@@ -24,7 +24,7 @@ private:
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); }