OTOH if I went full `const`, and I were to add `const` to the return type of `hlsl_type_get_component_type()` (which in principle seems to be the correct thing to do), then I would have to add it to the `struct hlsl_type *` variables in the callers:
[const] hlsl_type *type; type = hlsl_type_get_component_type(·);
But these same variables are passed to other functions, and we have a lot of functions that receive `struct hlsl_type *` instead of `const struct hlsl_type *`, so we would have to change those signatures too, and probably in the `struct hlsl_type *` members in structs like `struct hlsl_ir_var` too.
We went through making a bunch of things const in wined3d some years ago now, and you pretty much have to start from the leaf functions and work your way up from there. You'll likely still end up with a number of cases where it's just not worth it.