[PATCH] D155568: [clang][Interp] Make sure we push integers of the correct size

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 07:25:23 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM as far as the changes go, but did have a question about whether we need this for unsigned values as well.



================
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:36
+/// Pushes \p Val to the stack, as a target-dependent 'int'.
+static void pushInt(InterpState &S, int32_t Val) {
+  const TargetInfo &TI = S.getCtx().getTargetInfo();
----------------
Do we need the same for unsigned int as well? (I'm thinking in terms of pushing literal values like `0U`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155568/new/

https://reviews.llvm.org/D155568



More information about the cfe-commits mailing list