[PATCH] D71666: [clang-tidy] Fix readability-const-return-type identifying the wrong `const` token

Ilya Mirsky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 23 09:36:11 PST 2019


ilya marked 2 inline comments as done.
ilya added a comment.

@aaron.ballman, thanks for reviewing. Do you mind submitting this, as I don't have commit access?



================
Comment at: clang-tools-extra/clang-tidy/utils/LexerUtils.h:95-97
+/// Assuming that ``Range`` spans a CVR-qualified type, returns the
+/// token in ``Range`` that is responsible for the qualification. ``Range``
+/// must be valid with respect to ``SM``.  Returns ``None`` if no qualifying
----------------
aaron.ballman wrote:
> Should we add a comment that this is not for getting a member function qualifier? (I am assuming that case was never intended to work, but if it does work, should we also support ref qualifiers in that case?)
That's a good point. For the purposes that this function is currently being used, I don't see a reason to support member function qualifiers - updated the documentation accordingly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71666/new/

https://reviews.llvm.org/D71666





More information about the cfe-commits mailing list