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

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 14:53:37 PDT 2024


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 different modules.

But it sounds like in C you're suggesting that we (moreso with this patch) detect mismatches and silently allow different type definitions to work? Which would presumably be the right thing for C.

So, I guess, maybe my concern is only with a confusing title/description... 

https://github.com/llvm/llvm-project/pull/90298


More information about the cfe-commits mailing list