This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Fix a crash in access checks of inner classes
ClosedPublic

Authored by ilya-biryukov on Dec 4 2018, 2:37 AM.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Dec 4 2018, 2:37 AM
kadircet added inline comments.Dec 4 2018, 3:31 AM
lib/Sema/SemaCodeComplete.cpp
1348

I suppose Cls should be NamingClass

  • Actually use the computed NamingClass

I believe also we need another test case where Cls and NamingClass are different.

  • Make sure we still run ObjC access checks.
  • Add a test with a different NamingClass and BaseType.
  • Fix IsSimplyAccessible to work in this case.
  • Add a newline to the end of the test file
ilya-biryukov marked an inline comment as done.Dec 5 2018, 7:24 AM

I believe also we need another test case where Cls and NamingClass are different.

Done. And thanks for finding this, I totally missed that we don't test this.

kadircet accepted this revision.Dec 5 2018, 8:08 AM

LGTM, thanks!

This revision is now accepted and ready to land.Dec 5 2018, 8:08 AM
This revision was automatically updated to reflect the committed changes.