[cling] Desugar UsingType in GetFullyQualifiedType#22742
Conversation
Test Results 23 files 23 suites 3d 15h 3m 5s ⏱️ For more details on these failures, see this check. Results for commit 0abc723. ♻️ This comment has been updated with latest results. |
|
Is this is what we really want? I am not sure if we should be losing that type sugar but @pcanal should be able to tell... |
|
This is what upstream does. We maintain a separate |
Yes, I agree with that, let's see what @pcanal has to say if that's not breaking something in i/o conceptually. |
|
To mirror what I wrote on Mattermost, after looking at the test change, I'm not so sure anymore: |
The change in getFullyQualifiedType() in the commit llvm/llvm-project@af27466 added explicit desugaring of UsingType: ``` if (isa<UsingType>(QT.getTypePtr())) { return getFullyQualifiedType(QT.getSingleStepDesugaredType(Ctx), Ctx, WithGlobalNsPrefix); } ``` This has been there since LLVM14 and we could disentagle this from the upgrade to LLVM22. This will cause `SG::sgkey_t` to be resolved to its underlying type `uint32_t` when GetFullTypeName() is called, rather than preserving the typedef alias name as before.
0abc723 to
4ba84a6
Compare
|
Yes, we should probably get the canonical type instead of just going one layer down. |
UT->getUnderlyingType() which only strips one sugar layer, stopping at the first TypedefType rather than reaching the canonical type. Use QT.getCanonicalType() instead to strip all sugar layers at once.
4ba84a6 to
281f335
Compare
|
Yes, but this is using then the wrong facility.. |
|
I see, thanks for the pointer. I understand now that I will close this PR, keep the existing The problem here was that, even though top-level node here is a
|
The change in getFullyQualifiedType() in the commit llvm/llvm-project@af27466 added explicit desugaring of UsingType:
This has been there since LLVM14 and we could disentagle this from the upgrade to LLVM22.
This will cause
SG::sgkey_tto be resolved to its underlying typeuint32_twhen GetFullTypeName() is called, rather than preserving the typedef alias name as before.This test was added in: #19615, should fix: #12698
This will be the default behaviour (in LLVM22) after #21658. So decoupling this change from the upgrade here.
This Pull request:
Changes or fixes:
Checklist:
This PR fixes #