[PATCH] D131859: [clang-tidy] Adds QualifierAlignment to misc-const-correctness.
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 14 07:08:59 PDT 2022
Mordante created this revision.
Mordante added reviewers: aaron.ballman, alexfh, JonasToth, LegalizeAdulthood, njames93.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.
The fixit for misc-const-correctness was hard-coded to use east const.
Clang-format has the option to change east const to west const, but
that's not fool-proof.
This adds a option to the checker to select the placement of the const.
The naming is based on clang-format For backwards compatibility the east
const is the default.
Also fixes the documentation; previously it suggested west const is the
default.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131859
Files:
clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/misc/const-correctness.rst
clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-pointer-as-values.cpp
clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-transform-values.cpp
clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-wrong-config.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131859.452520.patch
Type: text/x-patch
Size: 17085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220814/427bb5cb/attachment-0001.bin>
More information about the cfe-commits
mailing list