[libc-commits] [PATCH] D77279: [libc] Add strlen implementation.
Fangrui Song via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Apr 3 13:34:06 PDT 2020
MaskRay added inline comments.
================
Comment at: libc/src/string/strlen.cpp:18
+ while (*end != '\0')
+ end++;
+ return end - src;
----------------
https://llvm.org/docs/CodingStandards.html#prefer-preincrement
================
Comment at: libc/src/string/strlen.h:1
-//===-------------------- Implementation of strcpy -----------------------===//
+//===----------------- Implementation header for strlen -------------------===//
//
----------------
sivachandra wrote:
> PaulkaToast wrote:
> > abrachet wrote:
> > > We could add the `-*- C++ -*-`
> > Just noticed none of the headers in string have this. I'll go make a separate patch for that. Thanks!
> This problem is probably more wide spread than just the `string` directory. +1 to fixing them all up in a separate, may be obvious patch.
https://llvm.org/docs/CodingStandards.html#file-headers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77279/new/
https://reviews.llvm.org/D77279
More information about the libc-commits
mailing list