[libc-commits] [PATCH] D85615: [libc] Add strtok implementation.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 11 07:20:59 PDT 2020
sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: libc/src/string/strtok.cpp:26
+ ;
+ if (!*src)
+ return nullptr;
----------------
Should we update `strtok_str = src` ?
================
Comment at: libc/test/src/string/strtok_test.cpp:61
+ token = __llvm_libc::strtok(nullptr, "_:,_");
+ ASSERT_STREQ(token, nullptr);
+ // Subsequent calls after hitting the end of the string should also return
----------------
Switch this to `ASSERT_EQ`?
================
Comment at: libc/test/src/string/strtok_test.cpp:65
+ token = __llvm_libc::strtok(nullptr, "_:,_");
+ ASSERT_STREQ(token, nullptr);
+}
----------------
Same here.
================
Comment at: libc/test/src/string/strtok_test.cpp:77
+ token = __llvm_libc::strtok(nullptr, "_:,_");
+ ASSERT_STREQ(token, nullptr);
+}
----------------
And here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85615/new/
https://reviews.llvm.org/D85615
More information about the libc-commits
mailing list