IDLGenerators: Make attribute names C++-safe

This commit is contained in:
Sam Atkins 2025-08-18 17:27:10 +01:00 committed by Andreas Kling
commit 4791f9e88f
Notes: github-actions[bot] 2025-08-29 10:00:25 +00:00

View file

@ -3231,7 +3231,7 @@ static void collect_attribute_values_of_an_inheritance_stack(SourceGenerator& fu
auto implemented_as = attribute.extended_attributes.get("ImplementedAs").value();
attribute_generator.set("attribute.cpp_name", implemented_as);
} else {
attribute_generator.set("attribute.cpp_name", attribute.name.to_snakecase());
attribute_generator.set("attribute.cpp_name", make_input_acceptable_cpp(attribute.name.to_snakecase()));
}
if (attribute.extended_attributes.contains("Reflect")) {
@ -3898,7 +3898,7 @@ static void generate_prototype_or_global_mixin_definitions(IDL::Interface const&
auto implemented_as = attribute.extended_attributes.get("ImplementedAs").value();
attribute_generator.set("attribute.cpp_name", implemented_as);
} else {
attribute_generator.set("attribute.cpp_name", attribute.name.to_snakecase());
attribute_generator.set("attribute.cpp_name", make_input_acceptable_cpp(attribute.name.to_snakecase()));
}
if (attribute.extended_attributes.contains("Reflect")) {