brintos

brintos / llvm-project-archived public Read only

0
0
Text · 881 B · 9ddc513 Raw
14 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: echo 'module M { header "foo.h" header "bar.h" }' > %t/map4// RUN: echo 'template<typename T> void f(T t) { int n; t.f(n); }' > %t/foo.h5// RUN: touch %t/bar.h6// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -x c++ %t/map -emit-module -fmodule-name=M -o %t/pcm7// 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 -verify8// RUN: rm %t/bar.h9// 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 -verify10#include "foo.h"11namespace n { // expected-note {{begins here}}12#include "foo.h" // expected-error {{redundant #include of module 'M' appears within namespace}}13}14