aaron.ballman added a comment.

In D141472#4112790 <https://reviews.llvm.org/D141472#4112790>, @tbaeder wrote:

> I'm not sure what to do about this right now. I was wondering about 
> restructuring pointers so all the metadata is before all the actual data, but 
> that would be a large refactoring.

For right now, we can move forward with basic function pointer support and we 
can revisit this when you get around to doing member function pointers.



================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:970
     return this->emitNullPtr(E);
+  case PT_FnPtr:
   case PT_Float:
----------------
Shouldn't this call `emitNullPtr()` in this case? e.g.,
```
struct S {
  int i;
  void (*fp)();
};

constexpr S s{ 12 };
static_assert(s.fp == nullptr);
```


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

https://reviews.llvm.org/D141472

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to