1// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo 'module a { header "a.h" } module b { header "b.h" }' > %t/modulemap
4// RUN: echo 'extern int t;' > %t/t.h
5// RUN: echo '#include "t.h"' > %t/a.h
6// RUN: echo '#include "t.h"' > %t/b.h
7
8// RUN: %clang_cc1 -fmodules -I%t -fmodules-cache-path=%t -fmodule-map-file=%t/modulemap -fmodules-embed-all-files %s -verify
9#include "a.h"
10char t; // expected-error {{different type}}
11// expected-note@t.h:1 {{here}}
12#include "t.h"
13#include "b.h"
14char t; // expected-error {{different type}}
15// expected-note@t.h:1 {{here}}
16