<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">The intention of the patch is to extend the functionality of annotations while utilizing existing infrastructure in the AST and IR as much as possible. Annotations are indeed a general purpose solution, sufficient for many use cases, and a complement, not mutual exclusive to pluggable attributes. And don’t forget the realm of AST tools. The compiler should not perform any content checking of annotations but leave that to tool implementations if it is used for other purposes than merely tags. For a more complete support of annotations the AST and IR needs further work but this patch is a step on the way.</div><div class=""><br class=""></div><div class="">Having pluggable attributes would be cool but it would face even greater problems than you describe. Unless pluggable attributes involves writing pluggable AST and IR modules the AST and IR must both support some form of generic containers that could handle any type of attribute with any number of parameters. In either case, it would most likely involve substantial architectural changes to many parts.</div><div class=""><br class=""></div><div class="">I have revised the patch by adding a second, optional parameter that makes it possible to group annotations, reducing the risk for collisions and since it is optional it won’t break any existing code. A non-zero group string is prepended to the value string when forwarded to IR. The C++11 attribute has been moved to the clang namespace as requested and unit tests and documentation are updated to reflect the changes.</div></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Chris</div><div class=""><br class=""></div><div class=""><div class="">Modified</div><div class=""> include/clang/Basic/Attr.td</div><div class=""> include/clang/Basic/AttrDocs.td</div><div class=""> lib/CodeGen/CodeGenFunction.cpp</div><div class=""> lib/CodeGen/CodeGenModule.cpp</div><div class=""> lib/CodeGen/CodeGenModule.h</div><div class=""> lib/Sema/SemaDeclAttr.cpp</div><div class=""> lib/Sema/SemaStmtAttr.cpp</div><div class=""> test/Parser/access-spec-attrs.cpp</div><div class=""> test/Sema/annotate.c</div><div class=""><br class=""></div><div class="">Added</div><div class=""> test/CodeGenCXX/annotations-field.cpp</div><div class=""> test/CodeGenCXX/annotations-global.cpp</div><div class=""> test/CodeGenCXX/annotations-loc.cpp</div><div class=""> test/CodeGenCXX/annotations-var.cpp</div><div class=""> test/SemaCXX/attr-annotate.cpp</div></div><div class=""><br class=""></div><div class=""></div></body></html>