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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 28 10:52:21 PST 2018


lebedev.ri added inline comments.


================
Comment at: test/clang-tidy/readability-unnecessary-intermediate-var.cpp:206
+  auto test = 1; // Test
+#ifdef INTERMITTENT_MACRO
+  return (test == 1);
----------------
Tests are nice :)
But please, add the test with assert-like macro..


https://reviews.llvm.org/D37014





More information about the cfe-commits mailing list