[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Tiago Macarios via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 19 07:18:50 PDT 2021
tiagoma added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:168
+ *Variable, *Result.Context, DeclSpec::TQ_const,
+ QualifierTarget::Value, QualifierPolicy::Right)) {
+ Diag << *Fix;
----------------
The core guidelines suggests the use of west const. Could this be made the default?
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rl-const
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.h:31
+ WarnPointersAsValues(Options.get("WarnPointersAsValues", 0)),
+ TransformValues(Options.get("TransformValues", 1)),
+ TransformReferences(Options.get("TransformReferences", 1)),
----------------
JonasToth wrote:
> Deactivating the transformations by default, as they are not ready for production yet.
Ok. This got me off-guard. I would rather have this on.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54943/new/
https://reviews.llvm.org/D54943
More information about the cfe-commits
mailing list