Debian Codegraph @

clang/test/Modules/lambda-in-module-purview-2.cppm

raw
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/use.cpp -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
7
8 //--- lambda.h
9 auto cmp = [](auto l, auto r) {
10 return l < r;
11 };
12
13 //--- a.cppm
14 module;
15 #include "lambda.h"
16 export module a;
17 export using ::cmp;
18
19 //--- use.cpp
20 // expected-no-diagnostics
21 import a;
22 auto x = cmp;