
For some use-cases, it might be useful to be able to turn off modules for C++ in `-cc1`. (The feature is implied by `-std=C++20`.) This patch exposes the `-fno-cxx-modules` option in `-cc1`. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D106864
11 lines
475 B
C++
11 lines
475 B
C++
// RUN: rm -rf %t && mkdir %t
|
|
// RUN: %clang_cc1 -x objective-c++ -std=c++20 -I %t %s -verify=enabled
|
|
// RUN: %clang_cc1 -x objective-c++ -std=c++20 -fno-cxx-modules -I %t %s -verify=disabled
|
|
|
|
// enabled-no-diagnostics
|
|
|
|
// The spelling of these errors is misleading.
|
|
// The important thing is Clang rejected C++20 modules syntax.
|
|
export module Foo; // disabled-error{{expected template}}
|
|
// disabled-error@-1{{unknown type name 'module'}}
|