Page MenuHomePhabricator

[TypeSystem] Fix inspection of Objective-C object types

Authored by spyffe on May 10 2017, 3:40 PM.



ptr_refs exposed a problem in ClangASTContext's implementation; it uses an accessor to convert a QualType into an ObjCObjectPointerType, but the accessor is not fully general. getAs() is the safer way to go.

I've added a test case that uses ptr_refs in a way that would crash before the fix.

Diff Detail

Event Timeline

spyffe created this revision.May 10 2017, 3:40 PM
clayborg accepted this revision.May 10 2017, 5:24 PM
This revision is now accepted and ready to land.May 10 2017, 5:24 PM
labath added a subscriber: labath.May 15 2017, 2:31 AM

As this is an objective C feature, wouldn't a better place for it be in testcases/lang/objc ?

10 ↗(On Diff #98547)

This looks like a copy-paste error, as you have everything twice.

clayborg added inline comments.May 15 2017, 9:13 AM
10 ↗(On Diff #98547)

good catch

spyffe updated this revision to Diff 99052.May 15 2017, 1:06 PM
spyffe marked an inline comment as done.

Updated the Makefile to fix a problem caught by Pavel Labath.
Also relocated the new test to lang/objc.

spyffe closed this revision.May 15 2017, 1:12 PM

Committed r303110.