> Are there any documents on how to add a new attribute to CLANG? I am also
> interested in generating a new function annotation corresponding to this attribute
> in the LLVM IR. Can someone point me to some docs or code sequence to
> look at?
There's no documentation on adding attributes, and although the situation has improved a bit---see include/clang/Basic/Attr.td for examples on how to get started---you're still going to have to add code in quite a few places in Clang. I suggest picking an attribute that is similar to what you want (e.g., applies to the same kinds of entities) and follow it through Clang.