<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 28, 2015, at 20:57 , Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Apr 17, 2015, at 6:37 , Aaron Ballman <<a href="mailto:aaron@aaronballman.com" class="">aaron@aaronballman.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">On Fri, Apr 17, 2015 at 9:35 AM, Sylvestre Ledru <</span><a href="mailto:sylvestre@debian.org" class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">sylvestre@debian.org</a><span class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">> wrote:</span><br class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On 17/04/2015 15:33, Aaron Ballman wrote:<br class=""><blockquote type="cite" class="">On Fri, Apr 17, 2015 at 9:21 AM, Sylvestre Ledru <<a href="mailto:sylvestre@debian.org" class="">sylvestre@debian.org</a>> wrote:<br class=""><blockquote type="cite" class="">Author: sylvestre<br class="">Date: Fri Apr 17 08:21:39 2015<br class="">New Revision: 235190<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=235190&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=235190&view=rev</a><br class="">Log:<br class="">Remove the assertion as it was useless and broken.<br class=""><br class="">Enforcing the assert caused the following tests to fail:<br class="">Clang :: Analysis__bstring.c<br class="">Clang :: Analysis__comparison-implicit-casts.cpp<br class="">Clang :: Analysis__malloc-interprocedural.c<br class="">Clang :: Analysis__malloc.c<br class="">Clang :: Analysis__redefined_system.c<br class="">Clang :: Analysis__string.c<br class="">Clang :: Analysis__weak-functions.c<br class=""></blockquote><br class="">While the assert may have been broken, I am concerned that the<br class="">author's assumptions are being violated in some way. Can the original<br class="">code author weigh in on whether that assert is truly useless or not?<br class="">That appears to be Jordan in this case, according to a quick svn<br class="">blame.<br class=""></blockquote>Yes, sorry about that. I fixed it quickly and maybe not using the best way.<br class="">However, the incorrect assertion (fixed r235188) has been there for a few years.<br class=""></blockquote><br class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">I agree that this is an improvement over broken bots and an assert</span><br class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">that behaves differently in debug vs release mode. ;-) I just want to</span><br class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">make sure we double-check that this is the right move long-term.</span><br class="" style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></div></blockquote></div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I wrote this a long time ago, but the intent was that you wouldn't get to this point without setting CurrentFunctionDescription for<span class="Apple-converted-space"> </span><i class="">your specific caller.</i> I haven't actually looked at how it's being called now, though, since CStringChecker is a beta checker.</div></div></blockquote><br class=""></div><div>Ah. The code <i class="">as written originally</i> was correct:</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div>  // Make sure each function sets its own description.</div></div><div><div>  // (But don't bother in a release build.)</div></div><div><div>  assert(!(CurrentFunctionDescription = nullptr));</div></div></blockquote><div><div class=""><br class=""></div><div class="">...except that the canonical way to write this is</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div class="">#ifndef NDEBUG</div><div class="">CurrentFunctionDescription = nullptr;</div><div class="">#endif</div></div></blockquote><div class=""><br class=""></div>and apparently past me didn't know that.<div class=""><br class=""></div><div class="">Jordan<br class=""><br class=""></div></body></html>