1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: echo 'module M { header "foo.h" header "bar.h" }' > %t/map
4 // RUN: echo 'template<typename T> void f(T t) { int n; t.f(n); }' > %t/foo.h
5 // RUN: touch %t/bar.h
6 // RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -x c++ %t/map -emit-module -fmodule-name=M -o %t/pcm
7 // RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-map-file=%t/map -fmodule-file=%t/pcm -I%t %s -fsyntax-only -fexceptions -Wno-module-file-config-mismatch -verify
8 // RUN: rm %t/bar.h
9 // RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-map-file=%t/map -fmodule-file=%t/pcm -I%t %s -fsyntax-only -fexceptions -Wno-module-file-config-mismatch -verify
10 #include "foo.h"
11 namespace n { // expected-note {{begins here}}
12 #include "foo.h" // expected-error {{redundant #include of module 'M' appears within namespace}}
13 }
14