clang: custom attributes not visible in AST
<p>i implemented a custom attribute in clang as described in the official manual: 
<a href="http://clang.llvm.org/docs/InternalsManual.html#how-to-add-an-attribute" rel="noreferrer">http://clang.llvm.org/docs/InternalsManual.html#how-to-add-an-attribute</a> </p>

<p>So i added the following Code to Attr.td:</p>

<pre><code>def MyAttr: InheritableAttr {

let Spellings = [GNU&lt;"my_attr"&gt;, CXX11&lt;"me", "my_attr"&gt;, GCC&lt;"my_attr"&gt;, Declspec&lt;"my_attr"&gt;];
  let Subjects = SubjectList&lt;[Var, Function, CXXRecord]&gt;;

  let Documentation = [MyAttrDocs];

}
</code></pre>

<p>and the documentation to <em>AttrDocs.td</em>. After rebuilding clang, it obviously knows the attribute because i don't get an unknown attribute warning when using it. I can even access the new attribute class with <em>libtooling</em>, but the attribute doesn't show up in the AST, even if i add the line <code>let ASTNode = 1</code> to the attribute definition.</p>

<p>Is there something else i need to consider or what could be the problem?</p>