[PATCH] D156027: [clang][Interp] Rework how initializers work
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 29 06:08:09 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/Context.cpp:131
if (T->isFunctionPointerType() || T->isFunctionReferenceType() ||
- T->isFunctionType())
+ T->isFunctionType() || T->isSpecificBuiltinType(BuiltinType::BoundMember))
return PT_FnPtr;
----------------
aaron.ballman wrote:
> tbaeder wrote:
> > I've removed this change in https://reviews.llvm.org/D144164 since it didn't seem necessary, but it //is// necessary after applying this patch.
> Which test case exercises this bit?
We have this line in `records.cpp`:
```
constexpr int value = (s.*foo)();
```
and its type is:
```
BuiltinType 0x62100001fbe0 '<bound member function type>'
```
it just so happens that we _now_ call `classify()` on this earlier in the code path while before we didn't do that, so we need to know that the bound member function type is now some composite type.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156027/new/
https://reviews.llvm.org/D156027
More information about the cfe-commits
mailing list