[clang] [clang-format] Don't swap `(const override)` with QAS_Right (PR #167191)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 11 00:18:57 PST 2025
================
@@ -177,13 +177,16 @@ static bool isQualifier(const FormatToken *const Tok) {
const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
const SourceManager &SourceMgr, const AdditionalKeywords &Keywords,
- tooling::Replacements &Fixes, const FormatToken *const Tok,
+ tooling::Replacements &Fixes, const FormatToken *Tok,
----------------
owenca wrote:
My point was that adding `const` to a parameter passed by value was redundant. Are you really saying that we should add `const` to all such parameters? Then you would do the same to `tok::TokenKind QualifierType` one line below?
Actually, this is the only file in `clang/lib/Format/` that has `*const` before parameters, and we should remove all of them. See https://stackoverflow.com/a/60823004.
https://github.com/llvm/llvm-project/pull/167191
More information about the cfe-commits
mailing list