clang/test/Modules/lambda-in-module-purview.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 | //--- a.cppm |
| 9 | export module a; |
| 10 | export auto cmp = [](auto l, auto r) { |
| 11 | return l < r; |
| 12 | }; |
| 13 | |
| 14 | //--- use.cpp |
| 15 | // expected-no-diagnostics |
| 16 | import a; |
| 17 | auto x = cmp; |