Fix readability-const-return-type identifying the wrong `const` token
authorIlya Mirsky <ilya.mirsky@ericsson.com>
Tue, 24 Dec 2019 15:10:01 +0000 (10:10 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 24 Dec 2019 15:10:01 +0000 (10:10 -0500)
commitf58f39137c6e5a324ef684b1d72bddae244aa94d
tree4ee63f5b7e676a6f2248a9ce53f924964e6d9d03
parentc16b3ec597d277b5a7397db308f8ec730f3330a3
Fix readability-const-return-type identifying the wrong `const` token

Replace tidy::utils::lexer::getConstQualifyingToken with a corrected and also
generalized to other qualifiers variant - getQualifyingToken.

Fixes PR44326
clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
clang-tools-extra/clang-tidy/utils/LexerUtils.h
clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp