This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Set preferred type for qualified-id
ClosedPublic

Authored by ilya-biryukov on May 28 2019, 3:16 AM.

Event Timeline

ilya-biryukov created this revision.May 28 2019, 3:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2019, 3:16 AM
kadircet accepted this revision.May 28 2019, 4:38 AM

thanks, lgtm.

one irrelevant question though, it looks like most of the calls to ResultBuilder::setPreferredType performs a !isNull check before hand. should we perform this check implicitly and make the setPreferredType no-op in case of a null type?

This revision is now accepted and ready to land.May 28 2019, 4:38 AM

thanks, lgtm.

one irrelevant question though, it looks like most of the calls to ResultBuilder::setPreferredType performs a !isNull check before hand. should we perform this check implicitly and make the setPreferredType no-op in case of a null type?

I don't see any reason why not, that could save some typing.
Better yet, we might be able to remove it altogether. Preferred type is also stored in completion context and I'm not sure whether it's ever different from the one in ResultBuilder.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2019, 8:20 AM