Page MenuHomePhabricator

[Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr
ClosedPublic

Authored by steven_wu on May 23 2018, 1:44 PM.

Details

Summary

Remove the call to DiagnoseUseOfDecl in LookupMemberExpr because:

  1. LookupMemberExpr eagerly lookup both getter and setter, reguardless

if they are used or not. It causes wrong diagnostics if you are only
using getter.

  1. LookupMemberExpr only diagnoses getter, but not setter.
  2. ObjCPropertyOpBuilder already DiagnoseUseOfDecl when building getter

and setter. Doing it again in LookupMemberExpr causes duplicated
diagnostics.

rdar://problem/38479756

Diff Detail

Repository
rC Clang

Event Timeline

steven_wu created this revision.May 23 2018, 1:44 PM
arphaman accepted this revision.May 23 2018, 6:02 PM

LGTM.

This revision is now accepted and ready to land.May 23 2018, 6:02 PM
This revision was automatically updated to reflect the committed changes.