llvm-capstone/clang/test/Modules/concept_differ.cpp
Michael Spencer a171d248ca
[clang][modules] Deprecate module.map in favor of module.modulemap (#75142)
This patch deprecates `module.map` in favor of `module.modulemap`, which
has been the preferred form since 2014. The eventual goal is to remove
support for `module.map` to reduce the number of stats Clang needs to do
while searching for module map files.

This patch touches a lot of files, but the majority of them are just
renaming tests or references to the file in comments or documentation.

The relevant files are:
* lib/Lex/HeaderSearch.cpp
* include/clang/Basic/DiagnosticGroups.td
* include/clang/Basic/DiagnosticLexKinds.td
2023-12-14 14:03:57 -08:00

36 lines
706 B
C++

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -x c++ -std=c++20 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.modulemap %t/foo.cpp -verify
//--- module.modulemap
module "foo" {
export *
header "foo.h"
}
module "bar" {
export *
header "bar.h"
}
//--- foo.h
template <class T>
concept A = true;
//--- bar.h
template <class T>
concept A = false;
//--- foo.cpp
#include "bar.h"
#include "foo.h"
template <class T> void foo() requires A<T> {} // expected-error 1+{{reference to 'A' is ambiguous}}
// expected-note@* 1+{{candidate found by name lookup}}
int main() {
foo<int>();
return 0;
}