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-5
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,10 @@ module;
46
46
export module 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
export module 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-3
Original file line number
Diff line number
Diff line change
@@ -57,13 +57,13 @@ export module mod3;
57
57
export using 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
export module mod4;
65
68
import mod3;
66
69
export using std::align_val_t;
67
-
68
-
// expected-error@align.h:* {{'std::align_val_t' has different definitions in different modules; defined here first difference is enum with specified type 'size_t' (aka 'int')}}
69
-
// expected-note@align.h:* {{but in 'mod3.<global>' found enum with specified type 'size_t' (aka 'unsigned int')}}
0 commit comments