1 | // RUN: rm -rf %t |
2 | // RUN: mkdir %t |
3 | // RUN: touch %t/foo.h |
4 | // RUN: echo '#include "foo.h"' > %t/bar.h |
5 | // RUN: touch %t/baz.h |
6 | // RUN: echo 'module X { header "bar.h" header "baz.h" }' > %t/map |
7 | // |
8 | // RUN: not %clang_cc1 -fsyntax-only -fmodules -fmodule-map-file=%t/map -I%t -fmodules-strict-decluse -fmodule-name=X -x c++ %t/bar.h %t/baz.h 2>&1 | FileCheck %s |
9 | // RUN: not %clang_cc1 -fsyntax-only -fmodules -fmodule-map-file=%t/map -I%t -fmodules-strict-decluse -fmodule-name=X -x c++ %t/baz.h %t/bar.h 2>&1 | FileCheck %s |
10 | // |
11 | // Don't crash on this: (FIXME: we should produce an error that the specified module name is not known) |
12 | // RUN: %clang_cc1 -fsyntax-only -fmodules -I%t -fmodules-strict-decluse -fmodule-name=X -x c++ %t/baz.h %t/bar.h |
13 | // |
14 | // Don't crash on this: (FIXME: we should produce an error that the specified file is not part of the specified module) |
15 | // RUN: %clang_cc1 -fsyntax-only -fmodules -fmodule-map-file=%t/map -I%t -fmodules-strict-decluse -fmodule-name=X -x c++ %t/foo.h |
16 | // |
17 | // CHECK: module X does not depend on a module exporting 'foo.h' |
18 | |