Found some tests we wrote back in the day, but which never made it upstream.
optnone-and-attributes.cpp is a more thorough exercise of optnone attribute interaction than we have currently.
I'm not entirely sure about the value of optnone-class-members.cpp and optnone-templates.cpp as these would seem to be really exercising the main attribute handling in the context of classes, inheritance, and template instantiation; not really that specific to optnone, but it's hard to tell whether general attribute handling tests cover these situations. I'm happy to contribute them, or throw them away.
The tweak to optnone-def-decl.cpp just makes that last CHECK do what we actually meant it to.