avikivity wrote:

> @avikivity I see an undesired side effect: enum redefinition is no longer 
> diagnosed if the first declaration was in a module.
> 
> Consider:
> 
> ```c++
> // modA.ccpm
> module;
> enum Enum {
>     ENUM
> };
> export module modA;
> ```
> 
> ```c++
> // main.cc
> import modA;
> enum Enum {
>     ENUM
> };
> enum Enum {
>     ENUM
> };
> ```
> 
> Before your change, this will (desirably) fail with a `error: redefinition of 
> 'Enum'`. After your change, it will compile.

Clang 22.1.1 (unpatched) also does not reject the redefinition. The patch does 
not cause a regression, and it is yet another bug.

https://github.com/llvm/llvm-project/pull/188865
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to