[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-07 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: In C++ we reject mismatched types coming from different Clang modules. Haven't checked the behavior for C++20 modules as I'm not changing it. In C modules aren't a part of any standard as far as I know. But for Clang modules we reject most of the mismatched types coming from

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-06 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Though we detect when the types aren't identical and don't try to use them > interchangeably. The change extends the existing behavior for structs/unions > to enums. OK, still a bit confused though - "like in C++", I assume in C++ we reject mismatched types coming from

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-05-01 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: @dwblaikie if you have no further comments, I'll merge this approved change some time soon (in a day or two). https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Not sure I'm following the response here - but I guess what I'm trying to > say, with more words, is that my understanding was that C doesn't have an > ODR, and you can have different definitions of a type, with the same name, in > C and that's OK. In different translation

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > C doesn't have an odr, does it? > > For non-C++ "ODR" has a meaning more like "ODR-inspired checks". But there is > no language rule that would require enforcement and there is no impact on > linkage (at least during deserialization). Not sure I'm following the response

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-29 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > C doesn't have an odr, does it? For non-C++ "ODR" has a meaning more like "ODR-inspired checks". But there is no language rule that would require enforcement and there is no impact on linkage (at least during deserialization). https://github.com/llvm/llvm-project/pull/90298

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-27 Thread David Blaikie via cfe-commits
dwblaikie wrote: C doesn't have an odr, does it? https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I have no idea why it was. But the current change looks pretty fine to me. https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 --- Full diff: https://github.com/llvm/llvm-project/pull/90298.diff 2 Files Affected: - (modified)

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Volodymyr Sapsai (vsapsai) Changes There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 --- Full diff: https://github.com/llvm/llvm-project/pull/90298.diff 2 Files Affected: - (modified)

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-26 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/90298 There is no reason for C and Objective-C to differ from C++ in this matter. rdar://85531830 >From 8dafc9af06eef1a4b3fba8b5cffeece62967a6fd Mon Sep 17 00:00:00 2001 From: Volodymyr Sapsai Date: Fri, 26 Apr 2024