bolt/deps/llvm-18.1.8/clang/test/CXX/module/dcl.dcl/dcl.module/p1.cpp
2025-02-14 19:21:04 +01:00

14 lines
617 B
C++

// RUN: %clang_cc1 -std=c++20 -verify %s -DFOO=export -DBAR=export
// RUN: %clang_cc1 -std=c++20 -verify %s -DFOO=export -DBAR=
// RUN: %clang_cc1 -std=c++20 %s -DFOO=export -emit-module-interface -o %t
// RUN: %clang_cc1 -std=c++20 %s -fmodule-file=foo=%t -DFOO=
// RUN: %clang_cc1 -std=c++20 %s -fmodule-file=foo=%t -DBAR=export
// RUN: %clang_cc1 -std=c++20 -verify %s -fmodule-file=foo=%t -DFOO= -DBAR=export
#ifdef FOO
FOO module foo; // expected-note {{previous module declaration is here}}
#endif
#ifdef BAR
BAR module bar; // expected-error {{translation unit contains multiple module declarations}}
#endif