clang does not support this by default. By default, if you want to utilize declspec to assign a SectionAttr to a function, you should use declspec allocate.
However, this is not valid under MSVC. It works under clang (whether or not that is acceptable should be the subject of another patch request)
To avoid a lot of headaches for everyone here's my solution. Double __declspec in Attr.td works fine, it seems, and so the fix was fairly trivial. I also patch some code to verify code_seg is only ever used on FunctionDecls.
Reason being, without it technically code_seg on variables and so on would be valid.
MSDN suggests that it can also be applied to classes to control where special member functions live.
I think it might be better to have a separate attribute for this.