This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make TypeSystemClang::GetFullyUnqualifiedType work for constant arrays
ClosedPublic

Authored by labath on Oct 28 2021, 5:06 AM.

Details

Summary

Unqualify (constant) arrays recursively, just like we do for pointers.
This allows for better pretty printer matching.

Diff Detail

Event Timeline

labath requested review of this revision.Oct 28 2021, 5:06 AM
labath created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2021, 5:06 AM
teemperor requested changes to this revision.Oct 28 2021, 5:39 AM

LGTM, could you also extend a non-unit test to test the change within the whole FormatManager/etc. setup? I think TestDataFormatterAdv.py already has a very similar section about ignoring cv on types.

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
4243

?

lldb/unittests/Symbol/TestTypeSystemClang.cpp
919

My head has a hard time parsing what those asserts do or test. Maybe add some summary above or something similar?

// unqualified(const volatile bool[47]) -> bool[47]
This revision now requires changes to proceed.Oct 28 2021, 5:39 AM
labath updated this revision to Diff 383009.Oct 28 2021, 6:00 AM

new version

labath marked 2 inline comments as done.Oct 28 2021, 6:02 AM

LGTM, could you also extend a non-unit test to test the change within the whole FormatManager/etc. setup? I think TestDataFormatterAdv.py already has a very similar section about ignoring cv on types.

I've added a simple check to that test. I didn't want to go overboard, as I already have an made an exhaustive test in the follow-up patch.

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
4243

oops

teemperor accepted this revision.Oct 28 2021, 7:05 AM

LGTM, could you also extend a non-unit test to test the change within the whole FormatManager/etc. setup? I think TestDataFormatterAdv.py already has a very similar section about ignoring cv on types.

I've added a simple check to that test. I didn't want to go overboard, as I already have an made an exhaustive test in the follow-up patch.

Fair, LGTM then.

This revision is now accepted and ready to land.Oct 28 2021, 7:05 AM
shafik accepted this revision.Oct 28 2021, 8:44 PM

LGTM

This revision was automatically updated to reflect the committed changes.
labath marked an inline comment as done.