<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Wed, Jun 20, 2012 at 10:27 AM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif"><font size="2"><div><div class="h5"><br><br><div class="gmail_quote">
On Tue, Jun 19, 2012 at 5:41 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif"><font size="2"><div class="gmail_quote"><div>On Tue, Jun 19, 2012 at 5:36 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif"><font size="2"><div class="gmail_quote"><div>On Tue, Jun 19, 2012 at 5:16 PM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rikka<br>
Date: Tue Jun 19 19:16:40 2012<br>
New Revision: 158769<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=158769&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=158769&view=rev</a><br>
Log:<br>
Don't assert when given an empty range.<br>
<br>
llvm::RawMemoryObject handles empty ranges just fine, and the assert can<br>
be triggered in the wild by e.g. invoking clang with a file that<br>
included an empty pre-compiled header file when clang has been built<br>
with assertions enabled. Without assertions enabled, clang will properly<br>
report that the empty file is not a valid PCH.<br></blockquote><div><br></div></div><div>Add a test case that builds an empty pre-compiled header and invokes clang with it?</div></div></font></div></blockquote><div><br></div>


</div><div>Never mind, I see your commit now.</div><div><br></div><div>Also, I wonder, are there any unittests for this? If so, we should add a unittest that covers this case. Not worth adding a completely new unittest though... </div>


</div></font></div>
</blockquote></div><br></div></div><div>I would have added a unit test in llvm for it, but I don't know what in llvm uses this code. Hence just the clang unit test...</div></font></div></blockquote><div><br></div><div>
We're trying to build up actual GoogleTest style unit tests for the core LLVM libraries like Support and ADT specifically because their users are often in other projects.</div><div><br></div><div> unittests/Support/... has the various unittests added thus far for Support. Not sure if this class currently has any though.</div>
</div></font></div>