This is an archive of the discontinued LLVM Phabricator instance.

Clarifying the documentation for variable formatting wrt to qualifiers and adding a test that demonstrates this
ClosedPublic

Authored by shafik on Apr 2 2021, 6:25 PM.

Details

Summary

When looking up user specified formatters qualifiers are removed from types before matching, I have added a clarifying example to the document and added an example to a relevant test to demonstrate this behavior.

Diff Detail

Event Timeline

shafik requested review of this revision.Apr 2 2021, 6:25 PM
shafik created this revision.
teemperor accepted this revision.Apr 6 2021, 5:51 AM
teemperor added a subscriber: teemperor.

LGTM, thanks! FWIW, there are actually a lot more 'qualifiers' supported in Clang that are ignored by the formatters (restrict, Obj-C garbage collector descriptions, custom address spaces, etc.). Most of them are not even modelled in DWARF and users rarely encounter them, so I think const/volatile should cover all reasonable workflows.

lldb/test/API/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
247

There are test methods for frame var:
self.expect_var_path("constVolatileInt", value="0x0000002c")

This revision is now accepted and ready to land.Apr 6 2021, 5:51 AM
shafik updated this revision to Diff 335929.Apr 7 2021, 2:26 PM
shafik marked an inline comment as done.

Updating test to use frame var test.

This revision was landed with ongoing or failed builds.Apr 7 2021, 2:31 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2021, 2:31 PM