FindCompositeObjCPointerType nulls out the subexpressions on error, so bail out
instead of trying to deref them.
// Similarly, attempt to find composite type of two objective-c pointers.
Composite = FindCompositeObjCPointerType(LHS, RHS, QuestionLoc);
+ if (LHS.isInvalid() || RHS.isInvalid())
+ return QualType();
if (!Composite.isNull())
return Composite;
// Make sure we don't crash.
void writeback_test(NSString & &) {} // expected-error {{type name declared as a reference to a reference}}
+
+void test_strong_opaque() {
+ __strong NSString *sptr;
+ void *vptr;
+
+ (void)(0 ? sptr : vptr); // expected-error{{operands to conditional of types 'NSString *' and 'void *' are incompatible in ARC mode}}
+}