aaron.ballman added a comment.

I think this is getting really close! One question: would it make more sense to 
name this `readability-const-type-return` or `readability-const-return-type` 
instead? It's not that the functions return a const *value* that's the issue, 
it's that the declared return type is top-level const. I think removing "value" 
and using "type" instead would be an improvement (and similarly, rename the 
files and the check).



================
Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:111
+    DiagnosticBuilder Diagnostic =
+        diag(Def->getInnerLocStart(),
+             "return type %0 is 'const'-qualified at the top level, which may "
----------------
I think you want `getBeginLoc()` here instead.


================
Comment at: docs/clang-tidy/checks/readability-const-value-return.rst:4
+readability-const-value-return
+===================================
+
----------------
Underlining here is incorrect.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53025



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to