[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 31 08:58:36 PDT 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.cpp:1
+//===--- UnnecessaryIntermediateVarCheck.cpp -
+// clang-tidy----------------------===//
----------------
Please make fit line into 80 characters and remove incorrect continuation.


================
Comment at: clang-tidy/readability/UnnecessaryIntermediateVarCheck.h:1
+//===--- UnnecessaryIntermediateVarCheck.h - clang-tidy--------------*- C++
+//-*-===//
----------------
Please make fit line into 80 characters and remove incorrect continuation.


================
Comment at: docs/ReleaseNotes.rst:128
+- New :doc:`readability-unnecessary-intermediate-var
+  <clang-tidy/checks/readability-unnecessary-intermediate-var>`_ check
+
----------------
Final underscore is not needed.


================
Comment at: docs/clang-tidy/checks/readability-unnecessary-intermediate-var.rst:6
+
+Detects unnecessary intermediate variables before ``return` statements returning the
+result of a simple comparison. This check also suggests to directly inline the
----------------
Please add missing `. Same below.


https://reviews.llvm.org/D37014





More information about the cfe-commits mailing list