[PATCH] PR19601: return value for std::remove_if not used

Arnaud Allard de Grandmaison arnaud.adegm at gmail.com
Tue Apr 29 13:17:14 PDT 2014


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.

Any opinion there ?

Cheers,
--
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140429/282cb65a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PR19601-std-remove_if-does-not-really-remove-the-ele.patch
Type: text/x-patch
Size: 1224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140429/282cb65a/attachment.bin>


More information about the cfe-commits mailing list