brintos

brintos / llvm-project-archived public Read only

0
0
Text · 590 B · 7d7e639 Raw
20 lines · cpp
1// Module Partition diagnostics2 3// RUN: rm -rf %t4// RUN: mkdir -p %t5// RUN: split-file %s %t6 7// RUN: %clang_cc1 -std=c++20 -fsyntax-only %t/bad-import.cpp -verify8 9// RUN: %clang_cc1 -std=c++20 -fsyntax-only %t/bad-partition.cpp -verify10 11//--- bad-import.cpp12 13import :B; // expected-error {{module partition imports must be within a module purview}}14 15//--- bad-partition.cpp16 17module; // expected-error {{missing 'module' declaration at end of global module fragment introduced here}}18 19import :Part; // expected-error {{module partition imports cannot be in the global module fragment}}20