Skip to content

Commit 4a964a7

Browse files
committed
Add minimal reroducer for the crash after changing deserialization order
1 parent 64230ad commit 4a964a7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
27+
// expected-no-diagnostics
28+
29+
//--- main.cpp
30+
import "header.h";
31+
// expected-no-diagnostics

0 commit comments

Comments
 (0)