Page MenuHomePhabricator

Allow lldb-test to combine -find with -dump-clang-ast

Authored by aprantl on Apr 16 2020, 2:09 PM.



This patch threads an lldb::DescriptionLevel through the typesystem to allow dumping the full Clang AST (level=verbose) of any lldb::Type in addition to the human-readable source description (default level=full). This type dumping interface is currently not exposed through the SBAPI.

The application is to let lldb-test dump the clang AST of search results. I need this to test lazy type completion of clang types in subsequent patches.

Diff Detail

Event Timeline

aprantl created this revision.Apr 16 2020, 2:09 PM
shafik added inline comments.Apr 16 2020, 3:38 PM

Does it make sense to apply these change to non-objective-C cases?


The relationship between DumpClangAST and Find is not obvious. Basically we are falling through here in the FindType::Type case.

Perhaps a comment here and maybe on the Map.Dump(&Stream, false, GetDescriptionLevel()); line might help clarify how these options are related.

aprantl updated this revision to Diff 258197.Apr 16 2020, 4:15 PM
aprantl marked 2 inline comments as done.

Address feedback from Shafik. Thanks!


It does absolutely! I must admit I sort of forgot to update the other cases, because they weren't on my critical path. Done now.


I added the explanation to the documentation of the -dump-clang-ast option.

shafik accepted this revision.Apr 17 2020, 9:36 AM


Thank you! This looks like a nice update to the functionality.

This revision is now accepted and ready to land.Apr 17 2020, 9:36 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2020, 11:21 AM