1 // RUN: rm -rf %t 2 // RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify 3 4 // expected-note@Inputs/def.h:5 {{previous definition is here}} 5 6 @class Def; 7 Def *def; 8 9 @import decldef; 10 A *a1; // expected-error{{unknown type name 'A'}} 11 B *b1; // expected-error{{must use 'struct' tag to refer to type 'B'}} 12 @import decldef.Decl; 13 14 A *a2; 15 struct B *b; 16 17 void testA(A *a) { 18 a->ivar = 17; // expected-error{{definition of 'A' must be imported from module 'decldef.Def' before it is required}} 19 } 20 21 void testB() { 22 B b; // Note: redundant error silenced 23 } 24 25 void testDef() { 26 [def defMethod]; 27 } 28