Re: [PATCH 1/2] c++ modules: streaming enum with no enumerators [PR102600]

2022-10-18 Thread Patrick Palka via Gcc-patches
On Tue, 18 Oct 2022, Patrick Palka wrote: > For an enum declaration, has_definition returns true iff its TYPE_VALUES > field is non-empty. But this will wrongly return false for an enum that's > defined to have no enumerators as in the below testcase. > > This patch fixes has_definition for such

[PATCH 1/2] c++ modules: streaming enum with no enumerators [PR102600]

2022-10-18 Thread Patrick Palka via Gcc-patches
For an enum declaration, has_definition returns true iff its TYPE_VALUES field is non-empty. But this will wrongly return false for an enum that's defined to have no enumerators as in the below testcase. This patch fixes has_definition for such enums by checking OPAQUE_ENUM_P instead, which shoul