[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

Paul Hoad via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 7 06:47:25 PST 2018


MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: alexfh, stephenkelly, curdeius, aaron.ballman.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.

Adds a checker to clang-tidy to warn when a non void const member function, taking only parameters passed by value or const reference could be marked as '[[nodiscard]]'


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D55433

Files:
  clang-tidy/modernize/CMakeLists.txt
  clang-tidy/modernize/ModernizeTidyModule.cpp
  clang-tidy/modernize/UseNodiscardCheck.cpp
  clang-tidy/modernize/UseNodiscardCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/modernize-use-nodiscard.rst
  test/clang-tidy/modernize-use-nodiscard.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55433.177203.patch
Type: text/x-patch
Size: 16460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181207/00348e85/attachment-0001.bin>


More information about the cfe-commits mailing list