This is an archive of the discontinued LLVM Phabricator instance.

[include-cleaner] Don't consider the underlying type of Decltype MemberProvider as a use
Needs ReviewPublic

Authored by hokein on Jan 12 2023, 6:04 AM.

Details

Reviewers
kadircet
Summary

For this case, the argument of decltype is the provider.

This fixes the sample in https://github.com/llvm/llvm-project/issues/59916#issuecomment-1377214667

Diff Detail

Event Timeline

hokein created this revision.Jan 12 2023, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 6:04 AM
hokein requested review of this revision.Jan 12 2023, 6:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 6:04 AM

I am a little skeptical about this one. I think it's somewhat an obscure pattern, and probably warrants a use of the type when it can be deduced and the user code is accessing members (relying on the type more than an opaque manner). So what about waiting on this patch until we encounter examples in real world that require such a treatment?

I am a little skeptical about this one. I think it's somewhat an obscure pattern, and probably warrants a use of the type when it can be deduced and the user code is accessing members (relying on the type more than an opaque manner). So what about waiting on this patch until we encounter examples in real world that require such a treatment?

Sure, sounds good.