You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Serialization] Don't try to complete the redeclaration chain in
ASTReader after we start writing
This is intended to mitigate
#61447.
Before the patch, it takes 5s to compile test.cppm in the above
reproducer. After the patch it takes 3s to compile it. Although this
patch didn't solve the problem completely, it should mitigate the
problem for sure. Noted that the behavior of the patch is consistent
with the comment of the originally empty function
ASTReader::finalizeForWriting. So the change should be consistent with
the original design.
Copy file name to clipboardExpand all lines: clang/test/Modules/polluted-operator.cppm
+13
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,20 @@ module;
51
51
export module b;
52
52
import a;
53
53
54
+
voidb() {
55
+
std::variant<int, double> v;
56
+
}
57
+
54
58
// expected-error@* {{has different definitions in different modules; first difference is defined here found data member '_S_copy_ctor' with an initializer}}
55
59
// expected-note@* {{but in 'a.<global>' found data member '_S_copy_ctor' with a different initializer}}
56
60
// expected-error@* {{from module 'a.<global>' is not present in definition of 'variant<_Types...>' provided earlier}}
57
61
// expected-note@* {{declaration of 'swap' does not match}}
62
+
63
+
//--- c.cppm
64
+
module;
65
+
#include"bar.h"
66
+
export module c;
67
+
import a;
68
+
69
+
// expected-error@* {{has different definitions in different modules; first difference is defined here found data member '_S_copy_ctor' with an initializer}}
70
+
// expected-note@* {{but in 'a.<global>' found data member '_S_copy_ctor' with a different initializer}}
0 commit comments