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