[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 05:19:19 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/AST/Interp/Interp.h:1902
+  std::vector<int64_t> ArrayIndices;
+  for (unsigned I = 0; I != E->getNumExpressions(); ++I)
+    ArrayIndices.emplace_back(S.Stk.pop<int64_t>());
----------------
can you use size_t here?
It's already a bug nest but it can't hurt to use better types, even if `getNumExpressions` returns unsigned 
 https://godbolt.org/z/vhYxose4o 


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

https://reviews.llvm.org/D156400



More information about the cfe-commits mailing list