[PATCH] D32346: [clang-tidy] New readability check for strlen argument

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 07:16:27 PDT 2017


sberg added inline comments.


================
Comment at: test/clang-tidy/readability-strlen-argument.cpp:11
+  X = strlen(Str + 10);
+  // CHECK-FIXES: {{^}}  X = (strlen(Str) - 10);{{$}}
+
----------------
but if any of the first ten chars in Str can be NUL, then the change is bogus?  (I guess I fail to see the reason for this check)


Repository:
  rL LLVM

https://reviews.llvm.org/D32346





More information about the cfe-commits mailing list