[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 14 06:49:48 PST 2022
aaron.ballman added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp:101
+ functionDecl(returns(isConstQualified()),
+ anyOf(isDefinition(), cxxMethodDecl(isPure())))
+ .bind("func"),
----------------
MTC wrote:
> Like @flx comments in https://reviews.llvm.org/D116593, the better choice is that we suppress the fix for the virtual method. What do you think @Sockke?
I agree that the fix needs to be suppressed here as well, for the same reasons as the quoted review. e.g., https://godbolt.org/z/Yvsb37Yzr
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116439/new/
https://reviews.llvm.org/D116439
More information about the cfe-commits
mailing list