tbaeder added inline comments.

================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1536-1537
+      // Cast to Sint64.
+      if (IndexT != PT_Sint64) {
+        if (!this->emitCast(IndexT, PT_Sint64, E))
+          return false;
----------------
cor3ntin wrote:
> Shouldn't that be size_t?
The point of the conversion is that we later know the type, i.e. it will be an 
int64 and we can count on that in `OffsetOf()`. If we don't do this, we'd have 
to `classify()` while interpreting, which is also a possibility.


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

https://reviews.llvm.org/D156400

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D156400: [clang][Inter... Timm Bäder via Phabricator via cfe-commits

Reply via email to