On Thu, May 23, 2013 at 3:59 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, May 23, 2013 at 2:02 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br></div><div class="gmail_quote"><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>-    Consumer.HandleDependentLibrary(Arg);</div><div>+    // If the argument does not end in .lib, automatically add the suffix. This</div><div>+    // matches the behavior of MSVC.</div><div>+    std::string ArgStr = Arg;</div>



<div>+    StringRef End = Arg.substr( Arg.size() - 4 );</div><div><br></div><div>Looks like it's not safe if Arg.size() < 4.</div></div></blockquote><div><br></div></div></div><div>Please use StringRef::endswith for this. </div>

</div>
</blockquote></div><br><div>Oh, wait, you want a case-insensitive comparison. :-(</div>