https://github.com/AaronBallman commented:

Thank you for working on this! C23 changed the normative wording here somewhat, 
so I think we should add additional test coverage. Specifically:

Moreover, if an identifier declared with internal linkage is used in an 
expression
there shall be exactly one external definition for the identifier in the 
translation unit, unless it is:
— part of the operand of a sizeof operator whose result is an integer constant;
— part of the operand of an alignof operator whose result is an integer 
constant;
— part of the controlling expression of a generic selection;
— part of the expression in a generic association that is not the result 
expression of its generic
selection;
— or, part of the operand of any typeof operator whose result is not a variably 
modified type.

How about adding those bullets as test cases to make sure we don't diagnose 
them?

https://github.com/llvm/llvm-project/pull/98016
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to