This is an archive of the discontinued LLVM Phabricator instance.

[AST] Cleanup on getting the underlying decl of using-shdow decl.
ClosedPublic

Authored by hokein on Apr 8 2022, 1:06 PM.

Details

Summary

This should be a NFC cleanup. It removes a unnecessary loop to get the underlying
decl, and add an assertion.

The underlying decl of a using-shadow decl is always the original declaration
has been brought into the scope, clang never builds a nested using-shadow
decl (see Sema::BuildUsingShadowDecl).

Diff Detail

Event Timeline

hokein created this revision.Apr 8 2022, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:06 PM
hokein requested review of this revision.Apr 8 2022, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2022, 1:06 PM
sammccall accepted this revision.Apr 11 2022, 7:54 AM

This looks OK, though I'm not sure the value of encoding this assumption further.

This revision is now accepted and ready to land.Apr 11 2022, 7:54 AM
This revision was landed with ongoing or failed builds.May 16 2022, 4:58 AM
This revision was automatically updated to reflect the committed changes.