[PATCH] D45468: [clang-tidy] Adding Fuchsia checker for human-readable logging

Julie Hockett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 9 17:26:42 PDT 2018


juliehockett created this revision.
juliehockett added reviewers: aaron.ballman, hokein, ilya-biryukov.
juliehockett added a project: clang-tools-extra.
Herald added subscribers: xazax.hun, mgorny.

Adds a checker to the Fuchsia module to flag instances of attempting to log the system's numerical representation of the status, instead of the more human-friendly string representation. Matches formatting functions (the printf family and a set of user-specified formatting-like ones) that have a zx_status_t parameter and suggests a fixit to replace the zx_status_t parameter with a call to zx_status_get_string(param).


https://reviews.llvm.org/D45468

Files:
  clang-tidy/zircon/CMakeLists.txt
  clang-tidy/zircon/HumanReadableStatusCheck.cpp
  clang-tidy/zircon/HumanReadableStatusCheck.h
  clang-tidy/zircon/ZirconTidyModule.cpp
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/zircon-human-readable-status.rst
  test/clang-tidy/zircon-human-readable-status.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45468.141770.patch
Type: text/x-patch
Size: 12944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180410/da7b6336/attachment-0001.bin>


More information about the cfe-commits mailing list