title: Clang/GCC plugin to interpret custom c++11 attributes
body: <p>I'm trying to write a plugin to clang or gcc to interpret custom [[cxx11::attributes]] and generate some code based on that.</p>
  
  <p>Since version 4.5, gcc supports plugins that can be hooked at almost every compilation steps. However, I think gcc is not very clear about how modify its AST and navigate through it (at least I'm having a bad time trying...).</p>
  
  <p>Then I remembered that clang was designed to be extended and used as a library and I gave it a shot. After digging around I found some topics saying clang does not support custom attributes. I cried.</p>
  
  <p>My main goal is to generate code based on any kind of annotations that user can use at code. I'd like to use c++11 attributes because they are very clear. Pragmas are also an option but they have some limitations.</p>
  
  <p>Here are the questions:</p>
  
  <p>1) Is it really (currently) impossible to have custom attributes in clang?
  2) What is the best way to learn gcc internals? (I read lots of pages of documentation but still they didn't say what I want)
  3) Does gcc have some dump function to print its AST like clang does? It would help a lot to explore its tree.</p>
  
  <p>Thank you! Any information/tip would be appreciated!</p>