blob: 9b5b13d63fc1d4f18cc7a1e75d5c6b3e499d2eeb [file] [log] [blame]
Richard Smith65ebb4a2015-03-26 04:09:53 +00001// RUN: rm -rf %t
Richard Smithbe3980b2015-03-27 00:41:57 +00002// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery
Richard Smith65ebb4a2015-03-26 04:09:53 +00003
4// Trigger import of definitions, but don't make them visible.
5#include "empty.h"
6
7A pre_a; // expected-error {{must be imported}} expected-error {{must use 'struct'}}
8// expected-note@defs.h:1 {{here}}
9
Richard Smithbe3980b2015-03-27 00:41:57 +000010B::Inner2 pre_bi; // expected-error +{{must be imported}}
11// expected-note@defs.h:4 +{{here}}
12// expected-note@defs.h:10 +{{here}}
13
14C_Base<1> pre_cb1; // expected-error +{{must be imported}}
15// expected-note@defs.h:13 +{{here}}
16C1 pre_c1; // expected-error +{{must be imported}} expected-error {{must use 'struct'}}
17// expected-note@defs.h:15 +{{here}}
18C2 pre_c2; // expected-error +{{must be imported}} expected-error {{must use 'struct'}}
19// expected-note@defs.h:16 +{{here}}
20
Richard Smith65ebb4a2015-03-26 04:09:53 +000021// Make definitions from second module visible.
22#include "import-and-redefine.h"
23
24A post_a;
Richard Smithbe3980b2015-03-27 00:41:57 +000025B::Inner2 post_bi;
26C_Base<1> post_cb1;
27C1 c1;
28C2 c2;