Can I safely use Attr::isInherited to check whether an attribute is
explicitly written on a Decl or whether it has been merged from
It appears to work, but I can't really tell what the intended
semantics for isInherited are.
Yes, you should be able to safely use that. AFAIK, the semantics for
it are exactly as you describe -- whether the attribute was written
for the declaration, or inherited. All of the attribute inheritance
happens from mergeDeclAttribute (or something called from there).
Thanks, Aaron! "Inheritance" seemed like a funny choice of words, so I
wanted to make sure.
Suggestive: I wish I understood this well enough to add Doxygen
comments on Attr :-).