1*f4a2713aSLionel Sambuc// Test this without pch. 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -include %S/objc_import.h -fsyntax-only -verify %s 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc// Test with pch. 5*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_import.h 6*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc// expected-no-diagnostics 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc#import "objc_import.h" 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambucvoid func() { 13*f4a2713aSLionel Sambuc TestPCH *xx; 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc xx = [TestPCH alloc]; 16*f4a2713aSLionel Sambuc [xx instMethod]; 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc// rdar://14112291 20*f4a2713aSLionel Sambuc@class NewID1; 21*f4a2713aSLionel Sambucvoid foo1(NewID1 *p); 22*f4a2713aSLionel Sambucvoid bar1(OldID1 *p) { 23*f4a2713aSLionel Sambuc foo1(p); 24*f4a2713aSLionel Sambuc} 25*f4a2713aSLionel Sambuc@class NewID2; 26*f4a2713aSLionel Sambucvoid foo2(NewID2 *p) { 27*f4a2713aSLionel Sambuc [p meth]; 28*f4a2713aSLionel Sambuc} 29*f4a2713aSLionel Sambucvoid bar2(OldID2 *p) { 30*f4a2713aSLionel Sambuc foo2(p); 31*f4a2713aSLionel Sambuc [p meth]; 32*f4a2713aSLionel Sambuc} 33