1// RUN: rm -rf %t 2// RUN: %clang_cc1 -fmodules -I %S/Inputs -fmodule-cache-path %t %s -verify 3 4 5// in other file: expected-note{{previous definition is here}} 6 7 8 9 10 11// in other file: expected-note{{previous definition is here}} 12 13@__experimental_modules_import decldef; 14A *a1; // expected-error{{unknown type name 'A'}} 15B *b1; // expected-error{{unknown type name 'B'}} 16@__experimental_modules_import decldef.Decl; 17 18A *a2; 19B *b; 20 21void testA(A *a) { 22 a->ivar = 17; // expected-error{{definition of 'A' must be imported before it is required}} 23} 24 25void testB() { 26 B b; // expected-error{{definition of 'B' must be imported before it is required}} 27 B b2; // Note: the reundant error was silenced. 28} 29