Debian Codegraph @

clang/test/Headers/crash-instantiated-in-scope-cxx-modules2.cpp

raw
1 // RUN: rm -fR %t
2 // RUN: split-file %s %t
3 // RUN: cd %t
4 // RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header header.h
5 // RUN: %clang_cc1 -std=c++20 -fmodule-file=header.pcm main.cpp
6
7 //--- header.h
8 template <typename T>
9 void f(T) {}
10
11 class A {
12 virtual ~A();
13 };
14
15 inline A::~A() {
16 f([](){});
17 }
18
19 struct B {
20 void g() {
21 f([](){
22 [](){};
23 });
24 }
25 };
26 // expected-no-diagnostics
27
28 //--- main.cpp
29 import "header.h";
30 // expected-no-diagnostics