[PATCH] Improve #pragma comment(lib) support
Richard Smith
richard at metafoo.co.uk
Thu May 23 15:59:13 PDT 2013
On Thu, May 23, 2013 at 2:02 PM, Rui Ueyama <ruiu at google.com> wrote:
> - Consumer.HandleDependentLibrary(Arg);
> + // If the argument does not end in .lib, automatically add the
> suffix. This
> + // matches the behavior of MSVC.
> + std::string ArgStr = Arg;
> + StringRef End = Arg.substr( Arg.size() - 4 );
>
> Looks like it's not safe if Arg.size() < 4.
>
Please use StringRef::endswith for this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130523/fe801b4d/attachment.html>
More information about the cfe-commits
mailing list