Replace tidy::utils::lexer::getConstQualifyingToken with a corrected and also
generalized to other qualifiers variant - getQualifyingToken.
Fixes: http://llvm.org/PR44326
Paths
| Differential D71666
[clang-tidy] Fix readability-const-return-type identifying the wrong `const` token ClosedPublic Authored by ilya on Dec 18 2019, 9:17 AM.
Details
Summary Replace tidy::utils::lexer::getConstQualifyingToken with a corrected and also Fixes: http://llvm.org/PR44326
Diff Detail
Event TimelineComment Actions LGTM with a commenting request.
This revision is now accepted and ready to land.Dec 20 2019, 11:11 AM Comment Actions @aaron.ballman, thanks for reviewing. Do you mind submitting this, as I don't have commit access?
Comment Actions
Happy to do so, thank you for the fix! I've commit in f58f39137c6e5a324ef684b1d72bddae244aa94d
Revision Contents
Diff 235156 clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
clang-tools-extra/clang-tidy/utils/LexerUtils.h
clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
clang-tools-extra/test/clang-tidy/checkers/readability-const-return-type.cpp
|
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?)