[libcxx-commits] [PATCH] D103533: [libc++] Remove unused variable

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 2 10:15:51 PDT 2021


ldionne updated this revision to Diff 349314.
ldionne retitled this revision from "[libc++] Add workaround for false positive introduced by D100581" to "[libc++] Remove unused variable".
ldionne edited the summary of this revision.
ldionne added a comment.

Remove __j instead of silencing the error -- after some research, I think __j was left behind as an oversight.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103533/new/

https://reviews.llvm.org/D103533

Files:
  libcxx/include/regex


Index: libcxx/include/regex
===================================================================
--- libcxx/include/regex
+++ libcxx/include/regex
@@ -5884,7 +5884,6 @@
 {
     vector<__state> __states;
     __state __best_state;
-    ptrdiff_t __j = 0;
     ptrdiff_t __highest_j = 0;
     ptrdiff_t _Np = _VSTD::distance(__first, __last);
     __node* __st = __start_.get();
@@ -5945,7 +5944,6 @@
                     __states.pop_back();
                 break;
             case __state::__accept_and_consume:
-                __j += __s.__current_ - __current;
                 __current = __s.__current_;
                 break;
             case __state::__repeat:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103533.349314.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210602/f92598ef/attachment.bin>


More information about the libcxx-commits mailing list