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
Close#79240.
See the linked issue for details. Given the frequency of issue reporting
about false positive ODR checks (I received private issue reports too),
I'd like to backport this to 18.x too.
Copy file name to clipboardExpand all lines: clang/test/Modules/polluted-operator.cppm
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,10 @@ module;
46
46
exportmodule a;
47
47
48
48
//--- b.cppm
49
+
// This is actually an ODR violation. But given https://github.com/llvm/llvm-project/issues/79240,
50
+
// we don't count it as an ODR violation any more.
51
+
// expected-no-diagnostics
49
52
module;
50
53
#include"bar.h"
51
54
exportmodule b;
52
55
import a;
53
-
54
-
// expected-error@* {{has different definitions in different modules; first difference is defined here found data member '_S_copy_ctor' with an initializer}}
55
-
// expected-note@* {{but in 'a.<global>' found data member '_S_copy_ctor' with a different initializer}}
56
-
// expected-error@* {{from module 'a.<global>' is not present in definition of 'variant<_Types...>' provided earlier}}
57
-
// expected-note@* {{declaration of 'swap' does not match}}
Copy file name to clipboardExpand all lines: clang/test/Modules/pr76638.cppm
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -57,13 +57,13 @@ export module mod3;
57
57
exportusing std::align_val_t;
58
58
59
59
//--- mod4.cppm
60
+
// This is actually an ODR violation. But given https://github.com/llvm/llvm-project/issues/79240,
61
+
// we don't count it as an ODR violation now.
62
+
// expected-no-diagnostics
60
63
module;
61
64
#include"signed_size_t.h"
62
65
#include"csize_t"
63
66
#include"align.h"
64
67
exportmodule mod4;
65
68
import mod3;
66
69
exportusing std::align_val_t;
67
-
68
-
//[email protected]:* {{'std::align_val_t' has different definitions in different modules; defined here first difference is enum with specified type 'size_t' (aka 'int')}}
69
-
//[email protected]:* {{but in 'mod3.<global>' found enum with specified type 'size_t' (aka 'unsigned int')}}
0 commit comments