brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · deeda2f Raw
18 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: touch %t/foo.h4// RUN: echo '#include "foo.h"' > %t/bar.h5// RUN: touch %t/baz.h6// RUN: echo 'module X { header "bar.h" header "baz.h" }' > %t/map7//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 %s9// 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 %s10//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.h13//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.h16//17// CHECK: module X does not depend on a module exporting 'foo.h'18