[libc-commits] [PATCH] D106511: [libc] Add explicit C++ casting to strchr and strrchr

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jul 22 10:30:22 PDT 2021


sivachandra added a comment.

About `strchr`, it is the way it is because the standard says, "each character interpreted as unsigned char". I see almost no difference before and after wrt codegen.

Before: https://godbolt.org/z/89sqGrYY9
After: https://godbolt.org/z/4h9eWzKKT

The changes comparing with `\0' are good though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106511



More information about the libc-commits mailing list