[PATCH] D33531: Clang-tidy readability: avoid const value return

Samuel Benzaquen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 30 07:07:25 PDT 2017


sbenza added inline comments.


================
Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:31
+          isAnyPointer(),
+          references(type()),
+          templateTypeParmType(),
----------------
References are never const qualified, right?


================
Comment at: test/clang-tidy/readability-const-value-return.cpp:51
+const T f_returns_template_param();
+
+template <typename T>
----------------
We are missing one like:

    template <typename T> T f();

where `T` is `const X`.

We also need to test for macros (and skip fixes there)


Repository:
  rL LLVM

https://reviews.llvm.org/D33531





More information about the cfe-commits mailing list