No idea why I used isa<RecordType>(ElemType.getTypePtr()) here, but it broke detecting that the element type is of record type.
Other than that, I think a previous patch made it possible to enable those two tests that have been disabled so far.
Differential D143334
[clang][Interp] Fix diagnosing uninitialized ctor record arrays tbaeder on Feb 5 2023, 2:12 AM. Authored by
Details No idea why I used isa<RecordType>(ElemType.getTypePtr()) here, but it broke detecting that the element type is of record type. Other than that, I think a previous patch made it possible to enable those two tests that have been disabled so far.
Diff Detail
Event Timeline
Comment Actions LG with a request for an additional test.
|
The difference between these two is that isRecordType() is looking at the canonical type whereas isa<> is looking at the type under inspection rather than the canonical type. I'd expect these to have the same behavior in most cases, but only matter for cases involving typedefs.
I think you're correct about the test case below not needing these particular changes -- at least, I'm not seeing what's changed that should impact the test. Should this be split into two changes? 1) Expose the test, 2) Make this functional change + add a new test where the canonical type is different to demonstrate the fix.