Bugfix for r181629:
- The return type should be a pointer to the class type.
- Make the condition more specific.

rdar://problem/13359718