xref: /llvm-project/clang/test/Modules/cxx20-disable.cpp (revision 0556138624edf48621dd49a463dbe12e7101f17d)
1*05561386SJan Svoboda // RUN: rm -rf %t && mkdir %t
2*05561386SJan Svoboda // RUN: %clang_cc1 -x objective-c++ -std=c++20                  -I %t %s -verify=enabled
3*05561386SJan Svoboda // RUN: %clang_cc1 -x objective-c++ -std=c++20 -fno-cxx-modules -I %t %s -verify=disabled
4*05561386SJan Svoboda 
5*05561386SJan Svoboda // enabled-no-diagnostics
6*05561386SJan Svoboda 
7*05561386SJan Svoboda // The spelling of these errors is misleading.
8*05561386SJan Svoboda // The important thing is Clang rejected C++20 modules syntax.
9*05561386SJan Svoboda export module Foo; // disabled-error{{expected template}}
10*05561386SJan Svoboda                    // disabled-error@-1{{unknown type name 'module'}}
11