<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 19, 2012, at 2:27 PM, John McCall wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Aug 17, 2012, at 7:59 PM, Jordan Rose wrote:<br><blockquote type="cite">On Aug 17, 2012, at 19:15 , Anna Zaks <<a href="mailto:ganna@apple.com">ganna@apple.com</a>> wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">On Aug 17, 2012, at 5:30 PM, Jordan Rose wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=162156&r1=162155&r2=162156&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=162156&r1=162155&r2=162156&view=diff</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">==============================================================================<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Fri Aug 17 19:30:20 2012<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">@@ -889,7 +889,7 @@<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">  case Stmt::ObjCAtThrowStmtClass: {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    // FIXME: This is not complete.  We basically treat @throw as<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">    // an abort.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-      Bldr.generateNode(S, Pred, Pred->getState());<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">+      Bldr.generateNode(S, Pred, Pred->getState(), /*IsSink=*/true);<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Please remove the C style comment.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">You can mention that we are generating a sink in a comment or better yet add another API to the node builder spelling out what we do:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"Bldr.generateSink"<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is a common way to annotate otherwise cryptic parameters in Clang, though admittedly most of the uses in the analyzer specifically were introduced by me. I don't understand why it's an issue, at least right now. (I agree that in this case a "generateSink" method would be a little clearer.)<br></blockquote><br>FWIW, I generally find myself wanting to use binary enums for most of<br>these things eventually.  That would be nicer if clang were using C++11,<br>of course.<br><br></div></blockquote><div><br></div><div>Using the enum or multiple methods is a better solution than the comment. Also, LLVM Coding Standard makes no exception for using C style comments for dealing with cryptic arguments:</div><div><a href="http://llvm.org/docs/CodingStandards.html#comment-formatting">http://llvm.org/docs/CodingStandards.html#comment-formatting</a></div><div><br></div><div>Talked to Jordan off line and we agreed to change the API and keep the analyzer codebase free of C Style comments.</div><div>Anna.</div><br><blockquote type="cite"><div>John.</div></blockquote></div><br></body></html>