[PATCH] PR19601: return value for std::remove_if not used
Arnaud Allard de Grandmaison
arnaud.adegm at gmail.com
Wed Apr 30 08:17:30 PDT 2014
Thanks for trying it Artyom --- I intended to do it later today.
I think it is best to add the Args.erase() in order to really do what is
meant. I will commit it later today --- unless someone objects.
Cheers,
--
Arnaud
On Wed, Apr 30, 2014 at 4:46 PM, Artyom Skrobov <Artyom.Skrobov at arm.com>wrote:
> >>> In clang/lib/Tooling/CompilationDatabase.cpp:241, this really looks
> weird:
> >>>
> >>> // Remove -no-integrated-as; it's not used for syntax checking,
> >>> // and it confuses targets which don't support this option.
> >>> std::remove_if(Args.begin(), Args.end(),
> >>> MatchesAny(std::string("-no-integrated-as")));
> >>>
> >>> The attached patch adds the extra erase step necessary to really remove
> >>> the elements --- as the comment states. But it bothers me to see that
> the
> >>> current code seems to work as it is, hinting that those lines may no
> longer
> >>> be necessary.
> >>
> >> I don't see how those lines work as is. I think they are only working in
> >> the absence of that flag.
> >
> > I guess integrated-as works on Win32 now? Either that, or the test is
> > broken too.
>
> I don't immediately see why those lines work as is, but I can confirm that
> removing them causes a failure in Tooling/multi-jobs.cpp; while adding
> Args.erase() keeps the test passing.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140430/ec332218/attachment.html>
More information about the cfe-commits
mailing list