[PATCH] D144164: [clang][Interp] Handle PtrMemOps

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 04:23:07 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:213-214
 
+  if (BO->isPtrMemOp())
+    return this->visit(RHS);
+
----------------
aaron.ballman wrote:
> Do we need similar changes for unary operators, pointer arithmetic operators, etc?
In what case would we need similar changes for those?


================
Comment at: clang/lib/AST/Interp/Context.cpp:121
+  if (T->isFunctionPointerType() || T->isFunctionReferenceType() ||
+      T->isFunctionProtoType())
+    return PT_FnPtr;
----------------
aaron.ballman wrote:
> `isFunctionType()` in general?
You mean additionally to those or as a replacement? `isFunctionType()` return false for function pointers it seems.


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

https://reviews.llvm.org/D144164



More information about the cfe-commits mailing list