<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 14, 2016 at 5:52 PM, Justin Bogner via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are a couple of calls to getRawText in RawCommentList.cpp that<br>
have the comment "Make sure that RawText is valid" but don't actually<br>
use the result of getRawText, like this one:<br>
<br>
<br><br>
As far as I can tell this doesn't make sure anything is valid. It<br>
*might* hit the assert in getRawTextSlow:<br></blockquote><div><br></div><div>I don't think even that can happen -- we already called it once in the RawComment constructor.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
but it's probably more likely to hit the case that says "if (Invalid)"<br>
and returns an empty string.<br>
<br>
Should this be an assert? Is the comment just wrong and this is<br>
pre-populating a cache or something? Should this just be deleted?</blockquote><div><br></div><div>It looks like it should just be deleted, along with the RawTextValid flag (which stores the same value as Kind != RCK_Invalid) and the lazy on-demand RawText computation in getRawText (it's always called on construction).</div></div></div></div>