[PATCH] D22540: Get rid of call to StringRef::substr that's never used.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 15:11:20 PDT 2016


jlebar created this revision.
jlebar added a reviewer: majnemer.
jlebar added a subscriber: llvm-commits.

substr doesn't modify the string, so this line has no effect.

https://reviews.llvm.org/D22540

Files:
  lib/Support/CommandLine.cpp

Index: lib/Support/CommandLine.cpp
===================================================================
--- lib/Support/CommandLine.cpp
+++ lib/Support/CommandLine.cpp
@@ -505,7 +505,6 @@
         return true;
       // Erase the portion before the comma, AND the comma.
       Val = Val.substr(Pos + 1);
-      Value.substr(Pos + 1); // Increment the original value pointer as well.
       // Check for another comma.
       Pos = Val.find(',');
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22540.64573.patch
Type: text/x-patch
Size: 453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/96b6ba07/attachment.bin>


More information about the llvm-commits mailing list