<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Aaron,<div><br></div><div>I did a brief search for patents on "source code annotation language" and came up with this one, which seems to be patenting SAL annotations. (In particular, they talk about pre and post, writableTo, checkReturn… ) </div><div><a href="http://www.google.com/patents/about/7584458_Source_code_annotation_language.html?id=-2jKAAAAEBAJ">http://www.google.com/patents/about/7584458_Source_code_annotation_language.html?id=-2jKAAAAEBAJ</a></div><div><br></div><div><div><div>Looks like this patch might infringe on the patent and if so it should not be committed; see the LLVM developer policy:</div><div><a href="http://llvm.org/docs/DeveloperPolicy.html#clp">http://llvm.org/docs/DeveloperPolicy.html#clp</a></div><div><br></div><div>Thanks for the initiative, it would be a great addition!</div><div>Anna.</div><div><br></div><div>On Oct 30, 2011, at 11:40 AM, Aaron Ballman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I am starting to add support for Microsoft's source annotations so<br>that they can be used in the static analyzer.  Before I go too far<br>into the implementation, I am wondering whether I'm approaching the<br>problem properly.<br><br>SAL has two separate implementations, depending on the compiler.<br>Older versions of MSVC use __declspec to implement the annotations,<br>and newer versions of MSVC use Microsoft's basically undocumented<br>attribute syntax.  Initially, I am only implementing support for the<br>__declspec syntax, but would eventually like to support the attribute<br>syntax as well.  The __declspec syntax relies on ordering of the<br>annotations.  For instance, __declspec( "SAL_pre" ) __declspec(<br>"SAL_notnull" ) is not the same as __declspec( "SAL_notnull" )<br>__declspec( "SAL_pre" ).<br><br>I've created separate attributes for each of the SAL notations, and I<br>parse them in ParseMicrosoftDeclSpec.  Some of the notations are<br>simple declspecs, and others have parameters to parse.  Currently, I<br>am only parsing the simple ones, but I intend to parse the<br>parameterized ones and store the parameter information on the<br>attribute objects.  All of the SAL declspecs are string literals.<br><br>I've attached an early stage patch, and am looking for feedback on<br>whether I am going about this properly, or if there is a better way.<br><br>Thanks!<br><br>~Aaron<br><span><SAL.diff></span>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></div></blockquote></div><br></div></body></html>