This is an archive of the discontinued LLVM Phabricator instance.

Add type to the output for FieldDecl when logging in ClangASTSource::layoutRecordType
ClosedPublic

Authored by shafik on Aug 17 2021, 5:15 PM.

Details

Summary

I was debugging a problem and noticed that it would have been helpful to have the type of each FieldDecl when looking at the output from ClangASTSource::layoutRecordType

Diff Detail

Event Timeline

shafik requested review of this revision.Aug 17 2021, 5:15 PM
shafik created this revision.
aprantl accepted this revision.Aug 17 2021, 5:18 PM

If getType() doesn't trigger type completion then this LGTM!

This revision is now accepted and ready to land.Aug 17 2021, 5:18 PM

If getType() doesn't trigger type completion then this LGTM!

AFAICT the call to getType end up in ValueDecl:

QualType getType() const { return DeclType; }

and this is just returning a field.

shafik updated this revision to Diff 368935.Aug 26 2021, 11:08 AM

Applying formatting

This revision was landed with ongoing or failed builds.Aug 26 2021, 11:17 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2021, 11:17 AM