[PATCH] D53025: [clang-tidy] implement new check for const return types.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 26 05:50:32 PDT 2018
lebedev.ri added inline comments.
================
Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:54
+
+namespace {
+
----------------
Extend the namespace /\ above, so that function is also covered?
================
Comment at: clang-tidy/readability/ConstValueReturnCheck.h:19-20
+
+/// Suggests removal of the `const` qualifier from any function that returns a
+/// const type.
+///
----------------
It isn't immediately clear whether this is talking about
```
const T func();
```
or
```
T func() const; // member function
```
I'd suggest to emphasize that this is about the const on the return type, not on the function.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53025
More information about the cfe-commits
mailing list